Skip to content

request_alignment vs file size

Vladimir Sementsov-Ogievskiy qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3block/file-posix: add raw_getlength_fdblock/file-posix.c+23 -211 reply
2/3block/file-posix: consider file size when fallback to max_alignblock/file-posix.c+15 -11 reply
3/3block: fail on open when file size is unaligned to request_alignmentblock.c+7 -07 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] request_alignment vs file size

Hi.

This is a continuation for thread
"request_alignment vs file size, how to fix crash?" <[email protected]>
https://lists.gnu.org/archive/html/qemu-devel/2020-01/msg07276.html

Generic block-layer assumes that file size is aligned to request_alignment, and may crash otherwise (see patch 03 for simple reproducer).

So, let's at least check this thing on generic driver open, and fix file-posix to consider file-size, when it wants to fallback to large request_alignment.

Vladimir Sementsov-Ogievskiy (3):
block/file-posix: add raw_getlength_fd
block/file-posix: consider file size when fallback to max_align
block: fail on open when file size is unaligned to request_alignment

 block.c            |  7 ++++++
 block/file-posix.c | 60 +++++++++++++++++++++++++++++-----------------
 2 files changed, 45 insertions(+), 22 deletions(-)
Signature · 1 line
2.21.0