Re: [f2fs-dev] [PATCH v3] f2fs: introduce flush_policy sysfs entry

2025-08-12 Thread Christoph Hellwig
On Tue, Aug 12, 2025 at 03:53:54PM +0800, Chao Yu wrote: > > What did you use before? At least for older qemu the default was > > buffered I/O, which can lead to very expensive fua or flush calls. > > Previously, I didn't use any cache= option, as manual described, it > should equal to cache=wrte

Re: [f2fs-dev] [PATCH v3] f2fs: introduce flush_policy sysfs entry

2025-08-12 Thread Christoph Hellwig
On Tue, Aug 12, 2025 at 02:28:46PM +0800, Chao Yu wrote: > BTW, I suffered extremely long latency of checkpoint which may block every > update operations when testing generic/299 w/ mode=lfs mount option in qemu, > then I propose to use PREFLUSH instead of FUA to resolve this issue. > > "F2FS-fs (

Re: [f2fs-dev] [PATCH v3] f2fs: introduce flush_policy sysfs entry

2025-08-11 Thread Christoph Hellwig
On Thu, Aug 07, 2025 at 11:48:38AM +0800, Chao Yu wrote: > This patch introduces a new sysfs entry /sys/fs/f2fs//flush_policy > in order to tune performance of f2fs data flush flow. > > For example, checkpoint will use REQ_FUA to persist CP metadata, however, > some kind device has bad performance

Re: [f2fs-dev] [PATCH v5 00/13] Move fscrypt and fsverity info out of struct inode

2025-08-10 Thread Christoph Hellwig
On Sun, Aug 10, 2025 at 10:03:11AM -0700, Eric Biggers wrote: > I assume you actually still mean fsverity, not fscrypt. Yes, sorry. > First, it would > be helpful not to use one solution for fscrypt and a totally different > solution for fsverity, as that would increase the maintenance cost well

Re: [f2fs-dev] [PATCH v5 00/13] Move fscrypt and fsverity info out of struct inode

2025-08-10 Thread Christoph Hellwig
On Sun, Aug 10, 2025 at 12:56:53AM -0700, Eric Biggers wrote: > This is a cleaned-up implementation of moving the i_crypt_info and > i_verity_info pointers out of 'struct inode' and into the fs-specific > part of the inode, as proposed previously by Christian at > https://lore.kernel.org/r/20250723

Re: [f2fs-dev] [PATCH] fs: export some tracepoints for iotrace

2025-07-31 Thread Christoph Hellwig
On Wed, Jul 30, 2025 at 12:03:45AM +0800, Xiang Gao wrote: > From: gaoxiang17 > > Signed-off-by: gaoxiang17 Random exports without a user of even explanation are weird. What up with Android folks that this kind of junk keeps getting sent over and over? __

Re: [f2fs-dev] [PATCH v4 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-07-10 Thread Christoph Hellwig
On Mon, Jul 07, 2025 at 05:45:32PM -0700, Darrick J. Wong wrote: > On second thought -- it's weird that you'd flush the filesystem and > shrink the inode/dentry caches in a "your device went away" handler. > Fancy filesystems like bcachefs and btrfs would likely just shift IO to > a different bdev,

Re: [f2fs-dev] [PATCH v4 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-07-10 Thread Christoph Hellwig
On Tue, Jul 08, 2025 at 09:55:14AM +0200, Christian Brauner wrote: > I think letting filesystems implement their own holder ops should be > avoided if we can. Christoph may chime in here. Ccing helps for that.. > > I have no appettite for > exporting stuff like get_bdev_super() unless absolutely

Re: [f2fs-dev] 回复: [PATCH v3 1/2] libfs: reduce the number of memory allocations in generic_ci_match

2025-07-08 Thread Christoph Hellwig
On Tue, Jul 08, 2025 at 10:36:07AM +0800, ywen.chen wrote: > 1. Use the latest version of the fsck.f2fs tool to correct > the file system. > 2. Use a relatively new version of the kernel. (For example, > linear search cannot be turned off in v6.6) > > > The performance gain of this commit is very

Re: [f2fs-dev] [PATCH 00/13] Parallelizing filesystem writeback

2025-07-07 Thread Christoph Hellwig
On Fri, Jul 04, 2025 at 12:32:51PM +0530, Kundan Kumar wrote: > bdi is tied to the underlying block device, and helps for device > bandwidth specific throttling, dirty ratelimiting etc. Making it per > superblock will need duplicating the device specific throttling, ratelimiting > to superblock, wh

Re: [f2fs-dev] [PATCH v3 1/2] libfs: reduce the number of memory allocations in generic_ci_match

2025-07-06 Thread Christoph Hellwig
On Thu, Jul 03, 2025 at 11:02:59PM -0700, Eric Biggers wrote: [Can you trim your replies to the usual 73 characters? The long lines make them quite hard to read without first reflowing them] > The real problem is, once again, the legacy crypto_skcipher API, which > requires > that the source/de

Re: [f2fs-dev] [PATCH 00/13] Parallelizing filesystem writeback

2025-07-03 Thread Christoph Hellwig
On Wed, Jul 02, 2025 at 11:43:12AM -0700, Darrick J. Wong wrote: > > On a spinning disk, random IO bandwidth remains unchanged, while sequential > > IO performance declines. However, setting nr_wb_ctx = 1 via configurable > > writeback(planned in next version) eliminates the decline. > > > > echo

Re: [f2fs-dev] [PATCH] f2fs: improve the performance of f2fs_lookup

2025-07-03 Thread Christoph Hellwig
On Thu, Jul 03, 2025 at 04:21:30PM +0800, Yuwen Chen wrote: > On the Android system, the file creation operation will call > the f2fs_lookup function. When there are too many files in a > directory, the generic_ci_match operation will be called > repeatedly in large quantities. In extreme cases, th

Re: [f2fs-dev] [PATCH v2 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-07-01 Thread Christoph Hellwig
On Tue, Jul 01, 2025 at 03:02:34PM +0930, Qu Wenruo wrote: > To allow those multi-device filesystems to be integrated to use > fs_holder_ops: > > - Rename shutdown() call back to remove_bdev() > To better describe when the call back is called. What is renamed back here? > -static void exfat_sh

Re: [f2fs-dev] [PATCH v2 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-06-30 Thread Christoph Hellwig
are an insane pest that makes refactoring or even just reading the code painful as hell. Nacked-by: Christoph Hellwig without that. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 03/10] fs: consistently use file_has_valid_mmap_hooks() helper

2025-06-16 Thread Christoph Hellwig
On Tue, Jun 17, 2025 at 06:25:34AM +0100, Lorenzo Stoakes wrote: > > > Most notably, this updates the elf logic to allow for the ability to > > > execute binaries on filesystems which have the .mmap_prepare hook, but > > > additionally we update nested filesystems. > > > > Can you please give the f

Re: [f2fs-dev] [PATCH 03/10] fs: consistently use file_has_valid_mmap_hooks() helper

2025-06-16 Thread Christoph Hellwig
On Mon, Jun 16, 2025 at 08:33:22PM +0100, Lorenzo Stoakes wrote: > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > callback"), the f_op->mmap() hook has been deprecated in favour of > f_op->mmap_prepare(). > > Additionally, commit bb666b7c2707 ("mm: add mmap_prepare() compatib

Re: [f2fs-dev] [PATCH 01/10] mm: rename call_mmap/mmap_prepare to vfs_mmap/mmap_prepare

2025-06-16 Thread Christoph Hellwig
On Mon, Jun 16, 2025 at 08:33:20PM +0100, Lorenzo Stoakes wrote: > The call_mmap() function violates the existing convention in > include/linux/fs.h whereby invocations of virtual file system hooks is > performed by functions prefixed with vfs_xxx(). > > Correct this by renaming call_mmap() to vfs

Re: [f2fs-dev] [PATCH 06/10] fs/xfs: transition from deprecated .mmap hook to .mmap_prepare

2025-06-16 Thread Christoph Hellwig
On Mon, Jun 16, 2025 at 08:33:25PM +0100, Lorenzo Stoakes wrote: > STATIC int > -xfs_file_mmap( > - struct file *file, > - struct vm_area_struct *vma) > +xfs_file_mmap_prepare( > + struct vm_area_desc *desc) Please stick to the existing alignment for the declarations. O

Re: [f2fs-dev] [PATCH 00/13] Parallelizing filesystem writeback

2025-06-08 Thread Christoph Hellwig
On Fri, Jun 06, 2025 at 10:34:42AM +0530, Kundan Kumar wrote: > Thanks for the suggestion — I agree the default should come from a > filesystem-level helper, not a mount option. > > I looked into the sysfs override idea, but one challenge is that > nr_wb_ctx must be finalized before any writes occ

Re: [f2fs-dev] [PATCH 00/13] Parallelizing filesystem writeback

2025-06-03 Thread Christoph Hellwig
On Tue, Jun 03, 2025 at 04:04:45PM +0200, Christoph Hellwig wrote: > On Tue, Jun 03, 2025 at 07:22:18PM +0530, Anuj gupta wrote: > > > A mount option is about the worst possible interface for behavior > > > that depends on file system implementation and possibly hardware >

Re: [f2fs-dev] [PATCH 00/13] Parallelizing filesystem writeback

2025-06-03 Thread Christoph Hellwig
On Tue, Jun 03, 2025 at 07:22:18PM +0530, Anuj gupta wrote: > > A mount option is about the worst possible interface for behavior > > that depends on file system implementation and possibly hardware > > chacteristics. This needs to be set by the file systems, possibly > > using generic helpers usi

Re: [f2fs-dev] [PATCH 00/13] Parallelizing filesystem writeback

2025-06-03 Thread Christoph Hellwig
On Tue, Jun 03, 2025 at 02:46:20PM +0530, Anuj Gupta/Anuj Gupta wrote: > On 6/2/2025 7:49 PM, Christoph Hellwig wrote: > > On Thu, May 29, 2025 at 04:44:51PM +0530, Kundan Kumar wrote: > > Well, the proper thing would be to figure out a good default and not > > just keep thin

Re: [f2fs-dev] [PATCH 09/13] f2fs: add support in f2fs to handle multiple writeback contexts

2025-06-02 Thread Christoph Hellwig
> } else if (type == DIRTY_DENTS) { > - if (sbi->sb->s_bdi->wb_ctx_arr[0]->wb.dirty_exceeded) > - return false; > + for_each_bdi_wb_ctx(sbi->sb->s_bdi, bdi_wb_ctx) > + if (bdi_wb_ctx->wb.dirty_exceeded) > +

Re: [f2fs-dev] [PATCH 10/13] fuse: add support for multiple writeback contexts in fuse

2025-06-02 Thread Christoph Hellwig
On Mon, Jun 02, 2025 at 05:50:48PM +0200, Bernd Schubert wrote: > > Same here. On pattern is that fuse and nfs both touch the node stat > > and the web stat, and having a common helper doing both would probably > > also be very helpful. > > > > > > Note that Miklos' PR for 6.16 removes NR_WRITE

Re: [f2fs-dev] [PATCH 04/13] writeback: affine inode to a writeback ctx within a bdi

2025-06-02 Thread Christoph Hellwig
On Thu, May 29, 2025 at 04:44:55PM +0530, Kundan Kumar wrote: > @@ -157,7 +157,7 @@ fetch_bdi_writeback_ctx(struct inode *inode) > { > struct backing_dev_info *bdi = inode_to_bdi(inode); > > - return bdi->wb_ctx_arr[0]; > + return bdi->wb_ctx_arr[inode->i_ino % bdi->nr_wb_ctx]; Mo

Re: [f2fs-dev] [PATCH 12/13] nfs: add support in nfs to handle multiple writeback contexts

2025-06-02 Thread Christoph Hellwig
On Thu, May 29, 2025 at 04:45:03PM +0530, Kundan Kumar wrote: > if (folio && !cinfo->dreq) { > struct inode *inode = folio->mapping->host; > + struct bdi_writeback_ctx *bdi_wb_ctx = > + fetch_bdi_writeback_ctx(inode); >

Re: [f2fs-dev] [PATCH 10/13] fuse: add support for multiple writeback contexts in fuse

2025-06-02 Thread Christoph Hellwig
> static void fuse_writepage_finish_stat(struct inode *inode, struct folio > *folio) > { > - struct backing_dev_info *bdi = inode_to_bdi(inode); > + struct bdi_writeback_ctx *bdi_wb_ctx = fetch_bdi_writeback_ctx(inode); > > - dec_wb_stat(&bdi->wb_ctx_arr[0]->wb, WB_WRITEBACK); > +

Re: [f2fs-dev] [PATCH 00/13] Parallelizing filesystem writeback

2025-06-02 Thread Christoph Hellwig
On Thu, May 29, 2025 at 04:44:51PM +0530, Kundan Kumar wrote: > Number of writeback contexts > === > The plan is to keep the nr_wb_ctx as 1, ensuring default single threaded > behavior. However, we set the number of writeback contexts equal to > number of CPUs in the current

Re: [f2fs-dev] [PATCH] f2fs: Fix __write_node_folio() conversion

2025-06-01 Thread Christoph Hellwig
On Sun, Jun 01, 2025 at 01:26:54AM +0100, Matthew Wilcox (Oracle) wrote: > This conversion moved the folio_unlock() to inside __write_node_folio(), > but missed one caller so we had a double-unlock on this path. Looks good, thanks! Reviewed-by: Christoph H

Re: [f2fs-dev] [PATCH 1/2] f2fs: use vmalloc instead of kvmalloc in .init_{, de}compress_ctx

2025-05-12 Thread Christoph Hellwig
On Tue, May 13, 2025 at 01:57:20PM +0800, Chao Yu wrote: > .init_{,de}compress_ctx uses kvmalloc() to alloc memory, it will try > to allocate physically continuous page first, it may cause more memory > allocation pressure, let's use vmalloc instead to mitigate it. Shouldn't this be handled in kvm

[f2fs-dev] [PATCH 6/6] f2fs: return bool from __write_node_folio

2025-05-07 Thread Christoph Hellwig
__write_node_folio can only return 0 or AOP_WRITEPAGE_ACTIVATE. As part of phasing out AOP_WRITEPAGE_ACTIVATE, switch to a bool return instead. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu --- fs/f2fs/node.c | 29 + 1 file changed, 13 insertions(+), 16

[f2fs-dev] [PATCH 5/6] f2fs: simplify return value handling in f2fs_fsync_node_pages

2025-05-07 Thread Christoph Hellwig
Always assign ret where the error happens, and jump to out instead of multiple loop exit conditions to prepare for changes in the __write_node_folio calling convention. Signed-off-by: Christoph Hellwig --- fs/f2fs/node.c | 23 +++ 1 file changed, 11 insertions(+), 12

[f2fs-dev] [PATCH 4/6] f2fs: always unlock the page in f2fs_write_single_data_page

2025-05-07 Thread Christoph Hellwig
on it's way out now that ->writepage has been removed. Signed-off-by: Christoph Hellwig --- fs/f2fs/compress.c | 3 +-- fs/f2fs/data.c | 8 +++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index e016b0f96313..1e62fdffda07

[f2fs-dev] [PATCH 2/6] f2fs: return bool from __f2fs_write_meta_folio

2025-05-07 Thread Christoph Hellwig
__f2fs_write_meta_folio can only return 0 or AOP_WRITEPAGE_ACTIVATE. As part of phasing out AOP_WRITEPAGE_ACTIVATE, switch to a bool return instead. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu --- fs/f2fs/checkpoint.c | 22 +++--- 1 file changed, 11 insertions(+), 11

[f2fs-dev] cleanup AOP_WRITEPAGE_ACTIVATE use in f2fs v2

2025-05-07 Thread Christoph Hellwig
Hi all, this almost entirely cleans up usage of AOP_WRITEPAGE_ACTIVATE in f2fs. Changes since v1: - pick up the bug fix from Chao as patch 1 - release the folio batch on early exit - remove the dead for_reclaim handling - keep the ability of the caller to exit early for the redity case Diffs

[f2fs-dev] [PATCH 1/6] f2fs: fix to return correct error number in f2fs_sync_node_pages()

2025-05-07 Thread Christoph Hellwig
: return AOP_WRITEPAGE_ACTIVATE Cc: sta...@vger.kernel.org Reported-by: Christoph Hellwig Signed-off-by: Chao Yu --- fs/f2fs/node.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index ec74eb9982a5..69308523c34e 100644 --- a/fs/f2fs

[f2fs-dev] [PATCH 3/6] f2fs: remove wbc->for_reclaim handling

2025-05-07 Thread Christoph Hellwig
ap or shmem pages inside the swap code, but never passed to file systems. Signed-off-by: Christoph Hellwig --- fs/f2fs/checkpoint.c| 14 ++ fs/f2fs/data.c | 17 ++--- fs/f2fs/file.c | 1 - fs/f2fs/node.c | 13 +

Re: [f2fs-dev] cleanup AOP_WRITEPAGE_ACTIVATE use in f2fs

2025-05-07 Thread Christoph Hellwig
On Wed, May 07, 2025 at 03:38:20PM +0800, Chao Yu wrote: > On 5/5/25 17:25, Christoph Hellwig wrote: > > Hi all, > > > > this almost entirely cleans up usage of AOP_WRITEPAGE_ACTIVATE in f2fs. > > > > f2fs_sync_node_pages can still return it in a way that is

Re: [f2fs-dev] [PATCH 2/4] f2fs: don't return AOP_WRITEPAGE_ACTIVATE from f2fs_write_single_data_page

2025-05-07 Thread Christoph Hellwig
On Wed, May 07, 2025 at 02:28:55PM +0800, Chao Yu wrote: > > diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c > > index e016b0f96313..ce63b3bfb28f 100644 > > --- a/fs/f2fs/compress.c > > +++ b/fs/f2fs/compress.c > > @@ -1565,10 +1565,7 @@ static int f2fs_write_raw_pages(struct compress_ctx > >

[f2fs-dev] [PATCH 3/4] f2fs: simplify return value handling in f2fs_fsync_node_pages

2025-05-05 Thread Christoph Hellwig
Always assign ret where the error happens, and jump to out instead of multiple loop exit conditions to prepare for changes in the __write_node_folio calling convention. Signed-off-by: Christoph Hellwig --- fs/f2fs/node.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions

[f2fs-dev] [PATCH 2/4] f2fs: don't return AOP_WRITEPAGE_ACTIVATE from f2fs_write_single_data_page

2025-05-05 Thread Christoph Hellwig
Instead unlock the pages locally where that would happen and thus consolidate the code in the callers. Signed-off-by: Christoph Hellwig --- fs/f2fs/compress.c | 5 + fs/f2fs/data.c | 13 - 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/fs/f2fs/compress.c b

[f2fs-dev] [PATCH 1/4] f2fs: return bool from __f2fs_write_meta_folio

2025-05-05 Thread Christoph Hellwig
__f2fs_write_meta_folio can only return 0 or AOP_WRITEPAGE_ACTIVATE. As part of phasing out AOP_WRITEPAGE_ACTIVATE, switch to a bool return instead. Signed-off-by: Christoph Hellwig --- fs/f2fs/checkpoint.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff

[f2fs-dev] cleanup AOP_WRITEPAGE_ACTIVATE use in f2fs

2025-05-05 Thread Christoph Hellwig
Hi all, this almost entirely cleans up usage of AOP_WRITEPAGE_ACTIVATE in f2fs. f2fs_sync_node_pages can still return it in a way that is not handled by any caller and eventually is propagated to userspace. This does look like a bug and needs attention by someone who actually knows the code. Di

[f2fs-dev] [PATCH 4/4] f2f2: return bool from __write_node_folio

2025-05-05 Thread Christoph Hellwig
__write_node_folio can only return 0 or AOP_WRITEPAGE_ACTIVATE. As part of phasing out AOP_WRITEPAGE_ACTIVATE, switch to a bool return instead. Signed-off-by: Christoph Hellwig --- fs/f2fs/node.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a

Re: [f2fs-dev] [PATCH] f2fs: support F2FS_NOLINEAR_LOOKUP_FL

2025-03-05 Thread Christoph Hellwig
On Mon, Mar 03, 2025 at 11:06:44PM +, Eric Biggers wrote: > > +/* used for FS_IOC_GETFLAGS and FS_IOC_SETFLAGS */ > > +enum { > > + F2FS_NOLINEAR_LOOKUP_FLAG = 0x0800, > > +}; > > FS_IOC_GETFLAGS and FS_IOC_SETFLAGS are not filesystem-specific, and the > supported flags are declared in i

Re: [f2fs-dev] [PATCH 0/2 v9] reclaim file-backed pages given POSIX_FADV_NOREUSE

2025-02-18 Thread Christoph Hellwig
This still has a file system sysfs HACK, you're still not Ccing the right list, etc. Can you pleae at least try to get it right? On Wed, Feb 12, 2025 at 02:31:55AM +, Jaegeuk Kim wrote: > This patch series does not add new API, but implements POSIX_FADV_NOREUSE > where > it keeps the page ra

Re: [f2fs-dev] [PATCH 0/2 v8] add ioctl/sysfs to donate file-backed pages

2025-02-03 Thread Christoph Hellwig
On Fri, Jan 31, 2025 at 10:27:55PM +, Jaegeuk Kim wrote: > Note, let me keep improving this patch set, while trying to get some feedbacks > from MM and API folks from [1]. Please actually drive it instead of only interacting once after I told you to. The feedback is clearly that it is a MM th

Re: [f2fs-dev] [PATCH 1/2] f2fs: register inodes which is able to donate pages

2025-01-16 Thread Christoph Hellwig
On Thu, Jan 16, 2025 at 05:19:24PM +, Jaegeuk Kim wrote: > > mean a invalidate_inode_pages2_range. Which is a strange use of the > > word. what are the use cases? Why is this queued up to a thread and > > not done inline? Why is this in f2fs and not in common code. > > The idea is let apps

Re: [f2fs-dev] [PATCH 0/2 v5] add ioctl/sysfs to donate file-backed pages

2025-01-16 Thread Christoph Hellwig
Still NAC for sneaking in an almost undocumented MM feature into a file system ioctl. Especially while a discussion on that is still ongoin. And it's still bad that you don't even bother to Cc fsdevel on this, nor linux-api or in this case the mm list. On Thu, Jan 16, 2025 at 05:19:42PM +, J

Re: [f2fs-dev] [PATCH 1/2] f2fs: register inodes which is able to donate pages

2025-01-15 Thread Christoph Hellwig
On Wed, Jan 15, 2025 at 10:16:51PM +, Jaegeuk Kim wrote: > This patch introduces an inode list to keep the page cache ranges that users > can donate pages together. > > #define F2FS_IOC_DONATE_RANGE_IOW(F2FS_IOCTL_MAGIC, 27, > \ >

Re: [f2fs-dev] [PATCH v2] f2fs: Introduce linear search for dentries

2025-01-03 Thread Christoph Hellwig
On Mon, Dec 23, 2024 at 04:57:35PM +, Jaegeuk Kim wrote: > > That means you have really bad worst case behavior for negative lookups. > > I don' think this is in any way a good idea. > > No surprise. Please check: > https://lore.kernel.org/lkml/z1mzu4eg6cpur...@google.com/ Well, I think Linus

Re: [f2fs-dev] [PATCH v2] f2fs: Introduce linear search for dentries

2024-12-23 Thread Christoph Hellwig
On Fri, Dec 20, 2024 at 09:21:36AM -0800, Daniel Lee wrote: > This patch addresses an issue where some files in case-insensitive > directories become inaccessible due to changes in how the kernel function, > utf8_casefold(), generates case-folded strings from the commit 5c26d2f1d3f5 > ("unicode: Do

Re: [f2fs-dev] [PATCH v5] f2fs: introduce device aliasing file

2024-10-14 Thread Christoph Hellwig
On Mon, Oct 14, 2024 at 04:42:07PM +, Jaegeuk Kim wrote: > > > > Plz, refer to this patch and the description there. > > > > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?h=dev-test&id=8cc4e257ec20bee207bb034d5ac406e1ab31eaea > > Also, I added this in the des

Re: [f2fs-dev] [PATCH v5] f2fs: introduce device aliasing file

2024-10-14 Thread Christoph Hellwig
On Mon, Oct 14, 2024 at 09:28:04AM -0700, Daeho Jeong wrote: > On Sun, Oct 13, 2024 at 10:56 PM Christoph Hellwig wrote: > > > > On Thu, Oct 10, 2024 at 12:26:26PM -0700, Daeho Jeong wrote: > > > From: Daeho Jeong > > > > > > F2FS should understand how

Re: [f2fs-dev] [PATCH v5] f2fs: introduce device aliasing file

2024-10-13 Thread Christoph Hellwig
On Thu, Oct 10, 2024 at 12:26:26PM -0700, Daeho Jeong wrote: > From: Daeho Jeong > > F2FS should understand how the device aliasing file works and support > deleting the file after use. A device aliasing file can be created by > mkfs.f2fs tool and it can map the whole device with an extrent, not

Re: [f2fs-dev] [PATCH v5 4/5] sd: limit to use write life hints

2024-09-24 Thread Christoph Hellwig
On Tue, Sep 24, 2024 at 02:54:51PM +0530, Kanchan Joshi wrote: > FS managed/created hints is a different topic altogether, > and honestly > that is not the scope of this series. That needs to be thought at per-FS > level due to different data/meta layouts. No, it is not. If you design an API wh

Re: [f2fs-dev] [PATCH v5 4/5] sd: limit to use write life hints

2024-09-18 Thread Christoph Hellwig
On Wed, Sep 18, 2024 at 01:42:51PM +0530, Kanchan Joshi wrote: > Would you prefer a new queue attribute (say nr_streams) that tells that? No. For one because using the same file descriptors as the one used to set the hind actually makes it usable - finding the block device does not. And second a

Re: [f2fs-dev] [PATCH v5 4/5] sd: limit to use write life hints

2024-09-17 Thread Christoph Hellwig
> > If the device (or file system, which really needs to be in control > > for actual files vs just block devices) does not support all 256 > > we need to reduce them to less than that. The kernel can help with > > that a bit if the streams have meanings (collapsing temperature levels > > that are

Re: [f2fs-dev] [PATCH v5 4/5] sd: limit to use write life hints

2024-09-16 Thread Christoph Hellwig
On Mon, Sep 16, 2024 at 07:19:21PM +0530, Kanchan Joshi wrote: > > Maybe part of the problem is that the API is very confusing. A smal > > part of that is of course that the existing temperature hints already > > have some issues, but this seems to be taking them make it significantly > > worse. >

Re: [f2fs-dev] [PATCH v5 4/5] sd: limit to use write life hints

2024-09-13 Thread Christoph Hellwig
On Thu, Sep 12, 2024 at 10:01:00PM +0530, Kanchan Joshi wrote: > Please see the response in patch #1. My worries were: > (a) adding a new field and propagating it across the stack will cause > code duplication. > (b) to add a new field we need to carve space within inode, bio and > request. > We

Re: [f2fs-dev] [PATCH] f2fs: fix to don't set SB_RDONLY in f2fs_handle_critical_error()

2024-09-12 Thread Christoph Hellwig
Another problem is that it sets SB_RDONLY instead of an internal shutdown flag. But that can be solved later. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v5 2/5] fcntl: rename rw_hint_* to rw_lifetime_hint_*

2024-09-12 Thread Christoph Hellwig
On Tue, Sep 10, 2024 at 08:31:57PM +0530, Kanchan Joshi wrote: > F_GET/SET_RW_HINT fcntl handlers query/set write life hints. > Rename the handlers/helpers to be explicit that write life hints are > being handled. > > This is in preparation to introduce a new interface that supports more > than on

Re: [f2fs-dev] [PATCH v5 4/5] sd: limit to use write life hints

2024-09-12 Thread Christoph Hellwig
On Tue, Sep 10, 2024 at 08:31:59PM +0530, Kanchan Joshi wrote: > From: Nitesh Shetty > > The incoming hint value maybe either lifetime hint or placement hint. .. may either be .. ? > Make SCSI interpret only temperature-based write lifetime hints. > > Signed-off-by: Nitesh Shetty > Signed-off

Re: [f2fs-dev] [PATCH v5 3/5] fcntl: add F_{SET/GET}_RW_HINT_EX

2024-09-12 Thread Christoph Hellwig
On Tue, Sep 10, 2024 at 08:31:58PM +0530, Kanchan Joshi wrote: > This is similar to existing F_{SET/GET}_RW_HINT but more > generic/extensible. > > F_SET/GET_RW_HINT_EX take a pointer to a struct rw_hint_ex as argument: > > struct rw_hint_ex { > __u8type; > __u8pad[7]; >

Re: [f2fs-dev] [PATCH v5 1/5] fs, block: refactor enum rw_hint

2024-09-12 Thread Christoph Hellwig
On Tue, Sep 10, 2024 at 08:31:56PM +0530, Kanchan Joshi wrote: > Rename enum rw_hint to rw_lifetime_hint. > Change i_write_hint (in inode), bi_write_hint(in bio), and write_hint > (in request) to use u8 data-type rather than this enum. > > This is in preparation to introduce a new write hint type.

Re: [f2fs-dev] [PATCH v2] f2fs: check discard support for conventional zones

2024-08-15 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-29 Thread Christoph Hellwig
On Sun, Jul 28, 2024 at 10:44:12PM -0400, Theodore Ts'o wrote: > > > > Personally, I prefer the implementation of method two. > > But there's also method zero --- keep things the way they are, and > don't try to add a new astraction. > > Advantage: > > -- Code has worked for decades, so it is v

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-26 Thread Christoph Hellwig
On Fri, Jul 26, 2024 at 01:58:00PM -0400, Theodore Ts'o wrote: > Yeah, that's my reaction as well. This only saves 50 lines of code in > ext4, and that includes unrelated changes such as getting rid of "int > i" and putting the declaration into the for loop --- "for (int i = > ..."). Sure, that s

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-26 Thread Christoph Hellwig
On Fri, Jul 26, 2024 at 04:54:59PM +0800, Youling Tang wrote: > Based on this patch, we may need to do these things with this > > > 1. Change the order of *.o in the Makefile (the same order as before the > change) While we'll need to be careful, we don't need to match the exact order. Most of th

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-25 Thread Christoph Hellwig
On Thu, Jul 25, 2024 at 07:14:14PM +0200, Goffredo Baroncelli wrote: > Instead of relying to the "expected" order of the compiler/linker, > why doesn't manage the chain explicitly ? Something like: Because that doesn't actually solve anything over simple direct calls as you still need the symbols

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-25 Thread Christoph Hellwig
On Thu, Jul 25, 2024 at 05:30:58PM +0200, Arnd Bergmann wrote: > Now I think we could just make the module_init() macro > do the same thing as a built-in initcall() and put > an entry in a special section, to let you have multiple > entry points in a loadable module. > > There are still at least t

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-25 Thread Christoph Hellwig
On Thu, Jul 25, 2024 at 11:01:33AM +0800, Youling Tang wrote: > - It doesn't feel good to have only one subinit/exit in a file. >   Assuming that there is only one file in each file, how do we >   ensure that the files are linked in order?(Is it sorted by *.o >   in the Makefile?) Yes, link order

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-24 Thread Christoph Hellwig
On Wed, Jul 24, 2024 at 09:57:05AM +0800, Youling Tang wrote: > module_init(initfn)/module_exit(exitfn) has two definitions (via MODULE): > - buindin: uses do_initcalls() to iterate over the contents of the specified >   section and executes all initfn functions in the section in the order in >   w

Re: [f2fs-dev] [PATCH 1/4] module: Add module_subinit{_noexit} and module_subeixt helper macros

2024-07-23 Thread Christoph Hellwig
On Tue, Jul 23, 2024 at 04:32:36PM +0800, Youling Tang wrote: > Providing module_subinit{_noexit} and module_subeixt helps macros ensure > that modules init/exit match their order, while also simplifying the code. > > The three macros are defined as follows: > - module_subinit(initfn, exitfn,rollb

Re: [f2fs-dev] [PATCH 0/3] Add {init, exit}_sequence_fs() helper function

2024-07-23 Thread Christoph Hellwig
On Tue, Jul 23, 2024 at 04:44:14PM +0800, Youling Tang wrote: > Thanks for your suggestion,  I re-implemented it using section mode, > and the new patch set [1] has been sent. Nice! I'll review it. ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@l

Re: [f2fs-dev] [PATCH 0/3] Add {init, exit}_sequence_fs() helper function

2024-07-11 Thread Christoph Hellwig
Can we please stop this boilerplate code an instead our __init/__exit sections to supper multiple entires per module. This should be mostly trivial, except that we'd probably want a single macro that has the init and exit calls so that the order in the section is the same and the unroll on failure

Re: [f2fs-dev] [PATCH 3/5] block: remove support for the host aware zone model

2023-12-18 Thread Christoph Hellwig
On Mon, Dec 18, 2023 at 06:48:43PM +0900, Damien Le Moal wrote: > > - if (devip->zmodel == BLK_ZONED_HA) > > - arr[4] = 1 << 4;/* zoned field = 01b */ > > I think we should keep everything related to HA in scsi debug as that is an > easy > way to test the block layer and scsi.

[f2fs-dev] [PATCH 2/5] virtio_blk: remove the broken zone revalidation support

2023-12-17 Thread Christoph Hellwig
ut it can be readded in a fixed version with proper test coverage if needed. Fixes: 95bfec41bd3d ("virtio-blk: add support for zoned block devices") Fixes: f1ba4e674feb ("virtio-blk: fix to match virtio spec") Signed-off-by: Christoph Hellwig --- drivers/block/virtio_blk.c |

[f2fs-dev] [PATCH 3/5] block: remove support for the host aware zone model

2023-12-17 Thread Christoph Hellwig
this model which never made it to mass production. Drop the support before it is too late. Note that any such host aware prototype HDD can still be used with Linux as we'll now treat it as a conventional HDD. Signed-off-by: Christoph Hellwig --- block/blk-settings.c

[f2fs-dev] remove support for the host aware zoned model

2023-12-17 Thread Christoph Hellwig
Hi all, hen zones were first added the SCSI and ATA specs, two different models were supported (in addition to the drive managed one that is invisible to the host): - host managed where non-conventional zones there is strict requirement to write at the write pointer, or else an error is retur

[f2fs-dev] [PATCH 5/5] sd: only call disk_clear_zoned when needed

2023-12-17 Thread Christoph Hellwig
ff-by: Christoph Hellwig --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index dbed075cdb981a..8c8ac5cd1833b4 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3149,7 +3149,7 @@ static void sd_read_block_characteri

[f2fs-dev] [PATCH 1/5] virtio_blk: cleanup zoned device probing

2023-12-17 Thread Christoph Hellwig
CONFIG_BLK_DEV_ZONED, and improve it for the !CONFIG_BLK_DEV_ZONED case. Signed-off-by: Christoph Hellwig --- drivers/block/virtio_blk.c | 50 +- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index

[f2fs-dev] [PATCH 4/5] block: simplify disk_set_zoned

2023-12-17 Thread Christoph Hellwig
Only use disk_set_zoned to actually enable zoned device support. For clearing it, call disk_clear_zoned, which is renamed from disk_clear_zone_settings and now directly clears the zoned flag as well. Signed-off-by: Christoph Hellwig --- block/blk-settings.c | 32

Re: [f2fs-dev] [PATCH 1/3] btrfs: call btrfs_close_devices from ->kill_sb

2023-12-15 Thread Christoph Hellwig
On Fri, Dec 15, 2023 at 04:45:50PM -0500, Josef Bacik wrote: > I ran it through, you broke a test that isn't upstream yet to test the old > mount > api double mount thing that I have a test for > > https://github.com/btrfs/fstests/commit/2796723e77adb0f9da1059acf13fc402467f7ac4 > > In this case

Re: [f2fs-dev] [PATCH 3/3] fs: move fscrypt keyring destruction to after ->put_super

2023-12-13 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 1/3] btrfs: call btrfs_close_devices from ->kill_sb

2023-12-13 Thread Christoph Hellwig
On Tue, Dec 12, 2023 at 08:00:16PM -0800, Eric Biggers wrote: > From: Christoph Hellwig > > blkdev_put must not be called under sb->s_umount to avoid a lock order > reversal with disk->open_mutex once call backs from block devices to > the file system using the holder ops

Re: [f2fs-dev] [PATCH 03/12] filemap: update ki_pos in generic_perform_write

2023-09-13 Thread Christoph Hellwig
> direct_write_fallback(): on error revert the ->ki_pos update from buffered > write Al, Christian: can you send this fix on top Linus? ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listi

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

2023-08-28 Thread Christoph Hellwig
On Sat, Aug 26, 2023 at 03:28:52AM +0100, Al Viro wrote: > I mean, look at claim_swapfile() for example: > p->bdev = blkdev_get_by_dev(inode->i_rdev, >FMODE_READ | FMODE_WRITE | FMODE_EXCL, p); > if (IS_ERR(p->bdev)) { >

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

2023-08-28 Thread Christoph Hellwig
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 make

Re: [f2fs-dev] [PATCH 03/12] filemap: update ki_pos in generic_perform_write

2023-08-28 Thread Christoph Hellwig
-= buffered_written. > > Or am I completely misparsing what you've written? No, I misread the patch. Looks good: Acked-by: Christoph Hellwig ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 03/12] filemap: update ki_pos in generic_perform_write

2023-08-28 Thread Christoph Hellwig
On Sun, Aug 27, 2023 at 10:45:18PM +0100, Al Viro wrote: > IOW, I suspect that the right thing to do would be something along the lines > of The idea looks sensible to me, but we'll also need to do it for the filemap_write_and_wait_range failure case. ___

Re: [f2fs-dev] [PATCH 03/12] filemap: update ki_pos in generic_perform_write

2023-08-28 Thread Christoph Hellwig
On Sun, Aug 27, 2023 at 08:41:22PM +0100, Al Viro wrote: > That part is somewhat fishy - there's a case where you return a positive value > and advance ->ki_pos by more than that amount. I really wonder if all callers > of ->write_iter() are OK with that. Consider e.g. this: This should not exis

Re: [f2fs-dev] [PATCH 01/30] block: also call ->open for incremental partition opens

2023-08-28 Thread Christoph Hellwig
On Fri, Aug 25, 2023 at 03:44:57AM +0100, Al Viro wrote: > That got me curious about the ->bd_openers - do we need it atomic? > Most of the users (and all places that do modifications) are > under ->open_mutex; the only exceptions are > * early sync logics in blkdev_put(); it's explicitly rac

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

2023-08-11 Thread Christoph Hellwig
Except for a mostly cosmetic nitpick this looks good to me: Acked-by: Christoph Hellwig That's not eactly the deep review I'd like to do, but as I'm about to head out for vacation that's probably as good as it gets. ___ Linux-f2f

Re: [f2fs-dev] [PATCH 06/12] fs: use the super_block as holder when mounting file systems

2023-08-05 Thread Christoph Hellwig
On Thu, Aug 03, 2023 at 03:33:30PM +0200, Jan Kara wrote: > As a side note, after this patch we can also remove bdev->bd_super and > transition the two real users (mark_buffer_write_io_error() and two places > in ocfs2) to use bd_holder. Ext4 also uses bd_super but there it is really > pointless as

Re: [f2fs-dev] [PATCH 11/12] xfs: drop s_umount over opening the log and RT devices

2023-08-05 Thread Christoph Hellwig
On Wed, Aug 02, 2023 at 09:32:19AM -0700, Darrick J. Wong wrote: > > + /* see get_tree_bdev why this is needed and safe */ > > Which part of get_tree_bdev? Is it this? > > /* >* s_umount nests inside open_mutex during >* __invalidate_device(). blk

[f2fs-dev] [PATCH 12/12] xfs use fs_holder_ops for the log and RT devices

2023-08-02 Thread Christoph Hellwig
Use the generic fs_holder_ops to shut down the file system when the log or RT device goes away instead of duplicating the logic. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_super.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/fs/xfs/xfs_super.c b/fs

[f2fs-dev] [PATCH 10/12] ext4: use fs_holder_ops for the log device

2023-08-02 Thread Christoph Hellwig
Use the generic fs_holder_ops to shut down the file system when the log device goes away instead of duplicating the logic. Signed-off-by: Christoph Hellwig --- fs/ext4/super.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index

[f2fs-dev] [PATCH 04/12] btrfs: open block devices after superblock creation

2023-08-02 Thread Christoph Hellwig
superblock for a particular fsid does already exist and open the block devices only if it doesn't, mirror the recent changes to the VFS mount helpers. Signed-off-by: Christoph Hellwig --- fs/btrfs/super.c | 51 ++ fs/btrfs/volumes.c | 4 ++-- 2 files ch

  1   2   3   4   5   6   7   8   9   >