Re: [PATCH 26/27] block: uncouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD

2022-04-06 Thread Coly Li
On 4/6/22 2:05 PM, 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 For the bcache part, Ack

Re: [PATCH 25/27] block: remove QUEUE_FLAG_DISCARD

2022-04-06 Thread Coly Li
On 4/6/22 2:05 PM, 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 default,

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

2022-04-06 Thread Coly Li
On 4/6/22 2:05 PM, 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 is don

Re: [Ocfs2-devel] [PATCH 26/27] block: uncouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD

2022-04-06 Thread Martin K. Petersen
Christoph, > 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. Great! Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engi

Re: [Ocfs2-devel] [PATCH 25/27] block: remove QUEUE_FLAG_DISCARD

2022-04-06 Thread Martin K. Petersen
Christoph, > Just use a non-zero max_discard_sectors as an indicator for discard > support, similar to what is done for write zeroes. Very happy to finally see this flag removed! Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___

Re: [Ocfs2-devel] [PATCH 24/27] block: add a bdev_discard_granularity helper

2022-04-06 Thread Martin K. Petersen
Christoph, > Abstract away implementation details from file systems by providing a > block_device based helper to retreive the discard granularity. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ linux-um ma

Re: [Ocfs2-devel] [PATCH 23/27] block: add a bdev_max_discard_sectors helper

2022-04-06 Thread Martin K. Petersen
Christoph, > 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 is done e.g. for > write zeroe

Re: [Ocfs2-devel] [PATCH 22/27] block: refactor discard bio size limiting

2022-04-06 Thread Martin K. Petersen
Christoph, > Move all the logic to limit the discard bio size into a common helper > so that it is better documented. Looks OK. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ linux-um mailing list linux-um

Re: [Ocfs2-devel] [PATCH 21/27] block: move {bdev, queue_limit}_discard_alignment out of line

2022-04-06 Thread Martin K. Petersen
Christoph, > No need to inline these fairly larger helpers. Also fix the return > value to be unsigned, just like the field in struct queue_limits. I believe the original reason for the signed int here was to be able to express -1 for sysfs. I am not sure why I didn't just use the misaligned f

Re: [Ocfs2-devel] [PATCH 20/27] block: use bdev_discard_alignment in part_discard_alignment_show

2022-04-06 Thread Martin K. Petersen
Christoph, > Use the bdev based alignment helper instead of open coding it. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailm

Re: [Ocfs2-devel] [PATCH 19/27] block: remove queue_discard_alignment

2022-04-06 Thread Martin K. Petersen
Christoph, > Just use bdev_alignment_offset in disk_discard_alignment_show instead. > That helpers is the same except for an always false branch that > doesn't matter in this slow path. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering _

Re: [Ocfs2-devel] [PATCH 18/27] block: move bdev_alignment_offset and queue_limit_alignment_offset out of line

2022-04-06 Thread Martin K. Petersen
Christoph, > No need to inline these fairly larger helpers. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linu

Re: [Ocfs2-devel] [PATCH 17/27] block: use bdev_alignment_offset in disk_alignment_offset_show

2022-04-06 Thread Martin K. Petersen
Christoph, > This does the same as the open coded variant except for an extra > branch, and allows to remove queue_alignment_offset entirely. Also fine. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ linux

Re: [Ocfs2-devel] [PATCH 15/27] block: use bdev_alignment_offset in part_alignment_offset_show

2022-04-06 Thread Martin K. Petersen
Christoph, > Replace the open coded offset calculation with the proper helper. > This is an ABI change in that the -1 for a misaligned partition is > properly propagated, which can be considered a bug fix and maches what > is done on the whole device. Looks good. Reviewed-by: Martin K. Peterse

Re: [Ocfs2-devel] [PATCH 13/27] block: add a bdev_stable_writes helper

2022-04-06 Thread Martin K. Petersen
Christoph, > 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. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ li

Re: [Ocfs2-devel] [PATCH 12/27] block: add a bdev_fua helper

2022-04-06 Thread Martin K. Petersen
Christoph, > 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. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ linux-um mai

Re: [Ocfs2-devel] [PATCH 11/27] block: add a bdev_write_cache helper

2022-04-06 Thread Martin K. Petersen
Christoph, > 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. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ linu

Re: [Ocfs2-devel] [PATCH 10/27] block: add a bdev_nonrot helper

2022-04-06 Thread Martin K. Petersen
Christoph, > 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. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ linux-um

Re: [dm-devel] [PATCH 14/27] block: add a bdev_max_zone_append_sectors helper

2022-04-06 Thread Martin K. Petersen
Christoph, > Add a helper to check the max supported sectors for zone append based > on the block_device instead of having to poke into the block layer > internal request_queue. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering _

Re: [dm-devel] [PATCH 03/27] target: fix discard alignment on partitions

2022-04-06 Thread Martin K. Petersen
Christoph, > Use the proper bdev_discard_alignment helper that accounts for partition > offsets. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ linux-um mailing list linux-um@lists.infradead.org http://list

Re: [PATCH 02/27] target: pass a block_device to target_configure_unmap_from_queue

2022-04-06 Thread Martin K. Petersen
Christoph, > The target code is a consumer of the block layer and should generally > work on struct block_device. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ linux-um mailing list linux-um@lists.infradea

Re: [dm-devel] [PATCH 01/27] target: remove an incorrect unmap zeroes data deduction

2022-04-06 Thread Martin K. Petersen
Christoph, > For block devices the target code implements UNMAP as calls to > blkdev_issue_discard, which does not guarantee zeroing just because > Write Zeroes is supported. > > Note that this does not affect the file backed path which uses > fallocate to punch holes. Reviewed-by: Martin K. Pe

Re: [dm-devel] [PATCH 01/27] target: remove an incorrect unmap zeroes data deduction

2022-04-06 Thread Martin K. Petersen
Christoph, > For block devices the target code implements UNMAP as calls to > blkdev_issue_discard, which does not guarantee zeroing just because > Write Zeroes is supported. > > Note that this does not affect the file backed path which uses > fallocate to punch holes. > > Fixes: 2237498f0b5c ("

[PATCH AUTOSEL 4.9 3/7] um: port_user: Improve error handling when port-helper is not found

2022-04-06 Thread Sasha Levin
From: Glenn Washburn [ Upstream commit 3cb5a7f167c620a8b0e38b0446df2e024d2243dc ] Check if port-helper exists and is executable. If not, write an error message to the kernel log with information to help the user diagnose the issue and exit with an error. If UML_PORT_HELPER was not set, write a m

[PATCH AUTOSEL 4.9 2/7] um: Cleanup syscall_handler_t definition/cast, fix warning

2022-04-06 Thread Sasha Levin
From: David Gow [ Upstream commit f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9 ] The syscall_handler_t type for x86_64 was defined as 'long (*)(void)', but always cast to 'long (*)(long, long, long, long, long, long)' before use. This now triggers a warning (see below). Define syscall_handler_t as

[PATCH AUTOSEL 4.14 3/8] um: port_user: Improve error handling when port-helper is not found

2022-04-06 Thread Sasha Levin
From: Glenn Washburn [ Upstream commit 3cb5a7f167c620a8b0e38b0446df2e024d2243dc ] Check if port-helper exists and is executable. If not, write an error message to the kernel log with information to help the user diagnose the issue and exit with an error. If UML_PORT_HELPER was not set, write a m

[PATCH AUTOSEL 4.14 2/8] um: Cleanup syscall_handler_t definition/cast, fix warning

2022-04-06 Thread Sasha Levin
From: David Gow [ Upstream commit f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9 ] The syscall_handler_t type for x86_64 was defined as 'long (*)(void)', but always cast to 'long (*)(long, long, long, long, long, long)' before use. This now triggers a warning (see below). Define syscall_handler_t as

[PATCH AUTOSEL 4.19 03/11] um: port_user: Improve error handling when port-helper is not found

2022-04-06 Thread Sasha Levin
From: Glenn Washburn [ Upstream commit 3cb5a7f167c620a8b0e38b0446df2e024d2243dc ] Check if port-helper exists and is executable. If not, write an error message to the kernel log with information to help the user diagnose the issue and exit with an error. If UML_PORT_HELPER was not set, write a m

[PATCH AUTOSEL 4.19 02/11] um: Cleanup syscall_handler_t definition/cast, fix warning

2022-04-06 Thread Sasha Levin
From: David Gow [ Upstream commit f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9 ] The syscall_handler_t type for x86_64 was defined as 'long (*)(void)', but always cast to 'long (*)(long, long, long, long, long, long)' before use. This now triggers a warning (see below). Define syscall_handler_t as

[PATCH AUTOSEL 5.4 03/17] um: Cleanup syscall_handler_t definition/cast, fix warning

2022-04-06 Thread Sasha Levin
From: David Gow [ Upstream commit f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9 ] The syscall_handler_t type for x86_64 was defined as 'long (*)(void)', but always cast to 'long (*)(long, long, long, long, long, long)' before use. This now triggers a warning (see below). Define syscall_handler_t as

[PATCH AUTOSEL 5.4 04/17] um: port_user: Improve error handling when port-helper is not found

2022-04-06 Thread Sasha Levin
From: Glenn Washburn [ Upstream commit 3cb5a7f167c620a8b0e38b0446df2e024d2243dc ] Check if port-helper exists and is executable. If not, write an error message to the kernel log with information to help the user diagnose the issue and exit with an error. If UML_PORT_HELPER was not set, write a m

[PATCH AUTOSEL 5.10 04/25] um: Cleanup syscall_handler_t definition/cast, fix warning

2022-04-06 Thread Sasha Levin
From: David Gow [ Upstream commit f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9 ] The syscall_handler_t type for x86_64 was defined as 'long (*)(void)', but always cast to 'long (*)(long, long, long, long, long, long)' before use. This now triggers a warning (see below). Define syscall_handler_t as

[PATCH AUTOSEL 5.10 05/25] um: port_user: Improve error handling when port-helper is not found

2022-04-06 Thread Sasha Levin
From: Glenn Washburn [ Upstream commit 3cb5a7f167c620a8b0e38b0446df2e024d2243dc ] Check if port-helper exists and is executable. If not, write an error message to the kernel log with information to help the user diagnose the issue and exit with an error. If UML_PORT_HELPER was not set, write a m

[PATCH AUTOSEL 5.15 04/27] um: Cleanup syscall_handler_t definition/cast, fix warning

2022-04-06 Thread Sasha Levin
From: David Gow [ Upstream commit f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9 ] The syscall_handler_t type for x86_64 was defined as 'long (*)(void)', but always cast to 'long (*)(long, long, long, long, long, long)' before use. This now triggers a warning (see below). Define syscall_handler_t as

[PATCH AUTOSEL 5.15 05/27] um: port_user: Improve error handling when port-helper is not found

2022-04-06 Thread Sasha Levin
From: Glenn Washburn [ Upstream commit 3cb5a7f167c620a8b0e38b0446df2e024d2243dc ] Check if port-helper exists and is executable. If not, write an error message to the kernel log with information to help the user diagnose the issue and exit with an error. If UML_PORT_HELPER was not set, write a m

[PATCH AUTOSEL 5.16 07/30] um: Cleanup syscall_handler_t definition/cast, fix warning

2022-04-06 Thread Sasha Levin
From: David Gow [ Upstream commit f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9 ] The syscall_handler_t type for x86_64 was defined as 'long (*)(void)', but always cast to 'long (*)(long, long, long, long, long, long)' before use. This now triggers a warning (see below). Define syscall_handler_t as

[PATCH AUTOSEL 5.16 08/30] um: port_user: Improve error handling when port-helper is not found

2022-04-06 Thread Sasha Levin
From: Glenn Washburn [ Upstream commit 3cb5a7f167c620a8b0e38b0446df2e024d2243dc ] Check if port-helper exists and is executable. If not, write an error message to the kernel log with information to help the user diagnose the issue and exit with an error. If UML_PORT_HELPER was not set, write a m

[PATCH AUTOSEL 5.17 08/31] um: port_user: Improve error handling when port-helper is not found

2022-04-06 Thread Sasha Levin
From: Glenn Washburn [ Upstream commit 3cb5a7f167c620a8b0e38b0446df2e024d2243dc ] Check if port-helper exists and is executable. If not, write an error message to the kernel log with information to help the user diagnose the issue and exit with an error. If UML_PORT_HELPER was not set, write a m

[PATCH AUTOSEL 5.17 07/31] um: Cleanup syscall_handler_t definition/cast, fix warning

2022-04-06 Thread Sasha Levin
From: David Gow [ Upstream commit f4f03f299a56ce4d73c5431e0327b3b6cb55ebb9 ] The syscall_handler_t type for x86_64 was defined as 'long (*)(void)', but always cast to 'long (*)(long, long, long, long, long, long)' before use. This now triggers a warning (see below). Define syscall_handler_t as

Re: [PATCH 24/27] block: add a bdev_discard_granularity helper

2022-04-06 Thread Ryusuke Konishi
On Wed, Apr 6, 2022 at 11:06 PM Christoph Hellwig wrote: > > Abstract away implementation details from file systems by providing a > block_device based helper to retreive the discard granularity. > > Signed-off-by: Christoph Hellwig > --- > block/blk-lib.c | 5 ++--- > drive

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

2022-04-06 Thread Ryusuke Konishi
On Wed, Apr 6, 2022 at 11:05 PM 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. Th

Re: [PATCH 07/27] btrfs: use bdev_max_active_zones instead of open coding it

2022-04-06 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [Cluster-devel] [PATCH 23/27] block: add a bdev_max_discard_sectors helper

2022-04-06 Thread Andreas Gruenbacher
On Wed, Apr 6, 2022 at 8:07 AM 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. Thi

Re: [PATCH 15/27] block: use bdev_alignment_offset in part_alignment_offset_show

2022-04-06 Thread Alan Robinson
Hi Christoph, On Wed, Apr 06, 2022 at 06:05:04AM +, Christoph Hellwig wrote: > From: Christoph Hellwig > Subject: [PATCH 15/27] block: use bdev_alignment_offset in > part_alignment_offset_show > > Replace the open coded offset calculation with the proper helper. > This is an ABI change in t