xfs: preserve DIFLAG2_NREXT64 when setting other inode attributes
PATCH 1/1 xfs: preserve DIFLAG2_NREXT64 when setting other inode attributes
From: Darrick J. Wong <[email protected]>
It is vitally important that we preserve the state of the NREXT64 inode flag when we're changing the other flags2 fields.
--- fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/xfs/xfs_ioctl.c +2 -1
@@ -1096,7 +1096,8 @@ xfs_flags2diflags2( {uint64_t di_flags2 = (ip->i_diflags2 & (XFS_DIFLAG2_REFLINK | -XFS_DIFLAG2_BIGTIME )); +XFS_DIFLAG2_BIGTIME | +XFS_DIFLAG2_NREXT64 ));if (xflags &FS_XFLAG_DAX ) di_flags2 |=XFS_DIFLAG2_DAX ;
Quoted 9 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
It is vitally important that we preserve the state of the NREXT64 inode flag when we're changing the other flags2 fields.
Signed-off-by Darrick J. Wong <[email protected]>--- fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Fixes tag?
Quoted 5 lines
fs/xfs/xfs_ioctl.c +0
-0
fs/xfs/xfs_ioctl.c xfs_flags2diflags2( · line 1103
Quoted 9 lines
fs/xfs/xfs_ioctl.c +2
-1@@ -1096,7 +1096,8 @@ xfs_flags2diflags2( {uint64_t di_flags2 = (ip->i_diflags2 & (XFS_DIFLAG2_REFLINK | -XFS_DIFLAG2_BIGTIME )); +XFS_DIFLAG2_BIGTIME | +XFS_DIFLAG2_NREXT64 ));if (xflags &FS_XFLAG_DAX ) di_flags2 |=XFS_DIFLAG2_DAX ;
Otherwise looks good.
-Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 6 lines · Dave Chinner
Quoted 5 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
It is vitally important that we preserve the state of the NREXT64 inode flag when we're changing the other flags2 fields.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Darrick J. Wong <[email protected]>--- fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Fixes tag?
Does this really need one? NREXT64 is still experimental, none of this code is in any released kernel, and I'm not even sure what would be a good target -- the patch that introduced XFS_DIFLAG_NREXT64?
Quoted 12 lines
Quoted 12 lines
fs/xfs/xfs_ioctl.c +2
-1@@ -1096,7 +1096,8 @@ xfs_flags2diflags2( {uint64_t di_flags2 = (ip->i_diflags2 & (XFS_DIFLAG2_REFLINK | -XFS_DIFLAG2_BIGTIME )); +XFS_DIFLAG2_BIGTIME | +XFS_DIFLAG2_NREXT64 ));
Quoted 6 lines
fs/xfs/xfs_ioctl.c xfs_flags2diflags2( · line 1103
Quoted 2 lines
fs/xfs/xfs_ioctl.c +0
-0if (xflags &FS_XFLAG_DAX ) di_flags2 |=XFS_DIFLAG2_DAX ;Otherwise looks good.
Reviewed-by Dave Chinner <[email protected]>
Thx. :)
--D
Quoted 5 lines
-Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 12 lines · Darrick J. Wong
Quoted 11 lines · Dave Chinner
Quoted 9 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
It is vitally important that we preserve the state of the NREXT64 inode flag when we're changing the other flags2 fields.
Signed-off-by Darrick J. Wong <[email protected]>--- fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 4 lines
Quoted 1 line
Fixes tag?
Does this really need one? NREXT64 is still experimental, none of this code is in any released kernel,
In my opinion, absolutely not.
But after just spending a large part of the last cycle fielding unjustified complaint after complaint that we didn't get everything exactly perfect for every possible unforseen future uses for commit messages and cover letters....
Quoted 2 lines
and I'm not even sure what would be a
good target -- the patch that introducedXFS_DIFLAG_NREXT64?
9b7d16e34bbe xfs: Introduce XFS_DIFLAG2_NREXT64 and associated helpers
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 8 lines · Darrick J. Wong
Quoted 6 lines · Dave Chinner
Quoted 5 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
It is vitally important that we preserve the state of the NREXT64 inode flag when we're changing the other flags2 fields.
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Signed-off-by Darrick J. Wong <[email protected]>--- fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Fixes tag?
Thank you Dave!
Quoted 2 lines
Does this really need one?
I say why not.
I am not looking for a fight. Really, it's up to xfs maintainers how to manage experimental features. That is completely outside of scope for LTS. I only want to explain my POV as a developer.
You know my interest is in backporting fixes for LTS, so this one won't be relevant anyway, but if I were you, I would send this patch to stable 5.18.y to *reduce* burden on myself -
The mental burden of having to carry the doubt of whether a certain reported bug could have been involved with user booting into 5.18.y and back.
When you think about it, it kind of makes sense to have the latest .y in your grub menu when you are running upstream...
Users do that - heck, user do anything you don't want them to do, even if eventually you can tell the users they did something that is not expected to work, you had already invested the time in triage.
Sure, there is always the possibility that someone in the future of 5.19.y will boot into 5.18.0, but that is a far less likely possibility.
For this reason, when I write new features I really try to treat the .y release as the true release cycle of that feature rather than the .0, regardless of LTS.
If I were the developer of the feature, I would have wanted to see this fix applied to 5.18.y.
Thanks,
Amir.
Quoted 14 lines · Amir Goldstein
Quoted 13 lines · Darrick J. Wong
Quoted 11 lines · Dave Chinner
Quoted 9 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
It is vitally important that we preserve the state of the NREXT64 inode flag when we're changing the other flags2 fields.
Signed-off-by Darrick J. Wong <[email protected]>--- fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Fixes tag?
Thank you Dave!
Quoted 2 lines
Does this really need one?
I say why not.
Every one of these asks adds friction for patch authors. For code that has already shipped in a Linus release it's a reasonable ask, but...
Quoted 7 lines
I am not looking for a fight. Really, it's up to xfs maintainers how to manage experimental features. That is completely outside of scope for LTS. I only want to explain my POV as a developer.
You know my interest is in backporting fixes for LTS, so this one won't be relevant anyway, but if I were you, I would send this patch to stable 5.18.y to *reduce* burden on myself -
...WHY?
This is a fix for a new ondisk feature that landed in 5.19-rc1. The feature is EXPERIMENTAL, which means that it **should not** be backported to 5.18, 5.15, or any other LTS kernel. New features do NOT fit the criteria for LTS backports.
That's why I didn't bother attaching a fixes tag!
Quoted 10 lines
The mental burden of having to carry the doubt of whether a certain reported bug could have been involved with user booting into 5.18.y and back.
When you think about it, it kind of makes sense to have the latest .y in your grub menu when you are running upstream...
Users do that - heck, user do anything you don't want them to do, even if eventually you can tell the users they did something that is not expected to work, you had already invested the time in triage.
Quoted 8 lines
Sure, there is always the possibility that someone in the future of 5.19.y will boot into 5.18.0, but that is a far less likely possibility.
For this reason, when I write new features I really try to treat the .y release as the true release cycle of that feature rather than the .0, regardless of LTS.
If I were the developer of the feature, I would have wanted to see this fix applied to 5.18.y.
This fix **WILL NOT APPLY** to 5.18!
--D
Quoted 2 lines
Thanks,
Amir.
Quoted 58 lines · Darrick J. Wong
Quoted 14 lines · Amir Goldstein
Quoted 13 lines · Darrick J. Wong
Quoted 11 lines · Dave Chinner
Quoted 9 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
It is vitally important that we preserve the state of the NREXT64 inode flag when we're changing the other flags2 fields.
Signed-off-by Darrick J. Wong <[email protected]>--- fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Quoted 8 lines
Quoted 1 line
Quoted 1 line
Fixes tag?
Thank you Dave!
Quoted 2 lines
Does this really need one?
I say why not.
Every one of these asks adds friction for patch authors. For code that has already shipped in a Linus release it's a reasonable ask, but...
Quoted 7 lines
I am not looking for a fight. Really, it's up to xfs maintainers how to manage experimental features. That is completely outside of scope for LTS. I only want to explain my POV as a developer.
You know my interest is in backporting fixes for LTS, so this one won't be relevant anyway, but if I were you, I would send this patch to stable 5.18.y to *reduce* burden on myself -
...WHY?
This is a fix for a new ondisk feature that landed in 5.19-rc1. The feature is EXPERIMENTAL, which means that it **should not** be backported to 5.18, 5.15, or any other LTS kernel. New features do NOT fit the criteria for LTS backports.
That's why I didn't bother attaching a fixes tag!
Quoted 13 lines
The mental burden of having to carry the doubt of whether a certain reported bug could have been involved with user booting into 5.18.y and back.
When you think about it, it kind of makes sense to have the latest .y in your grub menu when you are running upstream...
Users do that - heck, user do anything you don't want them to do, even if eventually you can tell the users they did something that is not expected to work, you had already invested the time in triage.Sure, there is always the possibility that someone in the future of 5.19.y will boot into 5.18.0, but that is a far less likely possibility.
Quoted 8 lines
Quoted 5 lines
For this reason, when I write new features I really try to treat the .y release as the true release cycle of that feature rather than the .0, regardless of LTS.
If I were the developer of the feature, I would have wanted to see this fix applied to 5.18.y.This fix **WILL NOT APPLY** to 5.18!
I stand corrected.
Sorry for the noise.
Amir.
Quoted 5 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
It is vitally important that we preserve the state of the NREXT64 inode flag when we're changing the other flags2 fields.
Thanks for spotting and fixing this bug.
Quoted 19 lines
Signed-off-by Darrick J. Wong <[email protected]>--- fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/xfs/xfs_ioctl.c +2
-1@@ -1096,7 +1096,8 @@ xfs_flags2diflags2( {uint64_t di_flags2 = (ip->i_diflags2 & (XFS_DIFLAG2_REFLINK | -XFS_DIFLAG2_BIGTIME )); +XFS_DIFLAG2_BIGTIME | +XFS_DIFLAG2_NREXT64 ));if (xflags &FS_XFLAG_DAX ) di_flags2 |=XFS_DIFLAG2_DAX ;
Signature · 1 line
chandan