Re: [PATCH 04/11] fs: add support for allowing applications to pass in write life time hints

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

 



On 06/19/2017 12:58 PM, Christoph Hellwig wrote:
> On Mon, Jun 19, 2017 at 10:02:09AM -0600, Jens Axboe wrote:
>> Actually, one good use case is O_DIRECT on a block device. Since I'm
>> not a huge fan of having per-call hints that is only useful for a
>> single case, how about we add the hints to the struct file as well?
>> For buffered IO, just grab it from the inode. If we have a file
>> available, then that overrides the per-inode setting.
> 
> Even for buffered I/O per-fіle would seem more useful to be honest.
> For the buffer_head based file systems this could even be done fairly
> easily.

If I add the per-file hint as well, then anywhere that has the file should
just grab it from there. Unless not set, then grab from inode.

That does raise an issue with the NONE hint being 0. We can tell right now
if NONE was set, or nothing was set. This becomes a problem if we want the
file hint to override the inode hint. Should probably just bump the values
up by one, so that NONE is 1, SHORT is 2, etc.

-- 
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