Re: [PATCH v17 02/14] dm-linear: Report to the block layer that the write order is preserved

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

 




On Tue, 21 Jan 2025, Bart Van Assche wrote:

> > How is write pipelining supposed to work with suspend/resume? dm doesn't
> > preserve the order of writes in case of suspend.
> 
> That's an interesting question. I expect that the following will happen
> upon resume if zoned writes would have been reordered by dm-linear:
> * The block device reports one or more unaligned write errors.
> * For the zones for which an unaligned write error has been reported,
>   the flag BLK_ZONE_WPLUG_ERROR is set (see also patch 07/14 in this
>   series).
> * Further zoned writes are postponed for the BLK_ZONE_WPLUG_ERROR zones
>   until all pending zoned writes have completed.
> * Once all pending zoned writes have completed for a
>   BLK_ZONE_WPLUG_ERROR zone, these are resubmitted. This happens in LBA
>   order.
> * The resubmitted writes will succeed unless the submitter (e.g. a
>   filesystem) left a gap between the zoned writes. If the submitter
>   does not follow the zoned block device specification, the zoned
>   writes will be retried until the number of retries has been exhausted.
>   Block devices are expected to set the number of retries to a small
>   positive number.

On suspend, dm_submit_bio calls queue_io to add bios to a list. On resume, 
the list is processed in order and the bios are submitted, but this 
submitting of deferred bios may race with new bios that may be received 
and directed to the underlying block device - so, the new bios may be 
submitted before the old bios.

Mikulas





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux