lkml.org 
[lkml]   [2012]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 03/25] vfs: split __dentry_open()
From
On Mon, Mar 26, 2012 at 3:30 PM, Christoph Hellwig <hch@infradead.org> wrote:
> On Mon, Mar 26, 2012 at 03:22:09PM +0200, Miklos Szeredi wrote:
>> > I think the O_DIRECT checks should move out of the VFS. ??The direct I/O
>> > method isn't called from the VFS anywhere, but just from the
>> > generic_file_* routines in filemap.c, which suggest doing the O_DIRECT
>> > check in there as well.
>>
>> Returning the error at the earliest opportunity (from open as opposed
>> to read/write) makes sense.  Given that some apps may actually rely on
>> the return value from open to verify O_DIRECT support, it doesn't seem
>> to be a good idea to move the checks to read/write.
>
> I'm fine with keeping it in open, bu it should be in generic_file_open,
> not in the VFS (and yeah, generic_file_open is in open.c not filemap.c
> where it should be, sorry)

Unfortunately a lot of filesystems that use generic_file_aio_foo()
don't actually call generic_file_open() in their ->open method. And
it would be difficult to enforce.

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-03-26 15:49    [W:0.119 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site