Skip to content

Commit 9566a7a

Browse files
committed
nilfs2: accept future revisions
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>
1 parent f5d9d24 commit 9566a7a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎fs/nilfs2/the_nilfs.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ static unsigned long long nilfs_max_size(unsigned int blkbits)
468468
static int nilfs_store_disk_layout(struct the_nilfs *nilfs,
469469
struct nilfs_super_block *sbp)
470470
{
471-
if (le32_to_cpu(sbp->s_rev_level) != NILFS_CURRENT_REV) {
472-
printk(KERN_ERR "NILFS: revision mismatch "
471+
if (le32_to_cpu(sbp->s_rev_level) < NILFS_MIN_SUPP_REV) {
472+
printk(KERN_ERR "NILFS: unsupported revision "
473473
"(superblock rev.=%d.%d, current rev.=%d.%d). "
474474
"Please check the version of mkfs.nilfs.\n",
475475
le32_to_cpu(sbp->s_rev_level),

‎include/linux/nilfs2_fs.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ struct nilfs_super_block {
229229
*/
230230
#define NILFS_CURRENT_REV 2 /* current major revision */
231231
#define NILFS_MINOR_REV 0 /* minor revision */
232+
#define NILFS_MIN_SUPP_REV 2 /* minimum supported revision */
232233

233234
/*
234235
* Feature set definitions

0 commit comments

Comments
 (0)