* [PATCH] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch
@ 2011-12-02 5:38 Suresh Jayaraman
[not found] ` <4ED86453.2040007-IBi9RG/b67k@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Suresh Jayaraman @ 2011-12-02 5:38 UTC (permalink / raw)
To: stable-DgEjT+Ai2ygdnm+yROfE0A, Greg KH
Cc: Pavel Shilovsky, Steve French, linux-cifs
The stable release 2.6.32.32 added the upstream commit
12fed00de963433128b5366a21a55808fab2f756. However, one of the hunks of
the original patch seems missing from the stable backport which can be
found here:
http://permalink.gmane.org/gmane.linux.kernel.stable/5676
This hunk corresponds to the change in is_valid_oplock_break() at
fs/cifs/misc.c.
This patch backports the missing hunk and is against
linux-2.6.32.y stable kernel.
Cc: Steve French <sfrench-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
Signed-off-by: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org>
---
[PS. not very happy about the subject line and changelog.
Feel free to modify as you see fit.]
fs/cifs/misc.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index d27d4ec..7055827 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -584,6 +584,9 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
pCifsInode->clientCanCacheAll = false;
if (pSMB->OplockLevel == 0)
pCifsInode->clientCanCacheRead = false;
+ else if (pSMB->OplockLevel == OPLOCK_READ)
+ pCifsInode->clientCanCacheRead = true;
+
rc = slow_work_enqueue(&netfile->oplock_break);
if (rc) {
cERROR(1, ("failed to enqueue oplock "
^ permalink raw reply related [flat|nested] 6+ messages in thread[parent not found: <4ED86453.2040007-IBi9RG/b67k@public.gmane.org>]
* Re: [PATCH] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch [not found] ` <4ED86453.2040007-IBi9RG/b67k@public.gmane.org> @ 2011-12-02 7:08 ` Pavel Shilovsky [not found] ` <CAKywueSx7efJWX7N8v+KVxRfAsgdFyMx6rc2F7+izpsC-Hcrbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Pavel Shilovsky @ 2011-12-02 7:08 UTC (permalink / raw) To: Suresh Jayaraman Cc: stable-DgEjT+Ai2ygdnm+yROfE0A, Greg KH, Steve French, linux-cifs 2011/12/2 Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org>: > The stable release 2.6.32.32 added the upstream commit > 12fed00de963433128b5366a21a55808fab2f756. However, one of the hunks of > the original patch seems missing from the stable backport which can be > found here: > http://permalink.gmane.org/gmane.linux.kernel.stable/5676 > > This hunk corresponds to the change in is_valid_oplock_break() at > fs/cifs/misc.c. > > This patch backports the missing hunk and is against > linux-2.6.32.y stable kernel. > > > Cc: Steve French <sfrench-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> > Cc: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> > Signed-off-by: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> > --- > [PS. not very happy about the subject line and changelog. > Feel free to modify as you see fit.] > > fs/cifs/misc.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c > index d27d4ec..7055827 100644 > --- a/fs/cifs/misc.c > +++ b/fs/cifs/misc.c > @@ -584,6 +584,9 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) > pCifsInode->clientCanCacheAll = false; > if (pSMB->OplockLevel == 0) > pCifsInode->clientCanCacheRead = false; > + else if (pSMB->OplockLevel == OPLOCK_READ) pSMB->OplockLevel can either be 0 or 1 here but OPLOCK_READ is 3 - this should be: "else if (pSMB->OplockLevel)" > + pCifsInode->clientCanCacheRead = true; > + > rc = slow_work_enqueue(&netfile->oplock_break); > if (rc) { > cERROR(1, ("failed to enqueue oplock " -- Best regards, Pavel Shilovsky. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAKywueSx7efJWX7N8v+KVxRfAsgdFyMx6rc2F7+izpsC-Hcrbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch [not found] ` <CAKywueSx7efJWX7N8v+KVxRfAsgdFyMx6rc2F7+izpsC-Hcrbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2011-12-02 7:20 ` Suresh Jayaraman [not found] ` <4ED87C50.6010507-IBi9RG/b67k@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Suresh Jayaraman @ 2011-12-02 7:20 UTC (permalink / raw) To: Pavel Shilovsky Cc: stable-DgEjT+Ai2ygdnm+yROfE0A, Greg KH, Steve French, linux-cifs On 12/02/2011 12:38 PM, Pavel Shilovsky wrote: > 2011/12/2 Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org>: >> The stable release 2.6.32.32 added the upstream commit >> 12fed00de963433128b5366a21a55808fab2f756. However, one of the hunks of >> the original patch seems missing from the stable backport which can be >> found here: >> http://permalink.gmane.org/gmane.linux.kernel.stable/5676 >> >> This hunk corresponds to the change in is_valid_oplock_break() at >> fs/cifs/misc.c. >> >> This patch backports the missing hunk and is against >> linux-2.6.32.y stable kernel. >> >> >> Cc: Steve French <sfrench-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> >> Cc: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> >> Signed-off-by: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> >> --- >> [PS. not very happy about the subject line and changelog. >> Feel free to modify as you see fit.] >> >> fs/cifs/misc.c | 3 +++ >> 1 files changed, 3 insertions(+), 0 deletions(-) >> >> diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c >> index d27d4ec..7055827 100644 >> --- a/fs/cifs/misc.c >> +++ b/fs/cifs/misc.c >> @@ -584,6 +584,9 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) >> pCifsInode->clientCanCacheAll = false; >> if (pSMB->OplockLevel == 0) >> pCifsInode->clientCanCacheRead = false; >> + else if (pSMB->OplockLevel == OPLOCK_READ) > pSMB->OplockLevel can either be 0 or 1 here but OPLOCK_READ is 3 - > this should be: > "else if (pSMB->OplockLevel)" > >> + pCifsInode->clientCanCacheRead = true; >> + Hmm.. if OplockLevel is OPLOCK_EXCLUSIVE, the we should set both clientCanCacheAll and clientCanCacheRead, no? Suresh ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <4ED87C50.6010507-IBi9RG/b67k@public.gmane.org>]
* Re: [PATCH] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch [not found] ` <4ED87C50.6010507-IBi9RG/b67k@public.gmane.org> @ 2011-12-02 9:05 ` Pavel Shilovsky [not found] ` <CAKywueSU2qMuQEFJ573i4cR_a1L_n9=2eH_7f8yvaqUWDXwB_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Pavel Shilovsky @ 2011-12-02 9:05 UTC (permalink / raw) To: Suresh Jayaraman Cc: stable-DgEjT+Ai2ygdnm+yROfE0A, Greg KH, Steve French, linux-cifs 2011/12/2 Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org>: > On 12/02/2011 12:38 PM, Pavel Shilovsky wrote: >> 2011/12/2 Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org>: >>> The stable release 2.6.32.32 added the upstream commit >>> 12fed00de963433128b5366a21a55808fab2f756. However, one of the hunks of >>> the original patch seems missing from the stable backport which can be >>> found here: >>> http://permalink.gmane.org/gmane.linux.kernel.stable/5676 >>> >>> This hunk corresponds to the change in is_valid_oplock_break() at >>> fs/cifs/misc.c. >>> >>> This patch backports the missing hunk and is against >>> linux-2.6.32.y stable kernel. >>> >>> >>> Cc: Steve French <sfrench-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> >>> Cc: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> >>> Signed-off-by: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> >>> --- >>> [PS. not very happy about the subject line and changelog. >>> Feel free to modify as you see fit.] >>> >>> fs/cifs/misc.c | 3 +++ >>> 1 files changed, 3 insertions(+), 0 deletions(-) >>> >>> diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c >>> index d27d4ec..7055827 100644 >>> --- a/fs/cifs/misc.c >>> +++ b/fs/cifs/misc.c >>> @@ -584,6 +584,9 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) >>> pCifsInode->clientCanCacheAll = false; >>> if (pSMB->OplockLevel == 0) >>> pCifsInode->clientCanCacheRead = false; >>> + else if (pSMB->OplockLevel == OPLOCK_READ) >> pSMB->OplockLevel can either be 0 or 1 here but OPLOCK_READ is 3 - >> this should be: >> "else if (pSMB->OplockLevel)" >> >>> + pCifsInode->clientCanCacheRead = true; >>> + > > Hmm.. if OplockLevel is OPLOCK_EXCLUSIVE, the we should set both > clientCanCacheAll and clientCanCacheRead, no? OplockLevel field in the oplock break request (SMB_COM_LOCKING_ANDX command) can be: 0 - oplock downgrades to None 1 - oplock downgrades to READ. (see http://msdn.microsoft.com/en-us/library/ee442004(v=PROT.13).aspx for further details) -- Best regards, Pavel Shilovsky. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAKywueSU2qMuQEFJ573i4cR_a1L_n9=2eH_7f8yvaqUWDXwB_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch [not found] ` <CAKywueSU2qMuQEFJ573i4cR_a1L_n9=2eH_7f8yvaqUWDXwB_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2011-12-02 10:54 ` Suresh Jayaraman [not found] ` <4ED8AE80.7030008-IBi9RG/b67k@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Suresh Jayaraman @ 2011-12-02 10:54 UTC (permalink / raw) To: stable-DgEjT+Ai2ygdnm+yROfE0A, Greg KH Cc: Pavel Shilovsky, Steve French, linux-cifs On 12/02/2011 02:35 PM, Pavel Shilovsky wrote: > 2011/12/2 Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org>: >>>> fs/cifs/misc.c | 3 +++ >>>> 1 files changed, 3 insertions(+), 0 deletions(-) >>>> >>>> diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c >>>> index d27d4ec..7055827 100644 >>>> --- a/fs/cifs/misc.c >>>> +++ b/fs/cifs/misc.c >>>> @@ -584,6 +584,9 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) >>>> pCifsInode->clientCanCacheAll = false; >>>> if (pSMB->OplockLevel == 0) >>>> pCifsInode->clientCanCacheRead = false; >>>> + else if (pSMB->OplockLevel == OPLOCK_READ) >>> pSMB->OplockLevel can either be 0 or 1 here but OPLOCK_READ is 3 - >>> this should be: >>> "else if (pSMB->OplockLevel)" >>> >>>> + pCifsInode->clientCanCacheRead = true; >>>> + >> >> Hmm.. if OplockLevel is OPLOCK_EXCLUSIVE, the we should set both >> clientCanCacheAll and clientCanCacheRead, no? > > OplockLevel field in the oplock break request (SMB_COM_LOCKING_ANDX > command) can be: > 0 - oplock downgrades to None > 1 - oplock downgrades to READ. > > (see http://msdn.microsoft.com/en-us/library/ee442004(v=PROT.13).aspx > for further details) > Ok thanks. Here's the updated patch. Greg, could you please consider this patch for next 2.6.32.y From: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> The stable release 2.6.32.32 added the upstream commit 12fed00de963433128b5366a21a55808fab2f756. However, one of the hunks of the original patch seems missing from the stable backport which can be found here: http://permalink.gmane.org/gmane.linux.kernel.stable/5676 This hunk corresponds to the change in is_valid_oplock_break() at fs/cifs/misc.c. This patch backports the missing hunk and is against linux-2.6.32.y stable kernel. Cc: Steve French <sfrench-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> Signed-off-by: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> --- fs/cifs/misc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index d27d4ec..95b82e8 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c @@ -584,6 +584,9 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) pCifsInode->clientCanCacheAll = false; if (pSMB->OplockLevel == 0) pCifsInode->clientCanCacheRead = false; + else if (pSMB->OplockLevel) + pCifsInode->clientCanCacheRead = true; + rc = slow_work_enqueue(&netfile->oplock_break); if (rc) { cERROR(1, ("failed to enqueue oplock " ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <4ED8AE80.7030008-IBi9RG/b67k@public.gmane.org>]
* Patch "cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch" has been added to the 2.6.32-longterm tree [not found] ` <4ED8AE80.7030008-IBi9RG/b67k@public.gmane.org> @ 2011-12-05 21:40 ` gregkh-l3A5Bk7waGM 0 siblings, 0 replies; 6+ messages in thread From: gregkh-l3A5Bk7waGM @ 2011-12-05 21:40 UTC (permalink / raw) To: sjayaraman-IBi9RG/b67k, gregkh-l3A5Bk7waGM, linux-cifs-u79uwXL29TY76Z2rM5mHXA, piastry-7qunaywFIewox3rIn2DAYQ, piastryyy-Re5JQEeQqe8AvxtiuMwx3w, sfrench-r/Jw6+rmf7HQT0dZR+AlfA, smfrench-Re5JQEeQqe8AvxtiuMwx3w Cc: stable-u79uwXL29TY76Z2rM5mHXA, stable-commits-u79uwXL29TY76Z2rM5mHXA This is a note to let you know that I've just added the patch titled cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch to the 2.6.32-longterm tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary The filename of the patch is: cifs-fix-cifs-stable-patch-cifs-fix-oplock-break-handling-try-2.patch.patch and it can be found in the queue-2.6.32 subdirectory. If you, or anyone else, feels it should not be added to the 2.6.32 longterm tree, please let <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> know about it. >From sjayaraman-IBi9RG/b67k@public.gmane.org Mon Dec 5 13:33:36 2011 From: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> Date: Fri, 02 Dec 2011 16:24:56 +0530 Subject: cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch To: stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Greg KH <gregkh-l3A5Bk7waGM@public.gmane.org> Cc: Pavel Shilovsky <piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> Message-ID: <4ED8AE80.7030008-IBi9RG/b67k@public.gmane.org> From: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> The stable release 2.6.32.32 added the upstream commit 12fed00de963433128b5366a21a55808fab2f756. However, one of the hunks of the original patch seems missing from the stable backport which can be found here: http://permalink.gmane.org/gmane.linux.kernel.stable/5676 This hunk corresponds to the change in is_valid_oplock_break() at fs/cifs/misc.c. This patch backports the missing hunk and is against linux-2.6.32.y stable kernel. Cc: Steve French <sfrench-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> Signed-off-by: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> Signed-off-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org> --- fs/cifs/misc.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c @@ -584,6 +584,9 @@ is_valid_oplock_break(struct smb_hdr *bu pCifsInode->clientCanCacheAll = false; if (pSMB->OplockLevel == 0) pCifsInode->clientCanCacheRead = false; + else if (pSMB->OplockLevel) + pCifsInode->clientCanCacheRead = true; + rc = slow_work_enqueue(&netfile->oplock_break); if (rc) { cERROR(1, ("failed to enqueue oplock " Patches currently in longterm-queue-2.6.32 which might be from sjayaraman-IBi9RG/b67k@public.gmane.org are /home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/cifs-fix-cifs-stable-patch-cifs-fix-oplock-break-handling-try-2.patch.patch ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-12-05 21:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 5:38 [PATCH] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch Suresh Jayaraman
[not found] ` <4ED86453.2040007-IBi9RG/b67k@public.gmane.org>
2011-12-02 7:08 ` Pavel Shilovsky
[not found] ` <CAKywueSx7efJWX7N8v+KVxRfAsgdFyMx6rc2F7+izpsC-Hcrbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-02 7:20 ` Suresh Jayaraman
[not found] ` <4ED87C50.6010507-IBi9RG/b67k@public.gmane.org>
2011-12-02 9:05 ` Pavel Shilovsky
[not found] ` <CAKywueSU2qMuQEFJ573i4cR_a1L_n9=2eH_7f8yvaqUWDXwB_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-02 10:54 ` Suresh Jayaraman
[not found] ` <4ED8AE80.7030008-IBi9RG/b67k@public.gmane.org>
2011-12-05 21:40 ` Patch "cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch" has been added to the 2.6.32-longterm tree gregkh-l3A5Bk7waGM
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.