* xfs fixups for the fop_flags conversion
@ 2024-04-23 12:46 Christoph Hellwig
2024-04-23 12:46 ` [PATCH 1/3] xfs: fix overly long line in the file_operations Christoph Hellwig
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Christoph Hellwig @ 2024-04-23 12:46 UTC (permalink / raw)
To: Christian Brauner, Chandan Babu R, Darrick J. Wong
Cc: linux-xfs, linux-kernel
Hi all,
this series against Christian's vfs.misc branch fixes up pointless
harmless but pointless over-declaration of capabilities for XFS
directories.
Christian: the first patch would make sense to just fold into the
original fop_flags conversion if you're still rebasing the branch.
xfs_file.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] xfs: fix overly long line in the file_operations
2024-04-23 12:46 xfs fixups for the fop_flags conversion Christoph Hellwig
@ 2024-04-23 12:46 ` Christoph Hellwig
2024-04-23 12:46 ` [PATCH 2/3] xfs: drop fop_flags for directories Christoph Hellwig
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2024-04-23 12:46 UTC (permalink / raw)
To: Christian Brauner, Chandan Babu R, Darrick J. Wong
Cc: linux-xfs, linux-kernel
Re-wrap the newly added fop_flags fields to not go over 80 characters.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_file.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 147439ad358138..c6b6809c1ffebd 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -1496,8 +1496,8 @@ const struct file_operations xfs_file_operations = {
.fallocate = xfs_file_fallocate,
.fadvise = xfs_file_fadvise,
.remap_file_range = xfs_file_remap_range,
- .fop_flags = FOP_MMAP_SYNC | FOP_BUFFER_RASYNC | FOP_BUFFER_WASYNC |
- FOP_DIO_PARALLEL_WRITE,
+ .fop_flags = FOP_MMAP_SYNC | FOP_BUFFER_RASYNC |
+ FOP_BUFFER_WASYNC | FOP_DIO_PARALLEL_WRITE,
};
const struct file_operations xfs_dir_file_operations = {
@@ -1510,6 +1510,6 @@ const struct file_operations xfs_dir_file_operations = {
.compat_ioctl = xfs_file_compat_ioctl,
#endif
.fsync = xfs_dir_fsync,
- .fop_flags = FOP_MMAP_SYNC | FOP_BUFFER_RASYNC | FOP_BUFFER_WASYNC |
- FOP_DIO_PARALLEL_WRITE,
+ .fop_flags = FOP_MMAP_SYNC | FOP_BUFFER_RASYNC |
+ FOP_BUFFER_WASYNC | FOP_DIO_PARALLEL_WRITE,
};
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] xfs: drop fop_flags for directories
2024-04-23 12:46 xfs fixups for the fop_flags conversion Christoph Hellwig
2024-04-23 12:46 ` [PATCH 1/3] xfs: fix overly long line in the file_operations Christoph Hellwig
@ 2024-04-23 12:46 ` Christoph Hellwig
2024-04-23 12:46 ` [PATCH 3/3] xfs: don't call xfs_file_open from xfs_dir_open Christoph Hellwig
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2024-04-23 12:46 UTC (permalink / raw)
To: Christian Brauner, Chandan Babu R, Darrick J. Wong
Cc: linux-xfs, linux-kernel
Directories have non of the capabilities, so drop the flags. Note that
the current state is harmless as no one actually checks for the flags
either.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_file.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index c6b6809c1ffebd..4415d0f3bbc51b 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -1510,6 +1510,4 @@ const struct file_operations xfs_dir_file_operations = {
.compat_ioctl = xfs_file_compat_ioctl,
#endif
.fsync = xfs_dir_fsync,
- .fop_flags = FOP_MMAP_SYNC | FOP_BUFFER_RASYNC |
- FOP_BUFFER_WASYNC | FOP_DIO_PARALLEL_WRITE,
};
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] xfs: don't call xfs_file_open from xfs_dir_open
2024-04-23 12:46 xfs fixups for the fop_flags conversion Christoph Hellwig
2024-04-23 12:46 ` [PATCH 1/3] xfs: fix overly long line in the file_operations Christoph Hellwig
2024-04-23 12:46 ` [PATCH 2/3] xfs: drop fop_flags for directories Christoph Hellwig
@ 2024-04-23 12:46 ` Christoph Hellwig
2024-04-24 3:33 ` xfs fixups for the fop_flags conversion Darrick J. Wong
2024-04-24 12:49 ` Christian Brauner
4 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2024-04-23 12:46 UTC (permalink / raw)
To: Christian Brauner, Chandan Babu R, Darrick J. Wong
Cc: linux-xfs, linux-kernel
Directories do not support direct I/O and thus no non-blocking direct
I/O either. Open code the shutdown check and call to generic_file_open
instead.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 4415d0f3bbc51b..2ce302b4885f53 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -1243,7 +1243,9 @@ xfs_dir_open(
unsigned int mode;
int error;
- error = xfs_file_open(inode, file);
+ if (xfs_is_shutdown(ip->i_mount))
+ return -EIO;
+ error = generic_file_open(inode, file);
if (error)
return error;
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: xfs fixups for the fop_flags conversion
2024-04-23 12:46 xfs fixups for the fop_flags conversion Christoph Hellwig
` (2 preceding siblings ...)
2024-04-23 12:46 ` [PATCH 3/3] xfs: don't call xfs_file_open from xfs_dir_open Christoph Hellwig
@ 2024-04-24 3:33 ` Darrick J. Wong
2024-04-24 12:49 ` Christian Brauner
4 siblings, 0 replies; 6+ messages in thread
From: Darrick J. Wong @ 2024-04-24 3:33 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Christian Brauner, Chandan Babu R, linux-xfs, linux-kernel
On Tue, Apr 23, 2024 at 02:46:05PM +0200, Christoph Hellwig wrote:
> Hi all,
>
> this series against Christian's vfs.misc branch fixes up pointless
> harmless but pointless over-declaration of capabilities for XFS
> directories.
>
> Christian: the first patch would make sense to just fold into the
> original fop_flags conversion if you're still rebasing the branch.
All three patches look good to me,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
>
> xfs_file.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: xfs fixups for the fop_flags conversion
2024-04-23 12:46 xfs fixups for the fop_flags conversion Christoph Hellwig
` (3 preceding siblings ...)
2024-04-24 3:33 ` xfs fixups for the fop_flags conversion Darrick J. Wong
@ 2024-04-24 12:49 ` Christian Brauner
4 siblings, 0 replies; 6+ messages in thread
From: Christian Brauner @ 2024-04-24 12:49 UTC (permalink / raw)
To: Chandan Babu R, Darrick J. Wong, Christoph Hellwig
Cc: Christian Brauner, linux-xfs, linux-kernel
On Tue, 23 Apr 2024 14:46:05 +0200, Christoph Hellwig wrote:
> this series against Christian's vfs.misc branch fixes up pointless
> harmless but pointless over-declaration of capabilities for XFS
> directories.
>
> Christian: the first patch would make sense to just fold into the
> original fop_flags conversion if you're still rebasing the branch.
>
> [...]
Thanks for the fixes! I didn't fold because it would rebase a lot of
other stuff which I'd like to avoid. :/
---
Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc
[1/3] xfs: fix overly long line in the file_operations
https://git.kernel.org/vfs/vfs/c/19e048641bc6
[2/3] xfs: drop fop_flags for directories
https://git.kernel.org/vfs/vfs/c/f50805713a6e
[3/3] xfs: don't call xfs_file_open from xfs_dir_open
https://git.kernel.org/vfs/vfs/c/652efdeca5b1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-24 12:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-23 12:46 xfs fixups for the fop_flags conversion Christoph Hellwig
2024-04-23 12:46 ` [PATCH 1/3] xfs: fix overly long line in the file_operations Christoph Hellwig
2024-04-23 12:46 ` [PATCH 2/3] xfs: drop fop_flags for directories Christoph Hellwig
2024-04-23 12:46 ` [PATCH 3/3] xfs: don't call xfs_file_open from xfs_dir_open Christoph Hellwig
2024-04-24 3:33 ` xfs fixups for the fop_flags conversion Darrick J. Wong
2024-04-24 12:49 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox