Re: [f2fs-dev] [PATCH] f2fs: use flush command instead of FUA for zoned device

2022-04-19 Thread Christoph Hellwig
On Tue, Apr 19, 2022 at 02:57:03PM -0700, Jaegeuk Kim wrote: > The block layer for zoned disk can reorder the FUA'ed IOs. Let's use flush > command to keep the write order. The block layer can reorder all commands. Given that FUA only affects the command itself that should not matter. What is th

Re: [f2fs-dev] [PATCH v4 3/8] xfs: only call posix_acl_create under CONFIG_XFS_POSIX_ACL

2022-04-19 Thread Christoph Hellwig
A nitpick in addition to the comments from Christian: Please wrap your commit messages after 73 characters. The very long lines make them rather unreadable. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourcef

Re: [f2fs-dev] Baseline for f2fs

2022-04-19 Thread Luis Chamberlain
On Tue, Apr 19, 2022 at 4:26 PM Luis Chamberlain wrote: > Oh... so this is not upstream... I see.. ok hrm.. Any plans to try to upstream your delta? Luis ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.source

Re: [f2fs-dev] [PATCH 2/2] f2fs: keep io_flags to avoid IO split due to different op_flags in two fio holders

2022-04-19 Thread Chao Yu
On 2022/4/20 6:47, Jaegeuk Kim wrote: On 04/17, Chao Yu wrote: On 2022/4/13 23:49, Jaegeuk Kim wrote: Let's attach io_flags to bio only, so that we can merge IOs given original io_flags only. Fixes: 64bf0eef0171 ("f2fs: pass the bio operation to bio_alloc_bioset") Nice catch. Wasn't this bu

Re: [f2fs-dev] [PATCH v4 5/8] f2fs: Remove useless NULL assign value for acl and default_acl

2022-04-19 Thread xuyang2018...@fujitsu.com
on 2022/4/19 22:02, Christian Brauner wrote: > On Tue, Apr 19, 2022 at 07:47:11PM +0800, Yang Xu wrote: >> Like other use ${fs}_init_acl and posix_acl_create filesystem, we don't >> need to assign NULL for acl and default_acl pointer because f2fs_acl_create >> will do this job. So remove it. >> >>

Re: [f2fs-dev] [PATCH v4 4/8] NFSv3: only do posix_acl_create under CONFIG_NFS_V3_ACL

2022-04-19 Thread xuyang2018...@fujitsu.com
on 2022/4/19 22:11, Trond Myklebust wrote: > On Tue, 2022-04-19 at 15:59 +0200, Christian Brauner wrote: >> On Tue, Apr 19, 2022 at 07:47:10PM +0800, Yang Xu wrote: >>> Since nfs3_proc_create/nfs3_proc_mkdir/nfs3_proc_mknod these rpc >>> ops are called >>> by nfs_create/nfs_mkdir/nfs_mkdir these in

Re: [f2fs-dev] [PATCH v4 1/8] fs: move sgid strip operation from inode_init_owner into inode_sgid_strip

2022-04-19 Thread xuyang2018...@fujitsu.com
on 2022/4/19 22:05, Christian Brauner wrote: > On Tue, Apr 19, 2022 at 07:47:07PM +0800, Yang Xu wrote: >> This has no functional change. Just create and export inode_sgid_strip api >> for >> the subsequent patch. This function is used to strip S_ISGID mode when init >> a new inode. >> >> Acked-by

Re: [f2fs-dev] [PATCH v4 7/8] fs: strip file's S_ISGID mode on vfs instead of on underlying filesystem

2022-04-19 Thread xuyang2018...@fujitsu.com
on 2022/4/19 22:09, Christian Brauner wrote: > On Tue, Apr 19, 2022 at 07:47:13PM +0800, Yang Xu wrote: >> Currently, vfs only passes mode argument to filesystem, then use >> inode_init_owner() >> to strip S_ISGID. Some filesystem(ie ext4/btrfs) will call inode_init_owner >> firstly, then posxi ac

Re: [f2fs-dev] [PATCH v4 6/8] ntfs3: Use the same order for acl pointer check in ntfs_init_acl

2022-04-19 Thread xuyang2018...@fujitsu.com
on 2022/4/19 22:03, Christian Brauner wrote: > On Tue, Apr 19, 2022 at 07:47:12PM +0800, Yang Xu wrote: >> Like ext4 and other use ${fs}_init_acl filesystem, they all used the >> following >> style >> >> error = posix_acl_create(dir,&inode->i_mode,&default_acl,&acl); >> if (error)

