]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
nilfs2: accept future revisions
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Mon, 9 Aug 2010 15:58:41 +0000 (00:58 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Sat, 23 Oct 2010 00:24:33 +0000 (09:24 +0900)
Compatibility of nilfs partitions is now managed with three feature
sets.  This changes old compatibility check with revision number so
that it can accept future revisions.

Note that we can stop support of experimental versions of nilfs that
doesn't know the feature sets by incrementing NILFS_CURRENT_REV.  We
don't have to do it soon, but it would be a possible option whenever
the need arises.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/the_nilfs.c
include/linux/nilfs2_fs.h

index ba7c10c917fcd1545a668c53f6abb2819b04f3bc..461b7211e14f75b5888612d9e74c40eaf6fddf90 100644 (file)
@@ -468,8 +468,8 @@ static unsigned long long nilfs_max_size(unsigned int blkbits)
 static int nilfs_store_disk_layout(struct the_nilfs *nilfs,
                                   struct nilfs_super_block *sbp)
 {
-       if (le32_to_cpu(sbp->s_rev_level) != NILFS_CURRENT_REV) {
-               printk(KERN_ERR "NILFS: revision mismatch "
+       if (le32_to_cpu(sbp->s_rev_level) < NILFS_MIN_SUPP_REV) {
+               printk(KERN_ERR "NILFS: unsupported revision "
                       "(superblock rev.=%d.%d, current rev.=%d.%d). "
                       "Please check the version of mkfs.nilfs.\n",
                       le32_to_cpu(sbp->s_rev_level),
index f5487b6f91ed32201395d4ce71da043ad575f0b6..b07f5cdff5e29b19a1a36541919cf4293fb93bd1 100644 (file)
@@ -229,6 +229,7 @@ struct nilfs_super_block {
  */
 #define NILFS_CURRENT_REV      2       /* current major revision */
 #define NILFS_MINOR_REV                0       /* minor revision */
+#define NILFS_MIN_SUPP_REV     2       /* minimum supported revision */
 
 /*
  * Feature set definitions