Re: [PATCH for-4.2 2/3] block, dm: don't copy bios for request clones

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/27/15 17:21, Christoph Hellwig wrote:
> On Tue, May 26, 2015 at 06:20:43AM +0000, Junichi Nomura wrote:
>> Not completing bios is not sufficient.
>> If you advance the bi_iter to the end, you need to somehow rewind it
>> or the re-submission will be incomplete, that would end up as a data
>> corruption...
> 
> Can you explain which particular case you're worried about?

General path failure case.

On retrying, another clone is created but bios it points to
are already advanced to the end with your patch.
So they look like bios with no remaining segments.
Lower driver may successfully completes such a resubmitted
clone *without doing actual I/O*.
Then written data will be lost / read data will be bogus.

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

-- 
Jun'ichi Nomura, NEC Corporation

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux