From: "Steve French" <smfrench@gmail.com>
To: "Jamie Lokier" <jamie@shareable.org>
Cc: "Andreas Dilger" <adilger@sun.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"linux-cifs-client@lists.samba.org"
<linux-cifs-client@lists.samba.org>
Subject: Re: Support for applications which need NFS or CIFS "share_deny" flags on open
Date: Tue, 2 Dec 2008 14:21:35 -0600 [thread overview]
Message-ID: <524f69650812021221g7e5163e6y5b5bafa3b157092e@mail.gmail.com> (raw)
In-Reply-To: <524f69650812021220n2b7611b9x2eb3b0b6c7ece849@mail.gmail.com>
On Tue, Dec 2, 2008 at 2:20 PM, Steve French <smfrench@gmail.com> wrote:
> On Tue, Dec 2, 2008 at 2:06 PM, Jamie Lokier <jamie@shareable.org> wrote:
>> Andreas Dilger wrote:
>>
>>> I can't see any reason for O_DENYREAD or O_DENYWRITE that can't be met
>>> with existing file locking to maintain coherency if that is really needed.
>
> I don't see how O_DENYREAD or more importantly, O_DENYWRITE can help.
A typo in my earlier post ... I meant ... I don't think (just) posix locking
(without also using O_DENYREAD) can be sufficient.
> If client A (Linux/Wine) does an open O_DENYWRITE, and we don't send
> the O_DENYWRITE on open, Samba (or Windows or NetApp or random NAS
> appliance etc.)
> will allow the open even if another Windows client is writing to the
> file. The Linux/Wine
> subsystem could try to do a posix byte range lock from byte 0 to end
> of file and that
> would get mapped by the cifs client to a mandatory lock, but it
> doesn't help the case
> where another Windows client already has the file open for write, and you expect
> the open from your client to fail in that case.
>
>> Is there any reason why Wine cannot take an advisory lock _every_ time
>> it opens a file? That would give Windows apps the behaviour they
>> expect, including across the network, without DOSing unix apps.
>>
>>> As for O_DENYDELETE - wouldn't that be irrelevant if the WINE code keeps
>>> an open file reference? The data would still be accessible until WINE
>>> exits, and it wouldn't be a DOS.
>>
>> Windows apps do expect a file can't disappear while it's open. This
>> is one way to detect if an app is running, and this particular
>> behaviour goes back to the oldest versions of Windows.
>>
>> Inside a single WINE instance or on a single host, your suggestion
>> works, but what about Windows apps on different hosts over a network share?
>>
>> The bit I find interesting is that other CIFS clients are said to
>> implement these flags. If that means real unixes, maybe they've
>> worked out a sensible way to handle them?
>
> I thought that MacOS uses these flags (not just Windows, and of course
> older clients too OS/2, DOS etc.).
>
>
> --
> Thanks,
>
> Steve
>
--
Thanks,
Steve
next prev parent reply other threads:[~2008-12-02 20:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-02 16:31 Support for applications which need NFS or CIFS "share_deny" flags on open Steve French
2008-12-02 19:38 ` Andreas Dilger
2008-12-02 20:06 ` Jamie Lokier
2008-12-02 20:20 ` Steve French
2008-12-02 20:21 ` Steve French [this message]
2008-12-02 21:20 ` jim owens
2008-12-02 21:26 ` Steve French
2008-12-02 23:07 ` Jeremy Allison
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=524f69650812021221g7e5163e6y5b5bafa3b157092e@mail.gmail.com \
--to=smfrench@gmail.com \
--cc=adilger@sun.com \
--cc=jamie@shareable.org \
--cc=linux-cifs-client@lists.samba.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).