mkfs.nilfs2: set block_count read-only compat flag by default

The ability to maintain per-checkpoint block count statistics was enabled
in kernel 2.6.39, and at the same time a dedicated compat flag
(NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT) was introduced to prevent this
block count from being corrupted by read/write mounts in earlier versions.

More than 12 years have passed since this flag was introduced, and there
are almost no opportunities to mount nilfs2 partitions with older kernels
of this generation (it is not recommended in the first place), so turn on
this flag for new file systems created by mkfs.nilfs2.

Note that we can use nilfs-tune command to clear or reset this flag.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
This commit is contained in:
Ryusuke Konishi 2024-02-25 16:46:02 +09:00
parent 7eb742fce3
commit 15a99ec343

View File

@ -108,7 +108,7 @@ static uint64_t compat_array[NILFS_MAX_FEATURE_TYPES] = {
/* Compat */
0,
/* Read-only compat */
0,
NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT,
/* Incompat */
0
};