lkml.org 
[lkml]   [2012]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 06/25] vfs: add i_op->atomic_create()
Date
Miklos Szeredi <miklos@szeredi.hu> writes:

> Christoph Hellwig <hch@infradead.org> writes:
>
>> On Tue, Mar 13, 2012 at 12:22:10PM +0100, Miklos Szeredi wrote:
>>> Good point. Yes, ->create is probably worth getting rid of. Mkdir, I'm
>>> not so sure, but I'll look at what filesystems are doing.
>>
>> Btw, is there any good reason to keep ->atomic_open and ->atomic_create
>> separate? It seems like the instances in general share code anyway.
>
> ->atomic_open is called before lookup, ->atomic_create after lookup.
>
> How would we differentiate between the two if they were common? We
> could have a filesystem flag, but for example CEPH does weird things
> like using ->atomic_open for !O_CREAT and ->atomic_create for O_CREAT.

Or let the filesystem do the lookup in ->atomic_open if it wants (and
pass the need_lookup flag to the filesystem).

Thanks,
Miklos


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