]> git.neil.brown.name Git - LaFS.git/commitdiff
README update
authorNeilBrown <neilb@suse.de>
Sun, 10 Oct 2010 23:57:41 +0000 (10:57 +1100)
committerNeilBrown <neilb@suse.de>
Sun, 10 Oct 2010 23:57:41 +0000 (10:57 +1100)
Signed-off-by: NeilBrown <neilb@suse.de>
README

diff --git a/README b/README
index ff465a8e400547d535577e8021db2ccd0d26355c..21ee12fbed352333ba672d6765f928d74487e6d9 100644 (file)
--- a/README
+++ b/README
@@ -5108,6 +5108,9 @@ DONE 15au/ How should iocheck_block set the page error?
 DONE 15aw/ when lafs_incorporate makes a new block where the
       old is Realloc, the new should be Realloc too.
 
+15aw2 / When a block is a snapshot block it can never be dirty
+    so we only need credits for realloc...
+
 DONE 15ax/ Think about what happens when we relocate a block
     in the orphan list (lafs_orphan_release), particularly
     if the block isn't actually loaded.
@@ -5120,7 +5123,7 @@ DONE 15ay/ Wonder if there is any way for run_orphans to get a wakeup
     when an inode or dir mutex is released.
     No, there isn't.
 
-15az/ Sanity check all values in cluster head during roll-forward
+DONE 15az/ Sanity check all values in cluster head during roll-forward
       i.e. in roll_valid.  If the head isn't complete, we can still
       use this to commit some previous checkpoints.
 
@@ -5191,14 +5194,17 @@ DONE 15bi/ Set EmergencyClean a bit later - need at least one checkpoint first.
      - record tuning in state block:
            - max_segs
      - use crc or something, not toy checksum (e.g. cluster - state already has)
-     - flags for inconsistencies found, at layout/fileset/file levels(?)
+     - flags for inconsistencies found, at layout/fileset/file levels(?) (see 60)
      - policies of whether old or new data is allowed on each device
      - policies of how much duplication of metadata is required
-     - inode map - not host-endian
+     DONE - inode map - not host-endian
+     - segments > 16bit:
+        segusage file - what about youth?
+        cluster_hehad Clength
 
 15cc/ free any stray B_ASync block found in destroy_inode
 
-15cd/ Some code assume a cluster header does not exceed 1 page.
+15cd/ Some code assumes a cluster header does not exceed 1 page.
      Is this safe?  Is in true? Is it enforced?
 
 15ce/ classify BUGs as
@@ -5336,14 +5342,17 @@ DONE 52/ NFS export
 56/ Review roll-forward completely.
 
 57/ learn about FS_HAS_SUBTYPE and document it.
+    This is for fuse in particular so users can know the real type
 
 58/ Consider embedding symlinks and device files in directory.
     Need owner/group/perm for device file, but not for symlink.
     Can we create unique inode numbers?
     hard links for dev-files would be problematic.
+    What do we gain?  Maybe something for sort symlinks.
+    40 seems a ood length to et 70% of symlinks.
 
 59/ Fix NeedFlush handling so we don't drop-then-retake
-    a mutex and that isn't sensible.
+    a mutex as that isn't sensible.
 
 60/ Introduce some fs state recording that fsck is needed and possibly
     identifying what sort of fsck.
@@ -6844,4 +6853,49 @@ WritePhase - what is that all about?
     enough credits to split.
     We set Dirty from Credit, and use ICredit for UnincCredit.
     But when only Realloc (not dirty) we don't use those bits.  We allocate
-    fresh credits or set Dirty if that fails.
\ No newline at end of file
+    fresh credits or set Dirty if that fails.
+
+03Oct2010
+   Need lafs_iget_fs to work on other filesystems.  And other snapshots?
+   We use it:
+     in cleaner when parsing cluster head
+     in orphan handler when loading orphan file or when rearranging it.
+     in roll forward
+
+   Each of these might need to kern-mount the fs - so we need to hold the ref
+   somewhere.
+   Cleaner also needs to explore snapshots.
+
+   Don't want kern_mount - that is too heavy weight and includes a vfsmnt.
+   Just split up lafs_get_subset and use sget etc. so we get an 'sb' that we need
+   to hold.
+   Similarly for snapshots.  Cleaner needs to consider all snapshots, so they
+   all need to be mounted.
+
+   So snapshot 'sb's are referenced by cleaner, and de-reffed when cleaner stops.
+   Subset 'sb's can be attached to the parent inode and then only dropped when
+   the inode goes... only sb currently references inode.
+   So maybe the first ref to an sb doesn't ref the inode but others do - is that
+   possible? No, as we don't see them being dropped.
+   Every inode in the subset could ref the filesys inode.  That would keep it active
+   the right amount of time, but release/destroy could still be racy.
+
+   I guess cleaner/orphan/roll need to explicitly ref the fs.
+     cleaner already refs inode when B_Cleaning, so hold fs too.
+     B_Orphan seems to own and inode ref too.
+     
+   So:
+       lafs_iget_fs gets a ref on the inode and the sb.
+       need lafs_iput_fs to drop both references
+       B_Cleaning, B_Orphan, I_Pinned and I_Trunc all hold this double ref.
+
+    cleaner holds refs on all snapshots
+
+    FIXME I probably need to hold inode/fs for B_Async too.
+       No.  Async only refs the block, not the inode or fs.
+        Something else would normally ref the inode - e.g. cleaner.
+        When the inode is free, the page invalidation will notice the
+         B_Async flag and release it.
+
+    So that is all done now, except I don't hold refs on snapshots in the cleaner
+    yet.