From 23b7bef8b78e512b11d4e2922b8600e0d76d3693 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 4 May 2011 15:17:40 +1000 Subject: [PATCH] Prepare for more parallelism in write clusters. 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 --- layout.h | 6 ++++++ roll.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/layout.h b/layout.h index 0095097..e92b8cc 100644 --- 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 7b82acd..d352bdf 100644 --- 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, -- 2.39.5