Re: [PATCH v2 3/4] dm: dm-crypt: Do not split write operations with zoned targets

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

 




On Wed, 25 Jun 2025, Damien Le Moal wrote:

> On 6/25/25 19:19, Mikulas Patocka wrote:
> > 
> > 
> > On Wed, 25 Jun 2025, Damien Le Moal wrote:
> > 
> >> +	bool wrt = op_is_write(bio_op(bio));
> >> +
> >> +	if (wrt) {
> >> +		/*
> >> +		 * For zoned devices, splitting write operations creates the
> >> +		 * risk of deadlocking queue freeze operations with zone write
> >> +		 * plugging BIO work when the reminder of a split BIO is
> >> +		 * issued. So always allow the entire BIO to proceed.
> >> +		 */
> >> +		if (ti->emulate_zone_append)
> >> +			return bio_sectors(bio);
> > 
> > The overrun may still happen (if the user changes the dm table while some 
> > bio is in progress) and if it happens, you should terminate the bio with 
> > DM_MAPIO_KILL (like it was in my original patch).
> 
> I am confused... Overrun against what ? We are now completely ignoring the
> max_write_size limit so even if the user changes it, that will not affect the
> BIO processing. If you are referring to an overrun against the zoned device
> max_hw_sectors limit, it is not possible since changing limits is done with the
> DM device queue frozen, so we are guaranteed that there will be no BIO in-flight.
> 
> I am not sure about what kind of table change you are thinking of, but at the
> very least,  dm_table_supports_size_change() ensure that there cannot be any
> device size change for a zoned DM device. And given the above point about limits
> changes, I do not see how a table change can affect the BIO execution.
> 
> Do you have a specific example in mind ?

What happens if a bio that is larger than "BIO_MAX_VECS << PAGE_SHIFT" 
enters dm_split_and_process_bio? Where will the bio be split? I don't see 
it, but maybe I'm missing something.

Mikulas





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

  Powered by Linux