Re: [f2fs-dev] [PATCH v4 3/8] xfs: only call posix_acl_create under CONFIG_XFS_POSIX_ACL

2022-04-19 Thread xuyang2018...@fujitsu.com
on 2022/4/19 21:53, Christian Brauner wrote: > On Tue, Apr 19, 2022 at 07:47:09PM +0800, Yang Xu wrote: >> Since xfs_generic_create only calls xfs_set_acl when enable this kconfig, we >> don't need to call posix_acl_create for the !CONFIG_XFS_POSIX_ACL case. >> >> The previous patch has added missi

Re: [f2fs-dev] Baseline for f2fs

2022-04-19 Thread Luis Chamberlain
On Tue, Apr 19, 2022 at 4:03 PM Jaegeuk Kim wrote: > > On 04/19, Luis Chamberlain wrote: > > On Tue, Apr 19, 2022 at 3:42 PM Jaegeuk Kim wrote: > > > > > > On 04/19, Luis Chamberlain wrote: > > > > I'm going to add automation support for f2fs within kdevops [0]. This > > > > should enable folks t

Re: [f2fs-dev] [PATCH v2] libf2fs: don't allow mkfs / fsck on non power-of-2 zoned devices

2022-04-19 Thread Jaegeuk Kim
On 04/19, Pankaj Raghav wrote: > On 2022-04-13 21:45, Jaegeuk Kim wrote:>> As I explained in the v1 > thread, zoned support for f2fs assumes po2 zone > >> sizes. For e.g., > >> static int __f2fs_issue_discard_zone(struct f2fs_sb_info *sbi, > >>struct block_device *bdev, block_t blkstart

Re: [f2fs-dev] Baseline for f2fs

2022-04-19 Thread Jaegeuk Kim
On 04/19, Luis Chamberlain wrote: > On Tue, Apr 19, 2022 at 3:42 PM Jaegeuk Kim wrote: > > > > On 04/19, Luis Chamberlain wrote: > > > I'm going to add automation support for f2fs within kdevops [0]. This > > > should enable folks to test for regressions for f2fs from scratch with > > > just a few

Re: [f2fs-dev] [PATCH 2/2 v3] f2fs: avoid infinite loop to flush node pages

2022-04-19 Thread Jaegeuk Kim
xfstests/generic/475 can give EIO all the time which give an infinite loop to flush node page like below. Let's avoid it. [16418.518551] Call Trace: [16418.518553] ? dm_submit_bio+0x48/0x400 [16418.518574] ? submit_bio_checks+0x1ac/0x5a0 [16418.525207] __submit_bio+0x1a9/0x230 [16418.525210] ?

Re: [f2fs-dev] [PATCH 2/2] f2fs: keep io_flags to avoid IO split due to different op_flags in two fio holders

2022-04-19 Thread Jaegeuk Kim
On 04/17, Chao Yu wrote: > On 2022/4/13 23:49, Jaegeuk Kim wrote: > > Let's attach io_flags to bio only, so that we can merge IOs given original > > io_flags only. > > > > Fixes: 64bf0eef0171 ("f2fs: pass the bio operation to bio_alloc_bioset") > > Nice catch. > > Wasn't this bug introduced by:

Re: [f2fs-dev] Baseline for f2fs

2022-04-19 Thread Luis Chamberlain
On Tue, Apr 19, 2022 at 3:42 PM Jaegeuk Kim wrote: > > On 04/19, Luis Chamberlain wrote: > > I'm going to add automation support for f2fs within kdevops [0]. This > > should enable folks to test for regressions for f2fs from scratch with > > just a few commands. Before I go ahead and add that I wa

Re: [f2fs-dev] Baseline for f2fs

2022-04-19 Thread Jaegeuk Kim
On 04/19, Luis Chamberlain wrote: > I'm going to add automation support for f2fs within kdevops [0]. This > should enable folks to test for regressions for f2fs from scratch with > just a few commands. Before I go ahead and add that I was curious if > folks have a known baseline of known failures f

[f2fs-dev] [PATCH] f2fs: use flush command instead of FUA for zoned device

2022-04-19 Thread Jaegeuk Kim
The block layer for zoned disk can reorder the FUA'ed IOs. Let's use flush command to keep the write order. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 4 +++- fs/f2fs/node.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index f08e6208

[f2fs-dev] Baseline for f2fs

2022-04-19 Thread Luis Chamberlain
I'm going to add automation support for f2fs within kdevops [0]. This should enable folks to test for regressions for f2fs from scratch with just a few commands. Before I go ahead and add that I was curious if folks have a known baseline of known failures from fstests for f2fs so I can expunge the

Re: [f2fs-dev] [PATCH v4 4/8] NFSv3: only do posix_acl_create under CONFIG_NFS_V3_ACL

2022-04-19 Thread Trond Myklebust
On Tue, 2022-04-19 at 15:59 +0200, Christian Brauner wrote: > On Tue, Apr 19, 2022 at 07:47:10PM +0800, Yang Xu wrote: > > Since nfs3_proc_create/nfs3_proc_mkdir/nfs3_proc_mknod these rpc > > ops are called > > by nfs_create/nfs_mkdir/nfs_mkdir these inode ops, so they are all > > in control of > >

Re: [f2fs-dev] [PATCH v4 7/8] fs: strip file's S_ISGID mode on vfs instead of on underlying filesystem

2022-04-19 Thread Christian Brauner
On Tue, Apr 19, 2022 at 07:47:13PM +0800, Yang Xu wrote: > Currently, vfs only passes mode argument to filesystem, then use > inode_init_owner() > to strip S_ISGID. Some filesystem(ie ext4/btrfs) will call inode_init_owner > firstly, then posxi acl setup, but xfs uses the contrary order. It will a

Re: [f2fs-dev] [PATCH v4 1/8] fs: move sgid strip operation from inode_init_owner into inode_sgid_strip

2022-04-19 Thread Christian Brauner
On Tue, Apr 19, 2022 at 07:47:07PM +0800, Yang Xu wrote: > This has no functional change. Just create and export inode_sgid_strip api for > the subsequent patch. This function is used to strip S_ISGID mode when init > a new inode. > > Acked-by: Christian Brauner (Microsoft) > Signed-off-by: Yang

Re: [f2fs-dev] [PATCH v4 6/8] ntfs3: Use the same order for acl pointer check in ntfs_init_acl

2022-04-19 Thread Christian Brauner
On Tue, Apr 19, 2022 at 07:47:12PM +0800, Yang Xu wrote: > Like ext4 and other use ${fs}_init_acl filesystem, they all used the following > style > >error = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl); >if (error) > return error; > > if (defau

Re: [f2fs-dev] [PATCH v4 5/8] f2fs: Remove useless NULL assign value for acl and default_acl

2022-04-19 Thread Christian Brauner
On Tue, Apr 19, 2022 at 07:47:11PM +0800, Yang Xu wrote: > Like other use ${fs}_init_acl and posix_acl_create filesystem, we don't > need to assign NULL for acl and default_acl pointer because f2fs_acl_create > will do this job. So remove it. > > Signed-off-by: Yang Xu > --- > fs/f2fs/acl.c | 2

Re: [f2fs-dev] [PATCH v4 4/8] NFSv3: only do posix_acl_create under CONFIG_NFS_V3_ACL

2022-04-19 Thread Christian Brauner
On Tue, Apr 19, 2022 at 07:47:10PM +0800, Yang Xu wrote: > Since nfs3_proc_create/nfs3_proc_mkdir/nfs3_proc_mknod these rpc ops are > called > by nfs_create/nfs_mkdir/nfs_mkdir these inode ops, so they are all in control > of > vfs. > > nfs3_proc_setacls does nothing in the !CONFIG_NFS_V3_ACL ca

Re: [f2fs-dev] [PATCH v4 3/8] xfs: only call posix_acl_create under CONFIG_XFS_POSIX_ACL

2022-04-19 Thread Christian Brauner
On Tue, Apr 19, 2022 at 07:47:09PM +0800, Yang Xu wrote: > Since xfs_generic_create only calls xfs_set_acl when enable this kconfig, we > don't need to call posix_acl_create for the !CONFIG_XFS_POSIX_ACL case. > > The previous patch has added missing umask strip for tmpfile, so all creation > path

Re: [f2fs-dev] [PATCH 27/27] direct-io: remove random prefetches

2022-04-19 Thread David Sterba
On Fri, Apr 15, 2022 at 06:52:58AM +0200, Christoph Hellwig wrote: > Randomly poking into block device internals for manual prefetches isn't > exactly a very maintainable thing to do. And none of the performance > criticil direct I/O implementations still use this library function > anyway, so jus

Re: [f2fs-dev] [PATCH 08/27] btrfs: use bdev_max_active_zones instead of open coding it

2022-04-19 Thread Anand Jain
On 4/15/22 12:52, Christoph Hellwig wrote: Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Acked-by: David Sterba LGTM. Reviewed-by: Anand Jain --- fs/btrfs/zoned.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zone

[f2fs-dev] [PATCH v4 5/8] f2fs: Remove useless NULL assign value for acl and default_acl

2022-04-19 Thread Yang Xu
Like other use ${fs}_init_acl and posix_acl_create filesystem, we don't need to assign NULL for acl and default_acl pointer because f2fs_acl_create will do this job. So remove it. Signed-off-by: Yang Xu --- fs/f2fs/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs

[f2fs-dev] [PATCH v4 1/8] fs: move sgid strip operation from inode_init_owner into inode_sgid_strip

2022-04-19 Thread Yang Xu
This has no functional change. Just create and export inode_sgid_strip api for the subsequent patch. This function is used to strip S_ISGID mode when init a new inode. Acked-by: Christian Brauner (Microsoft) Signed-off-by: Yang Xu --- fs/inode.c | 22 ++ include/linu

[f2fs-dev] [PATCH v4 4/8] NFSv3: only do posix_acl_create under CONFIG_NFS_V3_ACL

2022-04-19 Thread Yang Xu
Since nfs3_proc_create/nfs3_proc_mkdir/nfs3_proc_mknod these rpc ops are called by nfs_create/nfs_mkdir/nfs_mkdir these inode ops, so they are all in control of vfs. nfs3_proc_setacls does nothing in the !CONFIG_NFS_V3_ACL case, so we put posix_acl_create under CONFIG_NFS_V3_ACL and it also doesn'

[f2fs-dev] [PATCH v4 2/8] fs: Add missing umask strip in vfs_tmpfile

2022-04-19 Thread Yang Xu
All creation paths except for O_TMPFILE handle umask in the vfs directly if the filesystem doesn't support or enable POSIX ACLs. If the filesystem does then umask handling is deferred until posix_acl_create(). Because, O_TMPFILE misses umask handling in the vfs it will not honor umask settings. Fix

[f2fs-dev] [PATCH v4 3/8] xfs: only call posix_acl_create under CONFIG_XFS_POSIX_ACL

2022-04-19 Thread Yang Xu
Since xfs_generic_create only calls xfs_set_acl when enable this kconfig, we don't need to call posix_acl_create for the !CONFIG_XFS_POSIX_ACL case. The previous patch has added missing umask strip for tmpfile, so all creation paths handle umask in the vfs directly if the filesystem doesn't suppor

[f2fs-dev] [PATCH v4 8/8] ceph: Remove S_ISGID clear code in ceph_finish_async_create

2022-04-19 Thread Yang Xu
Since vfs has stripped S_ISGID in the previous patch, the calltrace as below: vfs:lookup_open ... if (open_flag & O_CREAT) { if (open_flag & O_EXCL) open_flag &= ~O_TRUNC; prepare_mode(mnt_userns, dir->d_inode, &mode);

[f2fs-dev] [PATCH v4 7/8] fs: strip file's S_ISGID mode on vfs instead of on underlying filesystem

2022-04-19 Thread Yang Xu
Currently, vfs only passes mode argument to filesystem, then use inode_init_owner() to strip S_ISGID. Some filesystem(ie ext4/btrfs) will call inode_init_owner firstly, then posxi acl setup, but xfs uses the contrary order. It will affect S_ISGID clear especially we filter S_IXGRP by umask or acl.

[f2fs-dev] [PATCH v4 6/8] ntfs3: Use the same order for acl pointer check in ntfs_init_acl

2022-04-19 Thread Yang Xu
Like ext4 and other use ${fs}_init_acl filesystem, they all used the following style error = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl); if (error) return error; if (default_acl) { error = __ext4_set_acl(handle, inode, ACL_TYPE_

Re: [f2fs-dev] [PATCH v2] libf2fs: don't allow mkfs / fsck on non power-of-2 zoned devices

2022-04-19 Thread Pankaj Raghav
On 2022-04-13 21:45, Jaegeuk Kim wrote:>> As I explained in the v1 thread, zoned support for f2fs assumes po2 zone >> sizes. For e.g., >> static int __f2fs_issue_discard_zone(struct f2fs_sb_info *sbi, >> struct block_device *bdev, block_t blkstart, block_t blklen) >> { >> sector_t