Re: [PATCH v2] vfs: fix a bug when we do some dio reads with append dio writes

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

 



On Fri, Nov 29, 2013 at 05:18:04PM +0800, Peng Tao wrote:
> On Fri, Nov 29, 2013 at 9:07 AM, Zheng Liu <gnehzuil.liu@xxxxxxxxx> wrote:
> >   generic_file_aio_read()
> >   ->do_generic_file_read()
> >     [fallback to buffered read]
> This seems to be another thing that you might want to fix. In
> generic_file_aio_read() of DIO, if pos >= isize, it also falls back to
> do_generic_file_read() but can just return instead.

Sorry, maybe I don't clarify the problem.  Actually this patch tries to
fix this problem that you pointed out.  When we do some append dio
writes, and we try to do some dio reads to get the last some data from
the same file, we will encounter this problem.  The root cause is that
we will fall back to buffered read if pos >= isize.  In first version
[1], I just let it return directly to fix the problem if pos >= isize.
But it's not perfect.

1. http://www.spinics.net/lists/linux-fsdevel/msg70358.html

> Or is there any
> historical reason to fall back there?

I also want to know why we do this. :)

Regards,
                                                - Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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