All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Fix silent data corruption in blkdev_direct_IO()
@ 2018-07-19 21:01 Martin Wilck
  2018-07-19 21:01 ` [PATCH v3 1/3] block: bio_iov_iter_get_pages: fix size of last iovec Martin Wilck
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Martin Wilck @ 2018-07-19 21:01 UTC (permalink / raw)
  To: Jens Axboe, Ming Lei, Jan Kara
  Cc: Hannes Reinecke, Johannes Thumshirn, Christoph Hellwig, Al Viro,
	Kent Overstreet, linux-block, Martin Wilck

Hello Jens, Ming, Jan, and all others,

the following patches have been verified by a customer to fix a silent data
corruption which he has been seeing since "72ecad2 block: support a full bio
worth of IO for simplified bdev direct-io".

The patches are based on our observation that the corruption is only
observed if the __blkdev_direct_IO_simple() code path is executed,
and if that happens, "short writes" are observed in this code path,
which causes a fallback to buffered IO, while the application continues
submitting direct IO requests.

I called this v3 because the first patch was at v2 already in the previous
submission.

Changes wrt v1:
 - 1/3: minor formatting change (Christoph)
 - 2/3: split off the leak fix (Ming)
 - 3/3: give up if bio_iov_iter_get_pages() returns an error (Jan)
 - 3/3: warn if space in bio exhausted (Jan)
 - 3/3: add comments

Martin Wilck (3):
  block: bio_iov_iter_get_pages: fix size of last iovec
  blkdev: __blkdev_direct_IO_simple: fix leak in error case
  blkdev: __blkdev_direct_IO_simple: make sure to fill up the bio

 block/bio.c    | 18 ++++++++----------
 fs/block_dev.c | 27 +++++++++++++++++++++++----
 2 files changed, 31 insertions(+), 14 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2018-07-20  7:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-19 21:01 [PATCH v3 0/3] Fix silent data corruption in blkdev_direct_IO() Martin Wilck
2018-07-19 21:01 ` [PATCH v3 1/3] block: bio_iov_iter_get_pages: fix size of last iovec Martin Wilck
2018-07-19 21:01 ` [PATCH v3 2/3] blkdev: __blkdev_direct_IO_simple: fix leak in error case Martin Wilck
2018-07-20  2:22   ` Ming Lei
2018-07-19 21:01 ` [PATCH v3 3/3] blkdev: __blkdev_direct_IO_simple: make sure to fill up the bio Martin Wilck
2018-07-20  2:41   ` Ming Lei
2018-07-20  7:18     ` Martin Wilck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.