Skip to content

Commit

Permalink
nilfs2: accept future revisions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ryusuke Konishi committed Oct 23, 2010
1 parent f5d9d24 commit 9566a7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nilfs2/the_nilfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions include/linux/nilfs2_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9566a7a

Please sign in to comment.