From: "Aurélien Aptel" <aaptel@suse.com>
To: Tom Talpey <tom@talpey.com>,
"Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
Cc: smfrench@gmail.com, linux-cifs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, mtk.manpages@gmail.com,
linux-man@vger.kernel.org
Subject: Re: [PATCH v4] flock.2: add CIFS details
Date: Thu, 11 Mar 2021 18:13:26 +0100 [thread overview]
Message-ID: <87eegltxzd.fsf@suse.com> (raw)
In-Reply-To: <139a3729-9460-7272-b1d7-c2feb5679ee9@talpey.com>
Tom Talpey <tom@talpey.com> writes:
> On 3/11/2021 5:11 AM, Aurélien Aptel wrote:
>> "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com> writes:
>>> I agree with Tom. It's much easier to read if you just say that 'nobrl'
>>> torns off the non-locale behaviour, and acts as 5.4 and earlier kernels.
>>> Unless there's any subtlety that makes it different. Is there any?
>>
>> nobrl also makes fnctl() locks local.
>> In 5.4 and earlier kernel, flock() is local but fnctl() isn't.
>>
>>> BTW, you should use "semantic newlines":
>>
>> Ok, I'll redo once we agree on the text.
>
> I wonder if it's best to leave the nobrl details to the mount.cifs
> manpage, and just make a reference from here.
>
> Another advantage of putting this in a cifs.ko-specific manpage
> is that it would be significantly easier to maintain. The details
> of a 5.4-to-5.5 transition are going to fade over time, and the
> APIs in fcntl(2)/flock(2) really aren't driving that.
I was trying to write in the same style as the NFS details just above (see
existing man page). Give basic overview of the issues.
> If not, it's going to be messy... Aurélien is this correct?
>
> cifs.ko flock()
> - local in <= 5.4
> - remote by default in >= 5.5
> - local if nobrl in >= 5.5
>
> cifs.ko fcntl()
> - remote by default in X.Y
> - local if nobrl in X.Y
Correct.
> Not sure what the value(s) of X.Y actually might be.
AFAIK fcntl() was always remote by default.
And nobrl was added in 2.6.15 (15 years ago). I wouldn't bother
mentionning X.Y, it's already complex enough as it is.
> It seems odd that "nobrl" means "handle locking locally, and never
> send to server". I mean, there is always byte-range locking, right?
Yes the option name can be confusing. Byte-range locking is always
possible, but with "nobrl" it's local-only.
> Are there any other options or configurations that alter this?
I've taken another long look at the cifs.ko and samba code. There are
many knobs that would make an accurate matrix table pretty big.
* If the mount point is done on an SMB1+UNIX Extensions
connection, locking becomes advisory. Unless
forcemandatorylock option is passed. This will eventually be
implemented for SMB3 posix extensions as well (I've started a
thread on the samba-technical mailing list).
* If cifs.ko can get guarantees (via oplocks or leases) that it is the
only user of a file, it caches read/writes but also locking
locally. If the lease is broke then it will send the locks.
The levels of caching cifs.ko can do can be changed with the cache
mount option.
Cheers,
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
next prev parent reply other threads:[~2021-03-11 17:14 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 15:48 [man-pages][PATCH v1] flock.2: add CIFS details Aurélien Aptel
2021-03-03 15:37 ` Tom Talpey
2021-03-03 16:28 ` Aurélien Aptel
2021-03-03 16:37 ` [PATCH v2] " Aurélien Aptel
2021-03-03 18:08 ` Tom Talpey
2021-03-03 19:03 ` [PATCH v3] " Aurélien Aptel
2021-03-03 20:23 ` Tom Talpey
2021-03-04 9:48 ` Aurélien Aptel
2021-03-04 9:50 ` [PATCH v4] " Aurélien Aptel
2021-03-10 19:07 ` Alejandro Colomar (man-pages)
2021-03-11 10:11 ` Aurélien Aptel
2021-03-11 16:21 ` Tom Talpey
2021-03-11 17:13 ` Aurélien Aptel [this message]
2021-03-11 17:29 ` Tom Talpey
2021-03-11 17:45 ` Aurélien Aptel
2021-03-11 20:42 ` Tom Talpey
2021-03-11 22:39 ` Aurélien Aptel
2021-03-15 18:05 ` Pavel Shilovsky
2021-03-16 10:42 ` Aurélien Aptel
2021-03-16 17:39 ` Pavel Shilovsky
2021-03-16 19:42 ` Tom Talpey
2021-03-16 23:04 ` Pavel Shilovsky
2021-03-22 14:30 ` [PATCH v5] " Aurélien Aptel
2021-04-09 12:13 ` Aurélien Aptel
2021-04-11 19:12 ` Alejandro Colomar (man-pages)
2021-03-11 18:01 ` [PATCH v4] " Matthew Wilcox
2021-03-03 16:48 ` [man-pages][PATCH v1] " Tom Talpey
2021-03-03 16:57 ` Aurélien Aptel
2021-03-03 17:41 ` Tom Talpey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eegltxzd.fsf@suse.com \
--to=aaptel@suse.com \
--cc=alx.manpages@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=smfrench@gmail.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox