Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Pavel Shilovsky
	<piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: CIFS data coherency problem
Date: Sun, 12 Sep 2010 20:15:02 -0400	[thread overview]
Message-ID: <20100912201502.624c8f33@corrin.poochiereds.net> (raw)
In-Reply-To: <AANLkTi=x6gnS=++JtjEG6KVwq4_JPLfU+pKuCYgFd+xD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Sun, 12 Sep 2010 16:19:46 -0500
Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> On Sun, Sep 12, 2010 at 9:55 AM, Pavel Shilovsky <piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > 2010/9/12 Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>:
> >> That's just because our client is primitive in this regard. When an
> >> oplock break comes in, it always drops the entire oplock rather than
> >> trying to downgrade it.
> >>
> >> Notice that when the client sends the "reply" that it's actually a
> >> request. The client never sends an actual "response" to an oplock
> >> break. What it does is send a new LOCKING_ANDX request to the server
> >> with a Lock Type of oplock break (0x02) and an oplock level of 0.
> >>
> >> My interpretation has always been that this "response" from the client
> >> tells the server what new oplock level the client has elected to take.
> >> In this case, it elected to drop the lock altogether so the server has
> >> no need to send a new oplock break.
> >
> > You can find the code (misc.c, is_valid_oplock_break call) that
> > downgrades the oplock for the client according to the field
> > NewOplockLevel in Oplock Break sent by the server. But then you can
> > see that in cifs_oplock_break call (file.c) the client simply sends
> > acknowledge without setting any OplockLevel specific things.
> 
> We already downgrade olocks.  I don't think we have seen problems with the
> downgrade from "cache everything" to "cache only reads" -  I don't think
> the client "response" to the oplock downgrade has to set additional flags in
> the "response" to the oplock break.
> 

If the server doesn't pay attention to that field, then Pavel is
correct and this is a server bug.

Is it legitimate for the client to send an "oplock break" on its own
without the server requesting it first? If so, is the oplock level
field also ignored? How does the server match up an oplock break
"request" to the "response"?

It might be good to ask this on samba-technical (and maybe to ask MS).
-- 
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

  parent reply	other threads:[~2010-09-13  0:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTin2iSc=Ob3DkhARJRV7CzwRUBJSGRMUJNJM+82k@mail.gmail.com>
     [not found] ` <AANLkTin2iSc=Ob3DkhARJRV7CzwRUBJSGRMUJNJM+82k-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-08  6:49   ` Fwd: CIFS data coherency problem Pavel Shilovsky
     [not found]     ` <AANLkTi=_eMSC99K1a2zWpgW5nc8UArzKj2MWHaRmCXzK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-08 10:32       ` Jeff Layton
     [not found]         ` <20100908063224.240b0419-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-09-08 11:04           ` Jeff Layton
     [not found]             ` <20100908070416.1f231387-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-09-09 18:22               ` Pavel Shilovsky
2010-09-09 18:18           ` Pavel Shilovsky
     [not found]             ` <AANLkTinYFe6O-4ANt1VYcvEMukiis-11cDuMP2GSKZ7j-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-09 18:25               ` Steve French
     [not found]                 ` <AANLkTin+qiQsF_hOCvdBKtCh0n0bcd82RDOUz=h3K6gu-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-09 18:34                   ` Pavel Shilovsky
     [not found]                     ` <AANLkTikOR_HU934L6FKq8q2ZwcaTTOTPfaSofimK6OFH-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-10  0:50                       ` Steve French
     [not found]                         ` <AANLkTi=zc7G847VHqVjO7LRfLkzzSGsJURvJmH1C8gOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-10  7:50                           ` Pavel Shilovsky
     [not found]                             ` <AANLkTikXWGNtuOjPbG0wAdHLuVQOVuouaUaBi4HRwSR--JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-10 12:15                               ` Jeff Layton
     [not found]                                 ` <20100910081549.41de32d1-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-09-10 20:16                                   ` Pavel Shilovsky
     [not found]                                     ` <AANLkTi=5YgKzG=rXJ5MuV+R_MGkEd+2ERouUiEc8K5B8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-10 22:50                                       ` Jeff Layton
     [not found]                                         ` <20100910185002.73e61b8b-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-09-11  7:08                                           ` Pavel Shilovsky
     [not found]                                             ` <AANLkTik_=xi5Engkm4Xcrk_WUaXSsSAsWUhh=M8VYWer-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-12 13:16                                               ` Jeff Layton
     [not found]                                                 ` <20100912091659.73ef9cdb-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-09-12 14:55                                                   ` Pavel Shilovsky
     [not found]                                                     ` <AANLkTi=gSm+=djrj796Gfjx9FiRQ7s==6DSV=DhYOk7U-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-12 15:40                                                       ` Jeff Layton
     [not found]                                                         ` <20100912114055.55520f0c-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-09-12 16:16                                                           ` Pavel Shilovsky
     [not found]                                                             ` <AANLkTi=LMy37zVnyKTX_gnf1QAqXja6vuTruVMjfRCdp-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-12 16:55                                                               ` Jeff Layton
     [not found]                                                                 ` <20100912125535.60c3c897-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-09-12 19:14                                                                   ` Pavel Shilovsky
     [not found]                                                                     ` <AANLkTi=XT_X27Cuioe_M6zMee0XQAZe+P-TLHbh6n+Yk-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-13  0:09                                                                       ` Jeff Layton
2010-09-12 21:19                                                       ` Steve French
     [not found]                                                         ` <AANLkTi=x6gnS=++JtjEG6KVwq4_JPLfU+pKuCYgFd+xD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-13  0:15                                                           ` Jeff Layton [this message]
     [not found]                                                             ` <20100912201502.624c8f33-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-09-13  0:37                                                               ` Steve French
     [not found]                                                                 ` <AANLkTinfnGh8-egSfoEeik_iR2=hRvUF0qk9DFTVcdU8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-14 12:41                                                                   ` Pavel Shilovsky
2010-09-13  9:49                                                               ` Pavel Shilovsky

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=20100912201502.624c8f33@corrin.poochiereds.net \
    --to=jlayton-eunubhrolfbytjvyw6ydsg@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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