Re: [PATCH 14/14] block: add special APIs for run-time disabling of discard and friends

2024-06-13 Thread Martin K. Petersen
/O completion handlers can't > take sleeping locks or freeze the queue. Keep the existing clearing of > the relevant field to zero, but replace the old blk_queue_max_* APIs > with new disable APIs that force the value to 0. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 13/14] block: remove unused queue limits API

2024-06-13 Thread Martin K. Petersen
Christoph, > Remove all APIs that are unused now that sd and sr have been converted > to the atomic queue limits API. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 12/14] sr: convert to the atomic queue limits API

2024-06-13 Thread Martin K. Petersen
. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 11/14] sd: convert to the atomic queue limits API

2024-06-13 Thread Martin K. Petersen
d limits. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 10/14] sd: cleanup zoned queue limits initialization

2024-06-13 Thread Martin K. Petersen
d-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 09/14] sd: factor out a sd_discard_mode helper

2024-06-13 Thread Martin K. Petersen
Christoph, > Split the logic to pick the right discard mode into a little helper > to prepare for further changes. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 08/14] sd: simplify the disable case in sd_config_discard

2024-06-13 Thread Martin K. Petersen
Christoph, > Fall through to the main call to blk_queue_max_discard_sectors given > that max_blocks has been initialized to zero above instead of > duplicating the call. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 07/14] sd: add a sd_disable_write_same helper

2024-06-13 Thread Martin K. Petersen
limits > API. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 06/14] sd: add a sd_disable_discard helper

2024-06-13 Thread Martin K. Petersen
e limits API. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 05/14] sd: simplify the ZBC case in provisioning_mode_store

2024-06-13 Thread Martin K. Petersen
has probably been > around for far too long to change this now. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 04/14] block: take io_opt and io_min into account for max_sectors

2024-06-13 Thread Martin K. Petersen
bilities (sd). Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 03/14] rbd: increase io_opt again

2024-06-13 Thread Martin K. Petersen
he readahead size despite it's > name actually limits the size of any buffered read) and to prepare for > using io_opt in the max_sectors calculation and getting drivers out of > the business of overriding the max_user_sectors value. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 02/14] ubd: untagle discard vs write zeroes not support handling

2024-06-13 Thread Martin K. Petersen
at actually failed. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 01/14] ubd: refactor the interrupt handler

2024-06-13 Thread Martin K. Petersen
Christoph, > Instead of a separate handler function that leaves no work in the > interrupt hanler itself, split out a per-request end I/O helper and ^^ handler > clean up the coding style and variable naming while we're at it. Reviewed-by: Martin K. Petersen

Re: convert the SCSI ULDs to the atomic queue limits API v2

2024-05-31 Thread Martin K. Petersen
cile your changes with mine... -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] xen/scsifront: shost_priv() can never return NULL

2023-08-30 Thread Martin K. Petersen
t; [...] Applied to 6.6/scsi-queue, thanks! [1/1] xen/scsifront: shost_priv() can never return NULL https://git.kernel.org/mkp/scsi/c/73c7881b5066 -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] xen/scsifront: shost_priv() can never return NULL

2023-08-24 Thread Martin K. Petersen
Juergen, > There is no need to check whether shost_priv() returns a non-NULL > value, as the pointer returned is just an offset to the passed in > parameter. > > While at it replace an open coded shost_priv() instance. Applied to 6.6/scsi-staging, thanks! -- Martin K. Peter

Re: fix and cleanup discard_alignment handling

2022-04-25 Thread Martin K. Petersen
nded up with "discard_alignment" when I called the corresponding I/O parameter "alignment_offset". Anyway. All this looks good to me. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

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 Ora

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

2022-04-06 Thread Martin K. Petersen
for > write zeroes as well. Nicer! Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

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

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

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

2022-04-06 Thread Martin K. Petersen
misaligned flag. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

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

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

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

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

