All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junichi Nomura <j-nomura@ce.jp.nec.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
	device-mapper development <dm-devel@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>
Subject: Re: [PATCH for-4.2 2/3] block, dm: don't copy bios for request clones
Date: Mon, 1 Jun 2015 01:19:13 +0000	[thread overview]
Message-ID: <556BB311.7050505@ce.jp.nec.com> (raw)
In-Reply-To: <20150529165545.GB2682@lst.de>

On 05/30/15 01:55, Christoph Hellwig wrote:
> On Wed, May 27, 2015 at 09:50:18AM +0000, Junichi Nomura wrote:
>> Can you test this scenario with your patch?
>>   1. Set up a multipath device with fail-over mode
>>   2. Write something to the multipath device.
>>      After the clone request is sent to the primary path
>>      and before the data goes to the disk, 
>>      down the primary path
>>      (e.g. echo offline > /sys/block/sdXX/device/state)
>>   3. (dm-mpath will retry from the secondary path and
>>       the write will eventually succeed)
>>   4. Verify if the written data is really on the disk
> 
> Verified as not working correctly.  The patch below fixes it,
> but it needs more testing and some comments:

Thanks. But just skipping bio_advance() is not good.

For example, blk_update_request() does this:

>         while (req->bio) {
>                 struct bio *bio = req->bio;
>                 unsigned bio_bytes = min(bio->bi_iter.bi_size, nr_bytes);
> 
>                 if (bio_bytes == bio->bi_iter.bi_size)
>                         req->bio = bio->bi_next;

if bi_iter.bi_size is not correct, we possibly fail
to move the req->bio pointer.

So other test case could be:

1. Create a bio with 1MB size
2. Submit a request with the bio
3. From lower driver,
   firstly partial complete 512KB with error,
   secondly partial complete 512KB without error
4. The I/O should complete successfully.

And yet another test:

1. Create 4 READ bios with each 4KB
2. Submit a request with the 4 bios
3. From lower driver,
   partial complete 8KB without error,
   partial complete 4KB with error (emulate medium error),
   partial complete 4KB without error
4. Verify the read data.
   Only the 3rd 4KB should be failed.
   Others should have correct contents.

-- 
Jun'ichi Nomura, NEC Corporation

  reply	other threads:[~2015-06-01  1:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 13:14 [PATCH for-4.2 1/3] block: remove management of bi_remaining when restoring original bi_end_io Mike Snitzer
2015-05-22 13:14 ` [PATCH for-4.2 2/3] block, dm: don't copy bios for request clones Mike Snitzer
2015-05-26  6:20   ` Junichi Nomura
2015-05-27  8:21     ` Christoph Hellwig
2015-05-27  9:50       ` Junichi Nomura
2015-05-28  6:38         ` Junichi Nomura
2015-05-29 16:54           ` Christoph Hellwig
2015-06-01  1:14             ` Junichi Nomura
2015-06-03  7:37               ` Christoph Hellwig
2015-06-03 23:13                 ` Junichi Nomura
2015-05-29 16:55         ` Christoph Hellwig
2015-06-01  1:19           ` Junichi Nomura [this message]
2015-06-03  7:39             ` Christoph Hellwig
2015-05-22 13:14 ` [PATCH for-4.2 3/3] block: remove export for blk_queue_bio Mike Snitzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556BB311.7050505@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=hch@lst.de \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.