ovl: fix wrong detection of 32bit inode numbers
Subsystems (2)
Amir Goldstein
maintainerPATCH 1/1 ovl: fix wrong detection of 32bit inode numbers
The implicit FILEID_INO32_GEN encoder was changed to be explicit, so we need to fix the detection.
When mounting overlayfs with upperdir and lowerdir on different ext4 filesystems, the expected kmsg log is:
overlayfs: "xino" feature enabled using 32 upper inode bits.
But instead, since the regressing commit, the kmsg log was:
overlayfs: "xino" feature enabled using 2 upper inode bits.
---
Miklos,
I have queued up this fix.
The regression has no serious impact on most users, because xino works pretty well either way.
A nested overlayfs, where the lower overlayfs is nonsamefs ext4 would have less xino overflows, but this is a very corner case.
Thanks,
Amir.
fs/overlayfs/util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/overlayfs/util.c +4 -1
@@ -85,7 +85,10 @@ int ovl_can_decode_fh(struct super_block *sb)if (!exportfs_can_decode_fh (sb->s_export_op))return 0 ; -return sb->s_export_op->encode_fh ?-1 :FILEID_INO32_GEN ; +if (sb->s_export_op->encode_fh == generic_encode_ino32_fh) +return FILEID_INO32_GEN ; + +return -1 ; }struct dentry *ovl_indexdir (struct super_block *sb)
Signature · 1 line
2.53.0
Miklos Szeredi
maintainerQuoted 18 lines · Amir Goldstein
The implicit
FILEID_INO32_GENencoder was changed to be explicit, so we need to fix the detection.When mounting overlayfs with upperdir and lowerdir on different ext4 filesystems, the expected kmsg log is:
overlayfs: "xino" feature enabled using 32 upper inode bits.
But instead, since the regressing commit, the kmsg log was:
overlayfs: "xino" feature enabled using 2 upper inode bits.
Fixes e21fc2038c1b9 ("exportfs: make ->encode_fh() a mandatory method for NFS export")Cc [email protected] # v6.7+Signed-off-by Amir Goldstein <[email protected]>---
Quoted 8 lines
Miklos,
I have queued up this fix.
The regression has no serious impact on most users, because xino works pretty well either way.A nested overlayfs, where the lower overlayfs is nonsamefs ext4 would have less xino overflows, but this is a very corner case.
LGTM, thanks.
Miklos