Re: [PATCH] direct-io: allow direct writes to empty inodes

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

 



On 10/26/18 3:30 AM, Jan Kara wrote:
> On Mon 08-10-18 20:58:23, Ernesto A. Fernández wrote:
>> On a DIO_SKIP_HOLES filesystem, the ->get_block() method is currently
>> not allowed to create blocks for an empty inode.  This confusion comes
>> from trying to bit shift a negative number, so check the size of the
>> inode first.
>>
>> The problem is most visible for hfsplus, because the fallback to
>> buffered I/O doesn't happen and the write fails with EIO.  This is in
>> part the fault of the module, because it gives a wrong return value on
>> ->get_block(); that will be fixed in a separate patch.
>>
>> Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@xxxxxxxxx>
> 
> Good catch. The patch looks good. You can add:
> 
> Reviewed-by: Jan Kara <jack@xxxxxxx>
> 
> Also Jens often picks up patches for direct IO code so added him to CC.
> Jens?

Looks good to me. Ernesto, did you run this through xfstests as well?

-- 
Jens Axboe




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

  Powered by Linux