Re: [PATCHv4 8/9] block: relax direct io memory alignment

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

 



On Thu, May 26, 2022 at 07:50:45AM -0600, Keith Busch wrote:
> On Thu, May 26, 2022 at 12:29:41AM -0700, Eric Biggers wrote:
> > On Wed, May 25, 2022 at 06:06:12PM -0700, Keith Busch wrote:
> > > +	/*
> > > +	 * Each segment in the iov is required to be a block size multiple.
> > 
> > Where is this enforced?
> 
> Right below the comment. If it isn't a block size multiple, then ALIGN_DOWN
> will eventually result in 0 and -EFAULT is returned. 

That's interesting, I would have expected it to be checked in
blkdev_dio_aligned().

EFAULT isn't the correct error code for this case; it should be EINVAL as is
normally the case for bad alignment.  See the man pages for read and write.

- Eric



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux