lkml.org 
[lkml]   [2022]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v12 01/54] vfs: export new_inode_pseudo
On Thu, Mar 31, 2022 at 11:30:37AM -0400, Jeff Layton wrote:
> Ceph needs to be able to allocate inodes ahead of a create that might
> involve a fscrypt-encrypted inode. new_inode() almost fits the bill,
> but it puts the inode on the sb->s_inodes list and when we go to hash
> it, that might be done again.
>
> We could work around that by setting I_CREATING on the new inode, but
> that causes ilookup5 to return -ESTALE if something tries to find it
> before I_NEW is cleared. This is desirable behavior for most
> filesystems, but doesn't work for ceph.
>
> To work around all of this, just use new_inode_pseudo which doesn't add
> it to the sb->s_inodes list.

Umm... I can live with that, but... why not just leave the hash insertion
until the thing is fully set up and you are ready to clear I_NEW?

\
 
 \ /
  Last update: 2022-03-31 21:50    [W:0.322 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site