linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/3] block/loop: handle discard/zeroout error
@ 2017-09-07  0:13 Shaohua Li
  2017-09-07  0:13 ` [PATCH V2 1/3] block/loop: don't hijack error number Shaohua Li
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Shaohua Li @ 2017-09-07  0:13 UTC (permalink / raw)
  To: linux-block; +Cc: kernel-team, axboe, Shaohua Li

From: Shaohua Li <shli@fb.com>

Fix some problems when setting up loop device with a block device as back file
and create/mount ext4 in the loop device.

BTW: blkdev_issue_zeroout retries if we immediately find the device doesn't
support zeroout, but it doesn't retry if submit_bio_wait returns -EOPNOTSUPP.
Is this correct behavior?

Thanks,
Shaohua

Shaohua Li (3):
  block/loop: don't hijack error number
  block/loop: use FALLOC_FL_ZERO_RANGE for REQ_OP_WRITE_ZEROES
  block/loop: suppress discard IO error message

 drivers/block/loop.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

-- 
2.9.5

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [PATCH V2 0/3] block/loop: handle discard/zeroout error
@ 2017-09-07 13:20 Ilya Dryomov
  2017-09-07 21:54 ` Shaohua Li
  0 siblings, 1 reply; 10+ messages in thread
From: Ilya Dryomov @ 2017-09-07 13:20 UTC (permalink / raw)
  To: Shaohua Li; +Cc: linux-block, Christoph Hellwig

Hi Shaohua,

You wrote:
> BTW: blkdev_issue_zeroout retries if we immediately find the device doesn't
> support zeroout, but it doesn't retry if submit_bio_wait returns -EOPNOTSUPP.
> Is this correct behavior?

I sent a patch for that yesterday, see "[PATCH] block: cope with WRITE
SAME failing in blkdev_issue_zeroout()" on linux-block.  It checks for
-EREMOTEIO, because that's what I hit, but I wonder if it should check
for -EOPNOTSUPP from submit_bio_wait() as well.  Can you think of
a case where, given bdev_write_zeroes_sectors() != 0, submit_bio_wait()
would fail with -EOPNOTSUPP and we would want to do explicit zeroing?

Please excuse broken threading.

Thanks,

                Ilya

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

end of thread, other threads:[~2017-09-07 21:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-07  0:13 [PATCH V2 0/3] block/loop: handle discard/zeroout error Shaohua Li
2017-09-07  0:13 ` [PATCH V2 1/3] block/loop: don't hijack error number Shaohua Li
2017-09-07  9:22   ` Ming Lei
2017-09-07  0:13 ` [PATCH V2 2/3] block/loop: use FALLOC_FL_ZERO_RANGE for REQ_OP_WRITE_ZEROES Shaohua Li
2017-09-07  9:05   ` Ming Lei
2017-09-07  0:13 ` [PATCH V2 3/3] block/loop: suppress discard IO error message Shaohua Li
2017-09-07  9:16   ` Ming Lei
2017-09-07 21:52     ` Shaohua Li
  -- strict thread matches above, loose matches on Subject: below --
2017-09-07 13:20 [PATCH V2 0/3] block/loop: handle discard/zeroout error Ilya Dryomov
2017-09-07 21:54 ` Shaohua Li

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).