Skip to contentSkip to conversation

linux-next: manual merge of the vfs tree with the overlayfs tree

DISCUSSION Stephen Rothwell 3 participants 4 messages May 2, 2016 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

fs/overlayfs/super.c

between commit:

d478d6a8b8b7 ("ovl: ignore permissions on underlying lookup")

from the overlayfs tree and commit:

5cf3e7fecb43 ("ovl_lookup_real(): use lookup_one_len_unlocked()")

from the vfs tree.

I fixed it up (I used the overlayfs version, since I don't know the locking consequences of teh change from lookup_one_len() to lookup_hash()) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 16 lines · Stephen Rothwell

Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

fs/overlayfs/super.c

between commit:

d478d6a8b8b7 ("ovl: ignore permissions on underlying lookup")

from the overlayfs tree and commit:

5cf3e7fecb43 ("ovl_lookup_real(): use lookup_one_len_unlocked()")

from the vfs tree.

Quoted 7 lines

I fixed it up (I used the overlayfs version, since I don't know the locking consequences of teh change from lookup_one_len() to lookup_hash()) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Should use lookup_one_len_unlocked(), actually. lookup_hash() is a microoptimization, losing a lot more on excessive i_mutex contention. Either variant works, though.

#2 lore raw
Quoted 3 lines · Al Viro

Should use lookup_one_len_unlocked(), actually. lookup_hash() is a microoptimization, losing a lot more on excessive i_mutex contention. Either variant works, though.

PS: if anybody has a better name for lookup_one_len_unlocked(), I'll gladly rename it; the thing hadn't been in the kernel for too long and the name is somewhat confusing. It's an equivalent of
inode_lock()
lookup_one_len()
inode_unlock()
except that it avoids taking the lock when it's not needed.

#3 lore raw
In reply to Al Viro
Quoted 25 lines · Al Viro
Quoted 16 lines · Stephen Rothwell

Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

fs/overlayfs/super.c

between commit:

d478d6a8b8b7 ("ovl: ignore permissions on underlying lookup")

from the overlayfs tree and commit:

5cf3e7fecb43 ("ovl_lookup_real(): use lookup_one_len_unlocked()")

from the vfs tree.

Quoted 7 lines

I fixed it up (I used the overlayfs version, since I don't know the locking consequences of teh change from lookup_one_len() to lookup_hash()) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Quoted 3 lines

Should use lookup_one_len_unlocked(), actually. lookup_hash() is a microoptimization, losing a lot more on excessive i_mutex contention. Either variant works, though.

No, here it's not an optimization:

"More specifically using lookup_one_len() causes a problem when the lower directory lacks search permission for a specific user while the upper directory does have search permission. Since lookups are cached, this causes inconsistency in behavior: success depends on who did the first lookup."

Thanks,
Miklos