Re: [f2fs-dev] [PATCH v2] fs: f2fs: remove WARN_ON in f2fs_is_valid_blkaddr

2022-04-15 Thread Chao Yu
On 2022/4/15 21:19, Dongliang Mu wrote: From: Dongliang Mu Syzbot triggers two WARNs in f2fs_is_valid_blkaddr and __is_bitmap_valid. For example, in f2fs_is_valid_blkaddr, if type is DATA_GENERIC_ENHANCE or DATA_GENERIC_ENHANCE_READ, it invokes WARN_ON if blkaddr is not in the right range. T

Re: [f2fs-dev] [PATCH 26/27] block: decouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD

2022-04-15 Thread Chao Yu
On 2022/4/15 12:52, Christoph Hellwig wrote: Secure erase is a very different operation from discard in that it is a data integrity operation vs hint. Fully split the limits and helper infrastructure to make the separation more clear. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Pet

Re: [f2fs-dev] [PATCH] f2fs: Fix signedness bugs in f2fs_gc_pinned_control functions

2022-04-15 Thread Jaegeuk Kim
On 04/15, Chao Yu wrote: > On 2022/4/15 16:49, Jiapeng Chong wrote: > > Fix the following smatch warning: > > > > fs/f2fs/gc.c:688 f2fs_gc_pinned_control() warn: signedness bug returning > > '(-16)'. > > Oops, thanks for catching this... > > It's better to merge this patch into original patch, i

[f2fs-dev] [PATCH v2] fs: f2fs: remove WARN_ON in f2fs_is_valid_blkaddr

2022-04-15 Thread Dongliang Mu
From: Dongliang Mu Syzbot triggers two WARNs in f2fs_is_valid_blkaddr and __is_bitmap_valid. For example, in f2fs_is_valid_blkaddr, if type is DATA_GENERIC_ENHANCE or DATA_GENERIC_ENHANCE_READ, it invokes WARN_ON if blkaddr is not in the right range. The call trace is as follows: f2fs_get_node_

[f2fs-dev] [PATCH] f2fs: Fix signedness bugs in f2fs_gc_pinned_control functions

2022-04-15 Thread Jiapeng Chong
Fix the following smatch warning: fs/f2fs/gc.c:688 f2fs_gc_pinned_control() warn: signedness bug returning '(-16)'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- fs/f2fs/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 34c09

Re: [f2fs-dev] [PATCH] f2fs: Fix signedness bugs in f2fs_gc_pinned_control functions

2022-04-15 Thread Chao Yu
On 2022/4/15 16:49, Jiapeng Chong wrote: Fix the following smatch warning: fs/f2fs/gc.c:688 f2fs_gc_pinned_control() warn: signedness bug returning '(-16)'. Oops, thanks for catching this... It's better to merge this patch into original patch, if you don't mind? Thanks, __

Re: [f2fs-dev] [PATCH 22/27] block: refactor discard bio size limiting

2022-04-15 Thread Chaitanya Kulkarni via Linux-f2fs-devel
On 4/14/22 21:52, Christoph Hellwig wrote: > Move all the logic to limit the discard bio size into a common helper > so that it is better documented. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Martin K. Petersen > Acked-by: Coly Li > --- Looks good. Reviewed-by: Chaitanya Kulkarni

Re: [f2fs-dev] [PATCH 23/27] block: add a bdev_max_discard_sectors helper

2022-04-15 Thread Chaitanya Kulkarni via Linux-f2fs-devel
On 4/14/22 21:52, Christoph Hellwig wrote: > Add a helper to query the number of sectors support per each discard bio > based on the block device and use this helper to stop various places from > poking into the request_queue to see if discard is supported and if so how > much. This mirrors what i

Re: [f2fs-dev] [PATCH 13/27] block: add a bdev_fua helper

2022-04-15 Thread Chaitanya Kulkarni via Linux-f2fs-devel
On 4/14/22 21:52, Christoph Hellwig wrote: > Add a helper to check the FUA flag based on the block_device instead of > having to poke into the block layer internal request_queue. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Martin K. Petersen Looks good. Reviewed-by: Chaitanya Kulkarni

Re: [f2fs-dev] [PATCH 11/27] block: add a bdev_nonrot helper

2022-04-15 Thread Chaitanya Kulkarni via Linux-f2fs-devel
On 4/14/22 21:52, Christoph Hellwig wrote: > Add a helper to check the nonrot flag based on the block_device instead > of having to poke into the block layer internal request_queue. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Martin K. Petersen > Acked-by: David Sterba [btrfs] > --- Lo

Re: [f2fs-dev] [PATCH 10/27] mm: use bdev_is_zoned in claim_swapfile

2022-04-15 Thread Chaitanya Kulkarni via Linux-f2fs-devel
On 4/14/22 21:52, Christoph Hellwig wrote: > Use the bdev based helper instead of poking into the queue. > > Signed-off-by: Christoph Hellwig > --- Looks good. Reviewed-by: Chaitanya Kulkarni -ck ___ Linux-f2fs-devel mailing list Linux-f2fs-devel

Re: [f2fs-dev] [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD

2022-04-15 Thread Chaitanya Kulkarni via Linux-f2fs-devel
On 4/14/22 21:52, Christoph Hellwig wrote: > Just use a non-zero max_discard_sectors as an indicator for discard > support, similar to what is done for write zeroes. > > The only places where needs special attention is the RAID5 driver, > which must clear discard support for security reasons by de

Re: [f2fs-dev] [PATCH 12/27] block: add a bdev_write_cache helper

2022-04-15 Thread Chaitanya Kulkarni via Linux-f2fs-devel
On 4/14/22 21:52, Christoph Hellwig wrote: > Add a helper to check the write cache flag based on the block_device > instead of having to poke into the block layer internal request_queue. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Martin K. Petersen > Acked-by: David Sterba [btrfs] > --

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

2022-04-15 Thread Chaitanya Kulkarni via Linux-f2fs-devel
On 4/14/22 21:52, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > Acked-by: David Sterba > --- Looks good. Reviewed-by: Chaitanya Kulkarni -ck ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@list

Re: [f2fs-dev] [PATCH 14/27] block: add a bdev_stable_writes helper

2022-04-15 Thread Chaitanya Kulkarni via Linux-f2fs-devel
On 4/14/22 21:52, Christoph Hellwig wrote: > Add a helper to check the stable writes flag based on the block_device > instead of having to poke into the block layer internal request_queue. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Martin K. Petersen > --- Looks good. Reviewed-by: Cha

Re: [f2fs-dev] [PATCH 03/27] target: fix discard alignment on partitions

2022-04-15 Thread Chaitanya Kulkarni via Linux-f2fs-devel
On 4/14/22 21:52, Christoph Hellwig wrote: > Use the proper bdev_discard_alignment helper that accounts for partition > offsets. > > Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6") > Signed-off-by: Christoph Hellwig > Reviewed-by: Martin K. Petersen > --- Helper does handl