public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Aurélien Aptel" <aaptel@suse.com>
To: Tom Talpey <tom@talpey.com>,
	linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-man@vger.kernel.org, mtk.manpages@gmail.com
Cc: smfrench@gmail.com
Subject: Re: [man-pages][PATCH v1] flock.2: add CIFS details
Date: Wed, 03 Mar 2021 17:28:14 +0100	[thread overview]
Message-ID: <8735xcxkv5.fsf@suse.com> (raw)
In-Reply-To: <5ae02f1f-af45-25aa-71b1-4f8782286158@talpey.com>

Hi Tom,

Thanks for taking a look.

Tom Talpey <tom@talpey.com> writes:
> On 3/2/2021 10:48 AM, Aurélien Aptel wrote:
> I'd suggest removing this sentence. It doesn't really add anything to
> the definition.

OK.

> This is discussing the scenario where a process on the server performs
> an flock(), right? That's perhaps confusingly special. How about

This is about clients. Let's say the same app is running on 2 different
Linux system that have the same Windows Server share mounted.

The scenario is those 2 app instances use the same file on the share and
are trying to synchronize access using flock().

Pre-5.5, CIFS flock() is using the generic flock() implementation from
the Linux VFS layer which only knows about syscall made by local apps
and isn't aware that the file can be accessed under its feet from the
network.

In 5.5 and above, CIFS flock() is implemented using SMB locks, which
have different semantics than what POSIX defines, i.e. you cannot ignore
the locks and write, write() will fail with EPERM. So this version can
be used for file sync with other clients but works slightly
differently. It is a best-effort attempt.

Does this clarification changes anything to your suggestions?

> "In Linux kernels up to 5.4, flock() is not propagated over SMB. A file
> with such locks will not appear locked for remote clients."


> "protocol, which provides mandatory locking semantics."

OK. As it turns out, there is actually a 'nobrl' mount option to get back
pre-5.5 behavior. I'll mention it and use your suggestions in v2.

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)


  reply	other threads:[~2021-03-04  0:29 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 [this message]
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
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=8735xcxkv5.fsf@suse.com \
    --to=aaptel@suse.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