Re: [PATCH -v2] ext4: fake direct I/O mode for data=journal

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

 



On Wed, Aug 17, 2011 at 01:42:52PM +0200, Jan Kara wrote:
>   Strictly speaking this is racy wrt. to fcntl() setting O_DIRECT bit.
> Fixing it is actually quite simple - just provide ext4_noop_direct_IO
> function that will just "return 0" and generic write code will fall
> back to buffered IO automatically. We don't want to use the fallback all
> the time since it incurs overhead of flushing and invalidating the mapping
> so what you did above will catch the common case.

Good point!  Yes, that's a much better way to do it.  Actually
ext4_noop_direct_IO() isn't good enough, since even with data=ordered
or data=journalled, because you can set the 'j' attribute to force the
file to use data journalling.  (This is true in ext3 as well, and I'm
not sure something sane happens if you force a file to be data
journalling and then do direct IO on it when in data=ordered or
data=writeback mode.)

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


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux