Re: [PATCH] ublk_drv: set DMA alignment mask to 3

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

 



On Sat, May 11, 2024 at 08:40:57AM -0600, Jens Axboe wrote:
> By default, this will be 511, as that's the block layer default. But
> drivers these days can support memory alignments that aren't tied to
> the sector sizes, instead just being limited by what the DMA engine
> supports. An example is NVMe, where it's generally set to a 32-bit or
> 64-bit boundary. As ublk itself doesn't really care, just set it low
> enough that we don't run into issues with NVMe where the required
> O_DIRECT memory alignment is now more restrictive on ublk than it is
> on the underlying device.
> 
> This was triggered by spurious -EINVAL returns on O_DIRECT IO on a
> setup with ublk managing NVMe devices, which previously worked just
> fine on the NVMe device itself. With the alignment relaxed, the test
> works fine.
> 
> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>

It should be triggered since DIO DMA alignment is relaxed:

Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx>



Thanks, 
Ming





[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