[PATCH v4 0/2] block: discard alignment fixes

Stefan Hajnoczi posted 2 patches 8 months ago
Failed in applying to current master (apply log)
block/file-posix.c | 67 +++++++++++++++++++++++++++++++++++++++++++++-
block/io.c         | 15 +++++++----
2 files changed, 76 insertions(+), 6 deletions(-)
[PATCH v4 0/2] block: discard alignment fixes
Posted by Stefan Hajnoczi 8 months ago
v4:
- Mention -EINVAL in bdrv_co_pdiscard() comment [Kevin]
v3:
- Refine error handling when pdiscard_alignment is not a multiple of request_alignment [Hanna]
v2:
- Fix inverted logic in alignment check [Qing Wang]

Two discard alignment issues were identified in
https://issues.redhat.com/browse/RHEL-86032:
1. pdiscard_alignment is not populated for host_device in file-posix.c.
2. Misaligned head/tail discard requests are not skipped when file-posix.c
   returns -EINVAL. This causes an undesired pause when guests are configured
   with werror=stop.

Stefan Hajnoczi (2):
  file-posix: probe discard alignment on Linux block devices
  block/io: skip head/tail requests on EINVAL

 block/file-posix.c | 67 +++++++++++++++++++++++++++++++++++++++++++++-
 block/io.c         | 15 +++++++----
 2 files changed, 76 insertions(+), 6 deletions(-)

-- 
2.49.0
Re: [PATCH v4 0/2] block: discard alignment fixes
Posted by Kevin Wolf 7 months, 3 weeks ago
Am 17.04.2025 um 17:05 hat Stefan Hajnoczi geschrieben:
> v4:
> - Mention -EINVAL in bdrv_co_pdiscard() comment [Kevin]
> v3:
> - Refine error handling when pdiscard_alignment is not a multiple of request_alignment [Hanna]
> v2:
> - Fix inverted logic in alignment check [Qing Wang]
> 
> Two discard alignment issues were identified in
> https://issues.redhat.com/browse/RHEL-86032:
> 1. pdiscard_alignment is not populated for host_device in file-posix.c.
> 2. Misaligned head/tail discard requests are not skipped when file-posix.c
>    returns -EINVAL. This causes an undesired pause when guests are configured
>    with werror=stop.

Thanks, applied to the block branch.

Kevin