]> git.neil.brown.name Git - LaFS.git/commitdiff
README update and comment fix.
authorNeilBrown <neilb@suse.de>
Sat, 2 Oct 2010 01:52:16 +0000 (11:52 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 10 Oct 2010 23:33:54 +0000 (10:33 +1100)
Indeed, there is nothing we can do about errors during truncate,
except ignore them.

Signed-off-by: NeilBrown <neilb@suse.de>
README
inode.c

diff --git a/README b/README
index 95ac5918bbf39efd3c64f823ceadcbf208e8c5e9..89bc8a858796af73571b3a84c0393dc0181a531f 100644 (file)
--- a/README
+++ b/README
@@ -5076,24 +5076,24 @@ DONE 15ai/ When allocating a new segment during checkpoint, delay the
 DONE 15aj/ When roll-forward finds a new segment, make sure youth number is
     updated.
 
-15ak/ Load orphan file during roll-forward and make every block an
+DONE 15ak/ Load orphan file during roll-forward and make every block an
     orphan.
 
-15al/ set filesystem update_time somewhere.
+DONE 15al/ set filesystem update_time somewhere.
 
-15am/ filesystem 'name' needs to be handled uniformly.
+DONE 15am/ filesystem 'name' needs to be handled uniformly.
 
 DONE 15an/ can we be sure 'b' will be non-null in delete_inode?
 
-15ao/ determine what locking is needed to walk the children list
-    in lafs_inode_handle_orphans.  Probably the address_space private lock.
+DONE 15ao/ determine what locking is needed to walk the children list
+    in lafs_inode_handle_orphan.  Probably the address_space private lock.
 
 15ap/ Make sure write_inode has been cleaned up.  See if this applies to
     rollforward of a symlink (see FIXME)
 
-15aq/ change inode map to be little-endian, not host-endian
+DONE 15aq/ change inode map to be little-endian, not host-endian
 
-15ar/ understand what to do about errors in lafs_truncate
+DONE 15ar/ understand what to do about errors in lafs_truncate
 
 15as/ handle errors from lafs_write_super ???
 
@@ -5211,6 +5211,13 @@ DONE 15bi/ Set EmergencyClean a bit later - need at least one checkpoint first.
 15ch/ Review values of youth and checkpoint_youth and think about off-by-one
      issues.
 
+15da/ Replace directory updates!!!!!
+
+15db/ Decide how version string will be used.
+
+15dc/ resolve table_size - it should be stored in the segusage file and validated
+      based on device geometry.
+
 16/ Update locking.doc
 
 17/ cluster_flush calls lafs_cluster_allocate calls lafs_add_block_address
@@ -5294,7 +5301,7 @@ DONE 15bi/ Set EmergencyClean a bit later - need at least one checkpoint first.
 
 44/ Examine created filesystem and make sure everything looks good.
 
-45/ mkfs.lafs
+DONE 45/ mkfs.lafs
 
 46/ fsck.lafs
 
@@ -6794,3 +6801,32 @@ WritePhase - what is that all about?
      So as we find a new segment we want to do much like was lafs_free_get does youth_update.
      But the data block - isn't that youthblk?  When it that set?
         segsum_find sets if it ssnum == 0
+
+19sep2010
+   15ak - run the orphan file at mount time.
+     After roll-forward when we have a working filesystem, we need to read the orphan file, load each block
+     mentioned, and register each as an orphan.
+     This involves:
+            - setting the orphan_slot
+            - setting B_Orphan
+            - lafs_add_orphan
+         Just like at the start of orphan_commit
+     We also need to initialise nextfree and possibly 'reserved'.
+     But: can orphans be created during roll-forward?  They certainly can.  We currently hide that in a re-use of
+     the orphan list..  But directory updates are possible too, and not handled.
+
+     I guess we should examine the file as soon as root is loaded as before roll-forward as roll-forward cannot
+     change the orphan file.  Then after roll-forward, we read the original part of the file and set up
+     any orphans that aren't yet.
+     So we want to read once to get the size.  Then read again to process content up to that size.
+
+   15am - filesystem name.
+       This is only used for identifying snapshots
+
+01oct2010
+  - mkfs is done to an initial version of lafs-utils. !!!
+
+ So: 15am - filesystem name - used to identify snapshots
+   So the name is pointless in subordinate filesets.  So I could just shrink
+    the metadata.  The primary metadata needs to be big enough to get a name
+    easily though.
diff --git a/inode.c b/inode.c
index 1a117433c6cd8e771ebf6ff8fda05f5c2ef73e45..e2fcac2b924be2b6626e276fafe4764325fafe89 100644 (file)
--- a/inode.c
+++ b/inode.c
@@ -1735,7 +1735,11 @@ void lafs_truncate(struct inode *ino)
        }
        finish_wait(&fs->async_complete, &wq);
 
-       /* FIXME there is nothing I can do with an error here */
+       /* There is nothing we can do about errors here.  The
+        * most likely are ENOMEM which itself is very unlikely.
+        * If this doesn't get registered as an orphan .... maybe
+        * it will have to wait until something else truncates it.
+        */
        lafs_make_orphan(fs, db, NULL);
 
        if (!test_and_set_bit(I_Trunc, &LAFSI(ino)->iflags))