Re: CIFS data coherency problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 12 Sep 2010 16:19:46 -0500
Steve French <smfrench@xxxxxxxxx> wrote:

> On Sun, Sep 12, 2010 at 9:55 AM, Pavel Shilovsky <piastryyy@xxxxxxxxx> wrote:
> > 2010/9/12 Jeff Layton <jlayton@xxxxxxxxx>:
> >> 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@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux