[f2fs-dev] [PATCH] f2fs: Use wait_event_freezable_timeout() for freezable kthread

2023-12-17 Thread Kevin Hao
A freezable kernel thread can enter frozen state during freezing by either calling try_to_freeze() or using wait_event_freezable() and its variants. So for the following snippet of code in a kernel thread loop: wait_event_interruptible_timeout(); try_to_freeze(); We can change it to a simple w

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

2023-12-17 Thread Damien Le Moal
On 2023/12/18 15:15, Ed Tsai (蔡宗軒) wrote: > Hi Christoph, > > some minor suggestions: > > On Sun, 2023-12-17 at 17:53 +0100, Christoph Hellwig wrote: >> >> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c >> index 198d38b53322c1..260b5b8f2b0d7e 100644 >> --- a/drivers/md/dm-table.c >> +

Re: [f2fs-dev] [PATCH V2] f2fs: unify the error handling of f2fs_is_valid_blkaddr

2023-12-17 Thread Zhiguo Niu
Dear Chao, thanks for your feedback. On Fri, Dec 15, 2023 at 10:28 AM Chao Yu wrote: > > On 2023/12/12 13:23, Zhiguo Niu wrote: > > unify the error handling of ERROR_INVALID_BLKADDR in f2fs_is_valid_blkaddr > > and remove some redundant codes in f2fs_cache_compressed_page. > > > > Signed-off-by:

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

2023-12-17 Thread Christoph Hellwig
virtblk_revalidate_zones is called unconditionally from virtblk_config_changed_work from the virtio config_changed callback. virtblk_revalidate_zones is a bit odd in that it re-clears the zoned state for host aware or non-zoned devices, which isn't needed unless the zoned mode changed - but a zone

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

2023-12-17 Thread Christoph Hellwig
When 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 returned - h

[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
disk_clear_zoned only needs to be called when a device reported zone managed mode first and we clear it. Add a check so that disk_clear_zoned isn't called on devices that were never zoned. This avoids a fairly expensive queue freezing when revalidating conventional devices. Signed-off-by: Christ

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

2023-12-17 Thread Christoph Hellwig
Move reading and checking the zoned model from virtblk_probe_zoned_device into the caller, leaving only the code to perform the actual setup for host managed zoned devices in virtblk_probe_zoned_device. This allows to share the model reading and sharing between builds with and without CONFIG_BLK_D

[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] [syzbot] [reiserfs?] [squashfs?] BUG: Dentry still in use in unmount

2023-12-17 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-and-tested-by: syzbot+8608bb4553edb8c78...@syzkaller.appspotmail.com Tested on: commit: 79f938ea ovl: fix dentry reference leak after changes .. git tree: https://github.com/amir73i

Re: [f2fs-dev] [PATCH] ovl: fix BUG: Dentry still in use in unmount

2023-12-17 Thread Amir Goldstein
Hi Edward, Thanks for the quick fix, but it is incorrect. On Sun, Dec 17, 2023 at 10:11 AM Edward Adam Davis wrote: > > workdir and destdir could be the same when copying up to indexdir. This is not the reason for the bug, the reason is: syzbot exercised the forbidden practice of moving th

Re: [f2fs-dev] [syzbot] [reiserfs?] [squashfs?] BUG: Dentry still in use in unmount

2023-12-17 Thread Amir Goldstein
On Sun, Dec 17, 2023 at 1:19 AM syzbot wrote: > > syzbot has bisected this issue to: > > commit c63e56a4a6523fcb1358e1878607d77a40b534bb > Author: Amir Goldstein > Date: Wed Aug 16 09:42:18 2023 + > > ovl: do not open/llseek lower file with upper sb_writers held > > bisection log: http

[f2fs-dev] [PATCH] ovl: fix BUG: Dentry still in use in unmount

2023-12-17 Thread Edward Adam Davis via Linux-f2fs-devel
workdir and destdir could be the same when copying up to indexdir. Fixes: c63e56a4a652 ("ovl: do not open/llseek lower file with upper sb_writers held") Reported-and-tested-by: syzbot+8608bb4553edb8c78...@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis --- fs/overlayfs/copy_up.c | 20