]> git.neil.brown.name Git - LaFS.git/commitdiff
Prepare for more parallelism in write clusters.
authorNeilBrown <neilb@suse.de>
Wed, 4 May 2011 05:17:40 +0000 (15:17 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 4 May 2011 05:17:40 +0000 (15:17 +1000)
We want to allow write clusters to be written in parallel to
multiple devices.  That means we need a different Verify mechanism.
Introduce - but don't yet implement - VerifyDevNext{,2} which allows
a cluster to be verified by the next header on the same device.

Signed-off-by: NeilBrown <neilb@suse.de>
layout.h
roll.c

index 0095097b5af67f50a1391eb1ecb794b21443770b..e92b8cc8c8829e2fc61de7ad3aa295a51fa9fc46 100644 (file)
--- a/layout.h
+++ b/layout.h
@@ -117,6 +117,12 @@ struct cluster_head {
 #define        VerifyNext      1       /* if next head is valid, this cluster is */
 #define        VerifyNext2     2       /* if next 2 heads are valid, this cluster is */
 #define        VerifySum       3       /* maybe some sort of MIC is in _data */
+#define        VerifyDevNext   4       /* If next head on this device is valud, this
+                                * cluster is.
+                                */
+#define        VerifyDevNext2  5       /* if next 2 heads on this device are valid,
+                                * this cluster is.
+                                */
 
 struct la_inode {
        /* 16 bytes is constant */
diff --git a/roll.c b/roll.c
index 7b82acdfe3efcebe96aa1e6fba90dff563bb92be..d352bdf4ab66c11295e40a54215660f8ac87b17e 100644 (file)
--- a/roll.c
+++ b/roll.c
@@ -80,7 +80,7 @@ roll_valid(struct fs *fs, struct cluster_head *ch, unsigned long long addr)
 
 /*
  * roll_locate scopes out the full extent of the required roll-forward.
- * It start at the start of the last checkpoint (recorded in the stateblock)
+ * It starts at the start of the last checkpoint (recorded in the stateblock)
  * and checks that the end of the checkpoint exists, and continues following
  * the chain as far as valid cluster heads can be found.
  * roll_locate returns 0 if proper endpoints were found,