mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steve French <smfrench@austin.rr.com>
To: linux-kernel@vger.kernel.org, trond.myklebust@fys.uio.no
Subject: Re: [PATCH] Allow cluster-wide flock
Date: Mon, 30 Aug 2004 22:11:07 -0500	[thread overview]
Message-ID: <1093921852.2444.34.camel@smfhome.smfdom> (raw)

> I'm concerned that the overloading of
> f_op->lock() may break behaviour on NFS and CIFS.

Seems like a clear case that if their behavior is different we have to
be able to distinguish between them and there is a risk of overloading
f_op->lock().  It would not be particularly hard to carry them on the wire
(ie as network requests using a slightly modified newer SMBLockingX 
that would work to Samba).   Do you want these locks enforced [both] on the
client and server too (if there are races in the lock state when multiple
clients are created/deleting locks)?

> NFS currently has a test in nfs_lock() that causes it to return -ENOLCK
> if the argument is not a posix lock. 

I am willing to use a more relaxed semantic than that, but will
need to add an optional extension to the CIFS Protocol Unix Extensions
to distinguish the three (at least) types of locks

>
> Any comment on the effects on CIFS, Steven?

I am not sure I can answer until I get the current 2.6.9 locking
code working again and have time to prototype/experiment.
Cifs locking code regressed in two places 
(one of which I have fixed recently).  This is not the
usual impossible problem of trying to reconcile POSIX vs. 
SMB/CIFS locks well enough to pass connectathon lock tests 7 
and 10 to both Windows and Samba servers.  CIFS (the network
protocol) only defines mandatory locks (and overlapping locks are
not coalesced into one larger lock).  Since some clients such
as Windows (and OS/2, DOS etc - but not Unix & Linux 
clients) expect mandatory locks (rather than Advisory) 
there is not a perfect solution without extending the
protocol to allow the client to tell the server
that the locks are Advisory vs. Mandatory
(so after discussions with others on the Samba team this
is something that I am likely to do this year on the client
(ie optionally extend the protocol to distinguish the
two lock types), as soon as jra has time to change
the Samba server side) ... 

but in the meantime the CIFS lock code is broken. It looks like
the  global fs change to fix posix locking last week
broke cifs.  unlock (at least in connectathon 
lock subtest 7) can generate over CIFS a message:
	Attempting to free lock with active block list
probably because an additional change to unlock is necessary
in fs/cifs/file.c  I did fix one unrelated bug in the 
cifs lock code yesterday but today was trying to understand
what test 7 is attempting to do and why the block list is
not freed for cifs (but works locally).


             reply	other threads:[~2004-08-31  3:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31  3:11 Steve French [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-08-30 23:05 Trond Myklebust
2004-08-31 22:42 ` Ken Preslan
2004-08-30 15:19 Ken Preslan
2004-08-30 14:35 ` Alan Cox

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=1093921852.2444.34.camel@smfhome.smfdom \
    --to=smfrench@austin.rr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /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

all inboxes | Powered by JetHome®