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
Christoph Hellwig <hch@infradead.org> writes:

> On Wed, Mar 07, 2012 at 10:22:23PM +0100, Miklos Szeredi wrote:
>> From: Miklos Szeredi <mszeredi@suse.cz>
>>
>> Add a new inode operation which is called on regular file create. This is a
>> replacement for ->create() which allows the file to be opened atomically with
>> creation.
>>
>> This function is also called for non-open creates (mknod(2)) with a NULL file
>> argument. Only one of ->create or ->atomic_create will be called, implementing
>> both makes no sense.
>>
>> The functionality of this method partially overlaps that of ->atomic_open().
>> FUSE and 9P only use ->atomic_create, NFS, CIFS and CEPH use both.
>
> I really don't like the special casing of the mknod handling in every
> atomic_create instance. Either we should keep ->create for it, or do a
> cleanup pass before to always make that pass go through ->mknod - in
> fact most filesystems handle the two in common code anyway so we might
> be able to get rid of one of them, possible mkdir as well.

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.

Thanks,
Miklos


\
 
 \ /
  Last update: 2012-03-13 12:25    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site