Re: [RFC] block: dio: immediately fail when count < logical block size

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

 



On Tue, May 2, 2023 at 2:11 AM Hannes Reinecke <hare@xxxxxxx> wrote:
>
> On 5/2/23 11:00, Luis Chamberlain wrote:
> > When using direct IO of say 4k on a 32k physical block size device
> > we crash. The amount of data requested must match the minimum IO supported
> > by the device but instead we take it for a ride right now and try to fail
> > later after checking alignments.
>
> Something is askew with that reasoning.
> If the above were true, we would also crash if we were attempting a 512
> byte direct I/O write on a 4k drive.

We do fail, the question is if the math with iov_iter_revert() is
right for the failed return value when unaligned.

> And I'm reasonably sure that we don't.
>
> So where's the difference?

I think a different return value used which busts iov_iter_revert().

  Luis




[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