2022-04-06 Thread Martin K. Petersen
by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

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

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

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

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

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

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: [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

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

2022-04-06 Thread Martin K. Petersen
iewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

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

2022-04-06 Thread Martin K. Petersen
> Fixes: 2237498f0b5c ("target/iblock: Convert WRITE_SAME to > blkdev_issue_zeroout") > Signed-off-by: Christoph Hellwig -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 0/9] block: reviewed add_disk() error handling set

2021-10-20 Thread Martin K. Petersen
ups of > patches now: > > [...] Applied to 5.16/scsi-queue, thanks! [1/9] scsi/sd: add error handling support for add_disk() https://git.kernel.org/mkp/scsi/c/2a7a891f4c40 [2/9] scsi/sr: add error handling support for add_disk() https://git.kernel.org/mkp/scsi/c/e9d658c

Re: [PATCH 1/9] scsi/sd: add error handling support for add_disk()

2021-10-18 Thread Martin K. Petersen
Luis, > Thanks, would you like Jens to pick this up and the other scsi/sr patch > or are you taking it through your tree? Didn't think I had the relevant add_disk() patch in my baseline tree but it turns out I do. So I queued them up. Thanks! -- Martin K. Petersen O

Re: [PATCH 2/9] scsi/sr: add error handling support for add_disk()

2021-10-16 Thread Martin K. Petersen
Luis, > We never checked for errors on add_disk() as this function returned > void. Now that this is fixed, use the shiny new error handling. > > Just put the cdrom kref and have the unwinding be done by > sr_kref_release(). Acked-by: Martin K. Petersen -- Martin K. Peter

Re: [PATCH 1/9] scsi/sd: add error handling support for add_disk()

2021-10-16 Thread Martin K. Petersen
scsi_disk_release(). Acked-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: (subset) [PATCH 000/141] Fix fall-through warnings for Clang

2020-12-07 Thread Martin K. Petersen
eak/goto/return/fallthrough statements instead of just > letting the code fall through to the next case. > > [...] Applied to 5.11/scsi-queue, thanks! [054/141] target: Fix fall-through warnings for Clang https://git.kernel.org/mkp/scsi/c/492096ecfa39 -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-30 Thread Martin K. Petersen
Gustavo, > This series aims to fix almost all remaining fall-through warnings in > order to enable -Wimplicit-fallthrough for Clang. Applied 20-22,54,120-124 to 5.11/scsi-staging, thanks. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 04/24] sd: update the bdev size in sd_revalidate_disk

2020-11-10 Thread Martin K. Petersen
Christoph, > This avoids the extra call to revalidate_disk_size in sd_rescan and > is otherwise a no-op because the size did not change, or we are in > the probe path. Acked-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [Xen-devel] [PATCH v3] block: refactor duplicated macros

2020-03-10 Thread Martin K. Petersen
FT" too and rename SECTOR_MASK to PAGE_SECTORS_MASK. Looks OK to me. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V4 1/9] block: add a helper function to read nr_setcs

2019-07-16 Thread Martin K. Petersen
prefer adding a check ? I checked your call sites and they look fine. Also, I don't think returning a capacity of 0 on error is going to help us much. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [Xen-devel] [PATCH V4 1/9] block: add a helper function to read nr_setcs

2019-07-11 Thread Martin K. Petersen
Hi Chaitanya, > +static inline sector_t bdev_nr_sects(struct block_device *bdev) > +{ > + return part_nr_sects_read(bdev->bd_part); > +} Can bdev end up being NULL in any of the call sites? Otherwise no objections. -- Martin K. Petersen Oracle Li

Re: [Xen-devel] [PATCH 00/41] scsi: Mark expected switch fall-throughs

2018-12-18 Thread Martin K. Petersen
Hi Gustavo, > Only 8 out the 41 patches in this series have been applied so far. I applied the patches that got acked or reviewed by their respective driver maintainers. If you haven't received feedback on a patch you should poke the relevant driver maintainer. -- Martin K.

Re: [Xen-devel] [PATCH 41/41] scsi: xen-scsifront: mark expected switch fall-through

2018-11-28 Thread Martin K. Petersen
h - Missed the backend's Closing state", which > contains the "fall through" annotation at the beginnig of > the code comment, which is what GCC is expecting to find. Applied to 4.21/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering