qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] request_alignment vs file size
@ 2020-01-30 15:22 Vladimir Sementsov-Ogievskiy
  2020-01-30 15:22 ` [PATCH 1/3] block/file-posix: add raw_getlength_fd Vladimir Sementsov-Ogievskiy
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2020-01-30 15:22 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, den, vsementsov, qemu-devel, mreitz

Hi.

This is a continuation for thread
 "request_alignment vs file size, how to fix crash?"
 <2ca46523-44a2-1a48-dfa3-11bda9eef8e8@virtuozzo.com>
 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(-)

-- 
2.21.0



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-03-23 13:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-30 15:22 [PATCH 0/3] request_alignment vs file size Vladimir Sementsov-Ogievskiy
2020-01-30 15:22 ` [PATCH 1/3] block/file-posix: add raw_getlength_fd Vladimir Sementsov-Ogievskiy
2020-03-11 10:21   ` Max Reitz
2020-01-30 15:22 ` [PATCH 2/3] block/file-posix: consider file size when fallback to max_align Vladimir Sementsov-Ogievskiy
2020-03-11 10:46   ` Max Reitz
2020-01-30 15:22 ` [PATCH 3/3] block: fail on open when file size is unaligned to request_alignment Vladimir Sementsov-Ogievskiy
2020-03-11 11:06   ` Max Reitz
2020-03-11 12:29     ` Eric Blake
2020-03-12  9:06       ` Vladimir Sementsov-Ogievskiy
2020-03-12 11:31         ` Eric Blake
2020-03-12 11:59     ` Vladimir Sementsov-Ogievskiy
2020-03-12 12:06       ` Vladimir Sementsov-Ogievskiy
2020-03-23 13:00         ` Max Reitz
2020-01-30 15:52 ` [PATCH 0/3] request_alignment vs file size no-reply
2020-01-30 16:06   ` Vladimir Sementsov-Ogievskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).