Re: [f2fs-dev] [PATCH] f2fs: fix deadlock in f2f2_add_dentry

2023-08-25 Thread Lizhi Xu via Linux-f2fs-devel
On Fri, 25 Aug 2023 18:41:38, c...@kernel.org wrote: > Can you please check below patch? it has fixed reported issue. > > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev&id=5c13e2388bf3426fd69a89eb46e50469e9624e56 > > Feedback from syzbot: > > https://lore.kernel.or

Re: [f2fs-dev] [PATCH v2 0/29] block: Make blkdev_get_by_*() return handle

2023-08-25 Thread Al Viro
On Fri, Aug 25, 2023 at 03:47:56PM +0200, Jan Kara wrote: > I can see the appeal of not having to introduce the new bdev_handle type > and just using struct file which unifies in-kernel and userspace block > device opens. But I can see downsides too - the last fput() happening from > task work mak

Re: [f2fs-dev] [PATCH RFC v5 00/29] io_uring getdents

2023-08-25 Thread Dave Chinner via Linux-f2fs-devel
On Fri, Aug 25, 2023 at 09:54:02PM +0800, Hao Xu wrote: > From: Hao Xu > > This series introduce getdents64 to io_uring, the code logic is similar > with the snychronized version's. It first try nowait issue, and offload > it to io-wq threads if the first try fails. > > Patch1 and Patch2 are som

[f2fs-dev] [PATCH v2 3/7] f2fs-tools: Refactor f2fs_node struct and friends

2023-08-25 Thread Daniel Rosenberg via Linux-f2fs-devel
This converts inodes, direct nodes, and indirect nodes over to not being based on a 4K page size. f2fs_inode's i_nids field should now be accessed via a macro, as it's location depends on block size. Access to direct nodes and indirect nodes is unchanged. The node footer's location is also based

[f2fs-dev] [PATCH v2 5/7] f2fs-tools: Refactor Summary block struct and friends

2023-08-25 Thread Daniel Rosenberg via Linux-f2fs-devel
This splits off access to the summary block's journal and footer into a macro call, as their location is dependent on block size. Because of this you should use F2FS_BLKSIZE instead of sizeof(struct summary_block) Signed-off-by: Daniel Rosenberg --- fsck/f2fs.h| 4 +-- fsck/fsck.c

[f2fs-dev] [PATCH v2 7/7] f2fs-tools: Support different block sizes

2023-08-25 Thread Daniel Rosenberg via Linux-f2fs-devel
This adds support for 4K and 16K block size using the same binary. mkfs can choose block size via the -b option, with other tools getting the blocksize from the superblock. On mount time, we can't rely on block size for the location for the superblock, since that information is in the superblock.

[f2fs-dev] [PATCH v2 1/7] f2fs-tools: Define constants in terms of BLKSIZE

2023-08-25 Thread Daniel Rosenberg via Linux-f2fs-devel
This converts the various block size based constants to be defined in terms of the block size. This makes it possible to change the block size by changing only F2FS_BLKSIZE_BITS in f2fs_fs.h Signed-off-by: Daniel Rosenberg --- fsck/dir.c | 2 +- fsck/dump.c | 4 +- f

Re: [f2fs-dev] [PATCH 1/7] f2fs-tools: Define constants in terms of BLKSIZE

2023-08-25 Thread Daniel Rosenberg via Linux-f2fs-devel
On Fri, Aug 25, 2023 at 10:39 AM Jaegeuk Kim wrote: > > Hi Daniel, > > f2fs_format_main.c: In function ‘add_default_options’: > f2fs_format_main.c:142:41: error: ‘struct f2fs_configuration’ has no member > named ‘blksize’ > 142 | c.wanted_sector_size = c.blksize; > |

[f2fs-dev] [PATCH v2 6/7] f2fs-tools: Refactor f2fs_dentry_block struct

2023-08-25 Thread Daniel Rosenberg via Linux-f2fs-devel
This moves access to f2fs_dentry_block's dentry list and filename list behind a macro, as their locations depend on block size. Since struct f2fs_dentry_block no longer represents the full block, use F2FS_BLKSIZE instead of sizeof(struct f2fs_dentry_block) Signed-off-by: Daniel Rosenberg --- fs

[f2fs-dev] [PATCH v2 2/7] f2fs-tools: Refactor Orphan Block struct

2023-08-25 Thread Daniel Rosenberg via Linux-f2fs-devel
This splits off access to the orphan block's footer into a macro call as its location is dependent on block size. Because of this, you should use F2FS_BLKSIZE instead of sizeof(struct f2fs_orphan_block) Signed-off-by: Daniel Rosenberg --- fsck/fsck.c | 4 ++-- fsck/main.c | 1 + in

[f2fs-dev] [PATCH v2 4/7] f2fs-tools: Refactor SIT/NAT block structs

2023-08-25 Thread Daniel Rosenberg via Linux-f2fs-devel
This converts f2fs_nat_block and f2fs_sit_block to be variable length arrays. This does not change the way they are accessed, but removes a misleading statment that these sizes are fixed, as opposed to deriving from F2FS_BLKSIZE Signed-off-by: Daniel Rosenberg --- include/f2fs_fs.h | 20

[f2fs-dev] [PATCH v2 0/7] Add 16K Support for f2fs-tools

2023-08-25 Thread Daniel Rosenberg via Linux-f2fs-devel
This adds support for different block sizes to f2fs-tools. The first patch redefines all block size based constants to be based on the block size. After this patch, you should be able to compile a version of f2fs-tools that works for a given blocksize by just setting F2FS_BLKSIZE_BITS in f2fs_fs.h

Re: [f2fs-dev] [PATCH 25/29] xfs: support nowait for xfs_buf_item_init()

2023-08-25 Thread Dave Chinner via Linux-f2fs-devel
On Fri, Aug 25, 2023 at 09:54:27PM +0800, Hao Xu wrote: > From: Hao Xu > > support nowait for xfs_buf_item_init() and error out -EAGAIN to > _xfs_trans_bjoin() when it would block. > > Signed-off-by: Hao Xu > --- > fs/xfs/xfs_buf_item.c | 9 +++-- > fs/xfs/xfs_buf_item.h |

Re: [f2fs-dev] [PATCH 24/29] xfs: support nowait for xfs_buf_read_map()

2023-08-25 Thread Dave Chinner via Linux-f2fs-devel
On Fri, Aug 25, 2023 at 09:54:26PM +0800, Hao Xu wrote: > From: Hao Xu > > This causes xfstests generic/232 hung in umount process, waiting for ail > push, so I comment it for now, need some hints from xfs folks. > Not a real patch. > > Signed-off-by: Hao Xu > --- > fs/xfs/xfs_buf.c | 7 ++

Re: [f2fs-dev] [PATCH 28/29] xfs: support nowait semantics for xc_ctx_lock in xlog_cil_commit()

2023-08-25 Thread Dave Chinner via Linux-f2fs-devel
On Fri, Aug 25, 2023 at 09:54:30PM +0800, Hao Xu wrote: > From: Hao Xu > > Apply trylock logic for xc_ctx_lock in xlog_cil_commit() in nowait > case and error out -EAGAIN for xlog_cil_commit(). Again, fundamentally broken. Any error from xlog_cil_commit() will result in a filesystem shutdown as

Re: [f2fs-dev] [PATCH 26/29] xfs: return -EAGAIN when nowait meets sync in transaction commit

2023-08-25 Thread Dave Chinner via Linux-f2fs-devel
On Fri, Aug 25, 2023 at 09:54:28PM +0800, Hao Xu wrote: > From: Hao Xu > > if the log transaction is a sync one, let's fail the nowait try and > return -EAGAIN directly since sync transaction means blocked by IO. > > Signed-off-by: Hao Xu > --- > fs/xfs/xfs_trans.c | 14 +- > 1 fil

Re: [f2fs-dev] [PATCH 02/29] xfs: rename XBF_TRYLOCK to XBF_NOWAIT

2023-08-25 Thread Dave Chinner via Linux-f2fs-devel
On Fri, Aug 25, 2023 at 09:54:04PM +0800, Hao Xu wrote: > From: Hao Xu > > XBF_TRYLOCK means we need lock but don't block on it, Yes. > we can use it to > stand for not waiting for memory allcation. Rename XBF_TRYLOCK to > XBF_NOWAIT, which is more generic. No. Not only can XBF_TRYLOCK requi

Re: [f2fs-dev] [PATCH 1/7] f2fs-tools: Define constants in terms of BLKSIZE

2023-08-25 Thread Jaegeuk Kim
Hi Daniel, f2fs_format_main.c: In function ‘add_default_options’: f2fs_format_main.c:142:41: error: ‘struct f2fs_configuration’ has no member named ‘blksize’ 142 | c.wanted_sector_size = c.blksize; | ^ make[2]: *** [Makefile:516: f2f

[f2fs-dev] Patchwork summary for: f2fs

2023-08-25 Thread patchwork-bot+f2fs
Hello: The following patches were marked "accepted", because they were applied to jaegeuk/f2fs.git (dev): Series: [f2fs-dev,1/3] f2fs: clean up error handling in sanity_check_{compress_, }inode() Submitter: Chao Yu Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2

Re: [f2fs-dev] [PATCH 1/3] f2fs: clean up error handling in sanity_check_{compress_, }inode()

2023-08-25 Thread patchwork-bot+f2fs
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Mon, 21 Aug 2023 23:22:23 +0800 you wrote: > In sanity_check_{compress_,}inode(), it doesn't need to set SBI_NEED_FSCK > in each error case, instead, we can set the flag in do_read_inode() only > once when sanity_check_i

Re: [f2fs-dev] [PATCH RFC v5 00/29] io_uring getdents

2023-08-25 Thread Darrick J. Wong
On Fri, Aug 25, 2023 at 09:54:02PM +0800, Hao Xu wrote: > From: Hao Xu > > This series introduce getdents64 to io_uring, the code logic is similar > with the snychronized version's. It first try nowait issue, and offload > it to io-wq threads if the first try fails. NAK on the entire series unti

Re: [f2fs-dev] [PATCH 12/29] xfs: enforce GFP_NOIO implicitly during nowait time update

2023-08-25 Thread Matthew Wilcox
On Fri, Aug 25, 2023 at 09:54:14PM +0800, Hao Xu wrote: > +++ b/fs/xfs/xfs_iops.c > @@ -1037,6 +1037,8 @@ xfs_vn_update_time( > int log_flags = XFS_ILOG_TIMESTAMP; > struct xfs_trans*tp; > int error; > + int o

Re: [f2fs-dev] [PATCH 22/29] xfs: comment page allocation for nowait case in xfs_buf_find_insert()

2023-08-25 Thread Matthew Wilcox
On Fri, Aug 25, 2023 at 09:54:24PM +0800, Hao Xu wrote: > @@ -633,6 +633,8 @@ xfs_buf_find_insert( >* allocate the memory from the heap to minimise memory usage. If we >* can't get heap memory for these small buffers, we fall back to using >* the page allocator. > + * x

[f2fs-dev] [PATCH 29/29] io_uring: add support for getdents

2023-08-25 Thread Hao Xu
From: Hao Xu This add support for getdents64 to io_uring, acting exactly like the syscall: the directory is iterated from it's current's position as stored in the file struct, and the file's position is updated exactly as if getdents64 had been called. For filesystems that support NOWAIT in iter

[f2fs-dev] [PATCH 28/29] xfs: support nowait semantics for xc_ctx_lock in xlog_cil_commit()

2023-08-25 Thread Hao Xu
From: Hao Xu Apply trylock logic for xc_ctx_lock in xlog_cil_commit() in nowait case and error out -EAGAIN for xlog_cil_commit(). Signed-off-by: Hao Xu --- fs/xfs/xfs_log_cil.c | 12 ++-- fs/xfs/xfs_log_priv.h | 2 +- fs/xfs/xfs_trans.c| 4 +++- 3 files changed, 14 insertions(+)

[f2fs-dev] [PATCH 27/29] xfs: add a comment for xlog_kvmalloc()

2023-08-25 Thread Hao Xu
From: Hao Xu vmalloc() always succeed in 64 bit system? Not a real patch. Signed-off-by: Hao Xu --- fs/xfs/xfs_log_cil.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index f17c1799b3c4..b31830ee36dd 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/f

[f2fs-dev] [PATCH 26/29] xfs: return -EAGAIN when nowait meets sync in transaction commit

2023-08-25 Thread Hao Xu
From: Hao Xu if the log transaction is a sync one, let's fail the nowait try and return -EAGAIN directly since sync transaction means blocked by IO. Signed-off-by: Hao Xu --- fs/xfs/xfs_trans.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/fs/xfs/xfs_trans.

[f2fs-dev] [PATCH 25/29] xfs: support nowait for xfs_buf_item_init()

2023-08-25 Thread Hao Xu
From: Hao Xu support nowait for xfs_buf_item_init() and error out -EAGAIN to _xfs_trans_bjoin() when it would block. Signed-off-by: Hao Xu --- fs/xfs/xfs_buf_item.c | 9 +++-- fs/xfs/xfs_buf_item.h | 2 +- fs/xfs/xfs_buf_item_recover.c | 2 +- fs/xfs/xfs_trans_buf.c

[f2fs-dev] [PATCH 24/29] xfs: support nowait for xfs_buf_read_map()

2023-08-25 Thread Hao Xu
From: Hao Xu This causes xfstests generic/232 hung in umount process, waiting for ail push, so I comment it for now, need some hints from xfs folks. Not a real patch. Signed-off-by: Hao Xu --- fs/xfs/xfs_buf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs

[f2fs-dev] [PATCH 22/29] xfs: comment page allocation for nowait case in xfs_buf_find_insert()

2023-08-25 Thread Hao Xu
From: Hao Xu Add comments for page allocation in nowait case in xfs_buf_find_insert() Signed-off-by: Hao Xu --- fs/xfs/xfs_buf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index eb3cd7702545..57bdc4c5dde1 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs

[f2fs-dev] [PATCH 23/29] xfs: don't print warn info for -EAGAIN error in xfs_buf_get_map()

2023-08-25 Thread Hao Xu
From: Hao Xu -EAGAIN is internal error to indicate a retry, no needs to print a warn. Signed-off-by: Hao Xu --- fs/xfs/xfs_buf.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 57bdc4c5dde1..cdad80e1ae25 100644 --- a/fs/xfs/x

[f2fs-dev] [PATCH 21/29] xfs: return -EAGAIN when bulk memory allocation fails in nowait case

2023-08-25 Thread Hao Xu
From: Hao Xu Rather than wait for a moment and retry, we return -EAGAIN when we fail to allocate bulk memory in xfs_buf_alloc_pages() in nowait case. Signed-off-by: Hao Xu --- fs/xfs/xfs_buf.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index a6

[f2fs-dev] [PATCH 20/29] xfs: distinguish error type of memory allocation failure for nowait case

2023-08-25 Thread Hao Xu
From: Hao Xu Previously, if we fail to get the memory we need, -ENOMEM is returned. It can be -EAGAIN now since we support nowait now. Return the latter when it is the case. Involved functions are: _xfs_buf_map_pages(), xfs_buf_get_maps(), xfs_buf_alloc_kmem() and xfs_buf_alloc_pages(). Signed-

[f2fs-dev] [PATCH 19/29] xfs: support nowait memory allocation in _xfs_buf_alloc()

2023-08-25 Thread Hao Xu
From: Hao Xu Choose different gfp flags to support nowait memory allocation in _xfs_buf_alloc(). Signed-off-by: Hao Xu --- fs/xfs/xfs_buf.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 9f84bc3b802c..8b800ce28996 100644 ---

[f2fs-dev] [PATCH 17/29] xfs: make xfs_trans_ijoin() error out -EAGAIN

2023-08-25 Thread Hao Xu
From: Hao Xu Change return value of xfs_trans_ijoin() to error out -EAGAIN. Signed-off-by: Hao Xu --- fs/xfs/libxfs/xfs_trans_inode.c | 13 + fs/xfs/xfs_iops.c | 4 +++- fs/xfs/xfs_trans.h | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff

[f2fs-dev] [PATCH 16/29] xfs: add nowait parameter for xfs_inode_item_init()

2023-08-25 Thread Hao Xu
From: Hao Xu Add nowait parameter for xfs_inode_item_init() to support nowait semantics. Signed-off-by: Hao Xu --- fs/xfs/libxfs/xfs_trans_inode.c | 3 ++- fs/xfs/xfs_inode_item.c | 12 fs/xfs/xfs_inode_item.h | 3 ++- 3 files changed, 12 insertions(+), 6 deletio

[f2fs-dev] [PATCH 18/29] xfs: set XBF_NOWAIT for xfs_buf_read_map if necessary

2023-08-25 Thread Hao Xu
From: Hao Xu Set XBF_NOWAIT for xfs_buf_read_map() if necessary. Signed-off-by: Hao Xu --- fs/xfs/xfs_trans_buf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index 6549e50d852c..016371f58f26 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/

[f2fs-dev] [PATCH 15/29] xfs: don't wait for free space in xlog_grant_head_check() in nowait case

2023-08-25 Thread Hao Xu
From: Hao Xu Don't sleep and wait for more space for a log ticket in xlog_grant_head_check() when it is in nowait case. Signed-off-by: Hao Xu --- fs/xfs/xfs_log.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 90fbb

[f2fs-dev] [PATCH 14/29] xfs: support nowait for xfs_log_reserve()

2023-08-25 Thread Hao Xu
From: Hao Xu Support nowait logic for xfs_log_reserve(), including add a nowait boolean parameter and error out -EAGAIN for ticket allocation. Signed-off-by: Hao Xu --- fs/xfs/xfs_log.c | 18 +- fs/xfs/xfs_log.h | 5 +++-- fs/xfs/xfs_log_cil.c | 2 +- fs/xfs/xfs_lo

[f2fs-dev] [PATCH 13/29] xfs: make xfs_trans_alloc() support nowait semantics

2023-08-25 Thread Hao Xu
From: Hao Xu There are locks in xfs_trans_alloc(), spot them and apply trylock logic. Make them return -EAGAIN when it would block. To achieve this, add nowait parameter for those functions in the path. Besides, add a generic transaction flag XFS_TRANS_NOWAIT to deliver nowait info. Signed-off-b

[f2fs-dev] [PATCH 12/29] xfs: enforce GFP_NOIO implicitly during nowait time update

2023-08-25 Thread Hao Xu
From: Hao Xu Enforce GFP_NOIO logic implicitly by set pflags if we are in nowait time update process. Nowait semantics means no waiting for IO, therefore GFP_NOIO is needed. Signed-off-by: Hao Xu --- fs/xfs/xfs_iops.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-

[f2fs-dev] [PATCH 11/29] vfs: trylock inode->i_rwsem in iterate_dir() to support nowait

2023-08-25 Thread Hao Xu
From: Hao Xu Trylock inode->i_rwsem in iterate_dir() to support nowait semantics and error out -EAGAIN when there is contention. Signed-off-by: Hao Xu --- fs/readdir.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/fs/readdir.c b/fs/readdir.c index 64

[f2fs-dev] [PATCH 10/29] vfs: add S_NOWAIT for nowait time update

2023-08-25 Thread Hao Xu
From: Hao Xu Add a new time flag S_NOWAIT to support nowait time update. Deliver it to specific filesystem and error out -EAGAIN when it would block. Signed-off-by: Hao Xu --- fs/inode.c | 9 + fs/xfs/xfs_iops.c | 8 +++- include/linux/fs.h | 1 + 3 files changed, 13 inser

[f2fs-dev] [PATCH 09/29] vfs: move file_accessed() to the beginning of iterate_dir()

2023-08-25 Thread Hao Xu
From: Hao Xu Move file_accessed() to the beginning of iterate_dir() so that we don't need to rollback all the work done when file_accessed() returns -EAGAIN at the end of getdents. Signed-off-by: Hao Xu --- fs/readdir.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/

[f2fs-dev] [PATCH 08/29] vfs: add nowait parameter for file_accessed()

2023-08-25 Thread Hao Xu
From: Hao Xu Add a boolean parameter for file_accessed() to support nowait semantics. Currently it is true only with io_uring as its initial caller. Signed-off-by: Hao Xu --- arch/s390/hypfs/inode.c | 2 +- block/fops.c| 2 +- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c

[f2fs-dev] [PATCH 07/29] vfs: add a nowait parameter for touch_atime()

2023-08-25 Thread Hao Xu
From: Hao Xu Add a nowait boolean parameter for touch_atime() to support nowait semantics. It is true only when io_uring is the initial caller. Signed-off-by: Hao Xu --- fs/cachefiles/namei.c | 2 +- fs/ecryptfs/file.c| 4 ++-- fs/inode.c| 7 --- fs/namei.c| 4 +

[f2fs-dev] [PATCH 06/29] vfs: add file_pos_unlock() for io_uring usage

2023-08-25 Thread Hao Xu
From: Hao Xu Add a helper to unlock f_pos_lock without any condition. Introduce this since io_uring handles f_pos_lock not with a fd struct, thus FDPUT_POS_UNLOCK isn't used. Signed-off-by: Hao Xu --- include/linux/file.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/f

[f2fs-dev] [PATCH 05/29] vfs: add a vfs helper for io_uring file pos lock

2023-08-25 Thread Hao Xu
From: Hao Xu Add a vfs helper file_pos_lock_nowait() for io_uring usage. The function have conditional nowait logic, i.e. if nowait is needed, return -EAGAIN when trylock fails. Signed-off-by: Hao Xu --- fs/file.c| 13 + include/linux/file.h | 2 ++ 2 files changed, 15

[f2fs-dev] [PATCH 04/29] vfs: add nowait flag for struct dir_context

2023-08-25 Thread Hao Xu
From: Hao Xu The flags will allow passing DIR_CONTEXT_F_NOWAIT to iterate() implementations that support it (as signaled through FMODE_NWAIT in file->f_mode) Notes: - considered using IOCB_NOWAIT but if we add more flags later it would be confusing to keep track of which values are valid, use de

[f2fs-dev] [PATCH 03/29] xfs: add NOWAIT semantics for readdir

2023-08-25 Thread Hao Xu
From: Hao Xu Implement NOWAIT semantics for readdir. Return EAGAIN error to the caller if it would block, like failing to get locks, or going to do IO. Co-developed-by: Dave Chinner Signed-off-by: Dave Chinner Signed-off-by: Hao Xu [fixes deadlock issue, tweak code style] --- fs/xfs/libxfs/x

[f2fs-dev] [PATCH 02/29] xfs: rename XBF_TRYLOCK to XBF_NOWAIT

2023-08-25 Thread Hao Xu
From: Hao Xu XBF_TRYLOCK means we need lock but don't block on it, we can use it to stand for not waiting for memory allcation. Rename XBF_TRYLOCK to XBF_NOWAIT, which is more generic. Signed-off-by: Hao Xu --- fs/xfs/libxfs/xfs_alloc.c | 2 +- fs/xfs/libxfs/xfs_attr_remote.c | 2 +- fs/

[f2fs-dev] [PATCH 01/29] fs: split off vfs_getdents function of getdents64 syscall

2023-08-25 Thread Hao Xu
From: Dominique Martinet This splits off the vfs_getdents function from the getdents64 system call. This will allow io_uring to call the vfs_getdents function. Co-developed-by: Stefan Roesch Signed-off-by: Stefan Roesch Signed-off-by: Dominique Martinet Signed-off-by: Hao Xu --- fs/internal

[f2fs-dev] [PATCH RFC v5 00/29] io_uring getdents

2023-08-25 Thread Hao Xu
From: Hao Xu This series introduce getdents64 to io_uring, the code logic is similar with the snychronized version's. It first try nowait issue, and offload it to io-wq threads if the first try fails. Patch1 and Patch2 are some preparation Patch3 supports nowait for xfs getdents code Patch4-11 a

Re: [f2fs-dev] [PATCH v2 0/29] block: Make blkdev_get_by_*() return handle

2023-08-25 Thread Jan Kara
On Fri 25-08-23 02:58:43, Al Viro wrote: > On Fri, Aug 11, 2023 at 01:04:31PM +0200, Jan Kara wrote: > > Hello, > > > > this is a v2 of the patch series which implements the idea of > > blkdev_get_by_*() > > calls returning bdev_handle which is then passed to blkdev_put() [1]. This > > makes the

Re: [f2fs-dev] [PATCH v3 0/29] block: Make blkdev_get_by_*() return handle

2023-08-25 Thread Christian Brauner
On Wed, Aug 23, 2023 at 12:48:11PM +0200, Jan Kara wrote: > Hello, > > this is a v3 of the patch series which implements the idea of > blkdev_get_by_*() > calls returning bdev_handle which is then passed to blkdev_put() [1]. This > makes the get and put calls for bdevs more obviously matching and

Re: [f2fs-dev] [PATCH 23/29] f2fs: Convert to bdev_open_by_dev/path()

2023-08-25 Thread Christian Brauner
On Wed, Aug 23, 2023 at 12:48:34PM +0200, Jan Kara wrote: > Convert f2fs to use bdev_open_by_dev/path() and pass the handle around. > > CC: Jaegeuk Kim > CC: Chao Yu > CC: linux-f2fs-devel@lists.sourceforge.net > Acked-by: Christoph Hellwig > Signed-off-by: Jan Kara > --- Looks good to me, Re

Re: [f2fs-dev] [PATCH] f2fs: fix deadlock in f2f2_add_dentry

2023-08-25 Thread Chao Yu
On 2023/8/25 13:37, Lizhi Xu wrote: There are two paths: 1. f2fs_add_dentry->f2fs_down_read->f2fs_add_inline_entry->down_write-> up_write->f2fs_up_read 2. f2fs_add_dentry->f2fs_add_regular_entry->down_write-> f2fs_init_inode_metadata->f2fs_down_read->f2fs_up_read->up_write Force order lo