[lkml]   [2012]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 06/25] vfs: add i_op->atomic_create()
On Wed, Mar 07, 2012 at 10:22:23PM +0100, Miklos Szeredi wrote:
> From: Miklos Szeredi <>
> 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.

 \ /
  Last update: 2012-03-13 10:39    [W:0.191 / U:16.444 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site