[Samba] renaming over to a busy file: traces

Ralph Boehme slow at samba.org
Wed Mar 20 17:18:59 UTC 2024


On 3/19/24 07:22, Michael Tokarev via samba wrote:
> It looks to me that while renaming a file, samba checks only if the SOURCE
> file is locked, but not if the DESTINATION file is locked.

d'oh! I completely missed that part...

I guess the problem is that we can't lock two locking.tdb records 
simultaneously. We already have the source file record locked, also 
locking the the destination record is not possible.

We could check the destination record without holding a lock *before* 
acquiring the lock on the source file record, but that would be a 
possible victim to races. It would be better then what we have now 
though I guess. Patches welcome! :)

Cheers!
-slow

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20240320/7cb4c53c/OpenPGP_signature.sig>


More information about the samba mailing list