You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating this issue to be able to continue discussion of the problems observed in zfs_update_inode in 4538. So here is what I've discovered:
In zfs_mkdirzfs_inode_update(dzp) is called to update the state of the parent in which we are creating a directory but also zfs_inode_update(zp); is called to update the state of the newly created inode. However, I think this second call is redundant since zfs_inode_update_new(zp) is already called in zfs_mknode.
The same pattern can be observed inzfs_create after the out: label. Is there really a point in calling zfs_inode_update for the newly created zp?
Furthermore, there are cases where zfs_inode_update is rightfully called, yet the i_mutex is not held, so we must lock it. Example:
I guess we really need to do a mutex_trylock/lock in zfs_inode_update. Or identify all such sites and lock the mutex before calling into zfs_inode_update
The text was updated successfully, but these errors were encountered:
The correct way to do is to to remove this function entirely. When Linux VFS wants to update the fields in inode, it will grab the required lock. We really shouldn't be messing around the field in inode and i_mutex.
I'm creating this issue to be able to continue discussion of the problems observed in zfs_update_inode in 4538. So here is what I've discovered:
zfs_mkdir
zfs_inode_update(dzp)
is called to update the state of the parent in which we are creating a directory but alsozfs_inode_update(zp);
is called to update the state of the newly created inode. However, I think this second call is redundant since zfs_inode_update_new(zp) is already called in zfs_mknode.zfs_create
after theout:
label. Is there really a point in callingzfs_inode_update
for the newly created zp?Furthermore, there are cases where zfs_inode_update is rightfully called, yet the i_mutex is not held, so we must lock it. Example:
Or
I guess we really need to do a mutex_trylock/lock in zfs_inode_update. Or identify all such sites and lock the mutex before calling into zfs_inode_update
The text was updated successfully, but these errors were encountered: