lkml.org 
[lkml]   [2013]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 4/5] fat: fallback to buffered write in case of fallocatded region on direct IO
From
2013/12/1, OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>:
> Namjae Jeon <linkinjeon@gmail.com> writes:
>
>> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
>> index 12a37a9..c9fb9b6 100644
>> --- a/fs/fat/inode.c
>> +++ b/fs/fat/inode.c
>> @@ -217,6 +217,14 @@ static ssize_t fat_direct_IO(int rw, struct kiocb
>> *iocb,
>> loff_t size = offset + iov_iter_count(iter);
>> if (MSDOS_I(inode)->mmu_private < size)
>> return 0;
>> +
>> + /*
>> + * In case of writing in fallocated region, return 0 and
>> + * fallback to buffered write.
>> + */
>> + if (MSDOS_I(inode)->i_disksize >
>> + round_up(i_size_read(inode), inode->i_sb->s_blocksize))
>> + return 0;
>
> ->mmu_private works instead of i_size?
Yes, I will change it.
Thanks.
> --
> OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
>


\
 
 \ /
  Last update: 2013-12-05 16:01    [W:0.078 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site