ext4: make huge file flag user visible.
PATCH 1/1 ext4: make huge file flag user visible.
Make huge file flag visible to clients of FS_IOC_GETFLAGS ioctl, e.g. the userspace tool lsattr, which expects the flag to be visible.
--- fs/ext4/ext4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/ext4.h +1 -1
@@ -400,7 +400,7 @@ struct flex_groups {#define EXT4_PROJINHERIT_FL 0x20000000/* Create with parents projid */ #define EXT4_RESERVED_FL 0x80000000/* reserved for ext4 lib */ -#define EXT4_FL_USER_VISIBLE 0x304BDFFF/* User visible flags */ +#define EXT4_FL_USER_VISIBLE 0x304FDFFF/* User visible flags */ #define EXT4_FL_USER_MODIFIABLE 0x204BC0FF/* User modifiable flags */ /* Flags we can manipulate with through EXT4_IOC_FSSETXATTR */
Signature · 1 line
2.7.4
Quoted 2 lines · Tyson Nottingham
Make huge file flag visible to clients of
FS_IOC_GETFLAGSioctl, e.g. the userspace tool lsattr, which expects the flag to be visible.
Pardon my asking, but why is this necessary? Are there userspace-visible effects of this flag?
--D
Quoted 22 lines
Signed-off-by Tyson Nottingham <[email protected]>--- fs/ext4/ext4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ext4/ext4.h +1
-1@@ -400,7 +400,7 @@ struct flex_groups {#define EXT4_PROJINHERIT_FL 0x20000000/* Create with parents projid */ #define EXT4_RESERVED_FL 0x80000000/* reserved for ext4 lib */ -#define EXT4_FL_USER_VISIBLE 0x304BDFFF/* User visible flags */ +#define EXT4_FL_USER_VISIBLE 0x304FDFFF/* User visible flags */ #define EXT4_FL_USER_MODIFIABLE 0x204BC0FF/* User modifiable flags */ /* Flags we can manipulate with through EXT4_IOC_FSSETXATTR */ Signature · 1 line
2.7.4
Quoted 6 lines · Darrick J. Wong
Quoted 2 lines · Tyson Nottingham
Make huge file flag visible to clients of
FS_IOC_GETFLAGSioctl, e.g. the userspace tool lsattr, which expects the flag to be visible.Pardon my asking, but why is this necessary? Are there userspace-visible effects of this flag?
Ahh, the chattr man page says that 'h' means HUGE_FILE_FL, but I guess ext4 won't report it to userspace...?
<shrug> XFS won't either, maybe we just kill the 'h' option? :)
--D
Quoted 25 lines
--D
Quoted 22 lines
Signed-off-by Tyson Nottingham <[email protected]>--- fs/ext4/ext4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ext4/ext4.h +1
-1@@ -400,7 +400,7 @@ struct flex_groups {#define EXT4_PROJINHERIT_FL 0x20000000/* Create with parents projid */ #define EXT4_RESERVED_FL 0x80000000/* reserved for ext4 lib */ -#define EXT4_FL_USER_VISIBLE 0x304BDFFF/* User visible flags */ +#define EXT4_FL_USER_VISIBLE 0x304FDFFF/* User visible flags */ #define EXT4_FL_USER_MODIFIABLE 0x204BC0FF/* User modifiable flags */ /* Flags we can manipulate with through EXT4_IOC_FSSETXATTR */ Signature · 1 line
2.7.4
Quoted 7 lines · Darrick J. Wong
Quoted 2 lines
Pardon my asking, but why is this necessary? Are there userspace-visible effects of this flag?
Ahh, the chattr man page says that 'h' means
HUGE_FILE_FL, but I guess ext4 won't report it to userspace...?<shrug> XFS won't either, maybe we just kill the 'h' option? :)
Thanks for responses. Yes, I was just trying to make ext4 consistent with the man page. Since apparently the flag was intended to be user visible at some point, I thought it would be fine to make it so. As you said, removing it from chattr/lsattr is another option. I'll do whatever I'm told. :)
Tyson
Quoted 8 lines · Tyson Nottingham
Quoted 6 lines · Darrick J. Wong
Quoted 2 lines
Pardon my asking, but why is this necessary? Are there userspace-visible effects of this flag?
Ahh, the chattr man page says that 'h' means
HUGE_FILE_FL, but I guess ext4 won't report it to userspace...?
Quoted 6 lines
Quoted 1 line
<shrug> XFS won't either, maybe we just kill the 'h' option? :)
Thanks for responses. Yes, I was just trying to make ext4 consistent with the man page. Since apparently the flag was intended to be user visible at some point, I thought it would be fine to make it so. As you said, removing it from chattr/lsattr is another option. I'll do whatever I'm told. :)
Ted hasn't replied in a couple of days, but I would surmise from digging in the ext4 code that we've never exposed the huge file flag to userspace, so it'd probably be better to withdraw the documentation/code of the 'h' option from the chattr manpage instead. ext2/ext3 never had such a flag at all, so it's unlikely to break anything.
--D
Quoted 1 line
Tyson
Quoted 5 lines · Darrick J. Wong
Ted hasn't replied in a couple of days, but I would surmise from digging in the ext4 code that we've never exposed the huge file flag to userspace, so it'd probably be better to withdraw the documentation/code of the 'h' option from the chattr manpage instead. ext2/ext3 never had such a flag at all, so it's unlikely to break anything.
I agree. I'll update my existing patch that makes some updates to the chattr man page.
Thanks,
Tyson