Thread (30 messages) 30 messages, 15 authors, 2021-08-23

Re: Removing Mandatory Locks

From: J. Bruce Fields <hidden>
Date: 2021-08-23 22:15:52
Also in: linux-fsdevel, linux-mm, linux-unionfs, lkml

On Sat, Aug 21, 2021 at 08:45:54AM -0400, Jeff Layton wrote:
On Fri, 2021-08-20 at 17:29 -0400, Jeff Layton wrote:
quoted
No, Windows has deny-mode locking at open time, but the kernel's
mandatory locks are enforced during read/write (which is why they are
such a pain). Samba will not miss these at all.

If we want something to provide windows-like semantics, we'd probably
want to start with something like Pavel Shilovsky's O_DENY_* patches.

-- Jeff
Doh! It completely slipped my mind about byte-range locks on windows...

Those are mandatory and they do block read and write activity to the
ranges locked. They have weird semantics vs. POSIX locks (they stack
instead of splitting/merging, etc.).

Samba emulates these with (advisory) POSIX locks in most cases. Using
mandatory locks is probably possible, but I think it would add more
potential for deadlock and security issues.
Right, so Windows byte-range locks are different from Windows open deny
modes.

But even if somebody wanted to implement them, I doubt they'd start with
the mandatory locking code you're removing here, so I think they're
irrelevant to this discussion.

--b.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help