diff mbox

cifs: don't spam the logs on unexpected lookup errors

Message ID 1379416091-2040-1-git-send-email-jlayton@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton Sept. 17, 2013, 11:08 a.m. UTC
Andrey reported that he was seeing cifs.ko spam the logs with messages
like this:

    CIFS VFS: Unexpected lookup error -26

He was listing the root directory of a server and hitting an error when
trying to QUERY_PATH_INFO against hiberfil.sys and pagefile.sys. The
right fix would be to switch the lookup code over to using FIND_FIRST,
but until then we really don't need to report this at a level of
KERN_ERR. Convert this message over to FYI level.

Reported-by: "Andrey Shernyukov" <andreysh@nioch.nsc.ru>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/cifs/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Layton Sept. 17, 2013, 2:55 p.m. UTC | #1
On Tue, 17 Sep 2013 09:48:27 -0500
Steve French <smfrench@gmail.com> wrote:

> Why not change it to ignore sharing violation?

That's just taking us down the special-case rabbit hole. This is not
information that is particularly relevant to anyone unless they're
trying to debug a problem, and in that situation having them turn up
cifsFYI makes more sense.

> What happens if vers=2.1 ie smb2.1
>
> On Sep 17, 2013 6:08 AM, "Jeff Layton" <jlayton@redhat.com> wrote:
> 
> > Andrey reported that he was seeing cifs.ko spam the logs with messages
> > like this:
> >
> >     CIFS VFS: Unexpected lookup error -26
> >
> > He was listing the root directory of a server and hitting an error when
> > trying to QUERY_PATH_INFO against hiberfil.sys and pagefile.sys. The
> > right fix would be to switch the lookup code over to using FIND_FIRST,
> > but until then we really don't need to report this at a level of
> > KERN_ERR. Convert this message over to FYI level.
> >
> > Reported-by: "Andrey Shernyukov" <andreysh@nioch.nsc.ru>
> > Signed-off-by: Jeff Layton <jlayton@redhat.com>
> > ---
> >  fs/cifs/dir.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
> > index d3e2eaa..55c38cf 100644
> > --- a/fs/cifs/dir.c
> > +++ b/fs/cifs/dir.c
> > @@ -755,7 +755,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct
> > dentry *direntry,
> >         /*      if it was once a directory (but how can we tell?) we could
> > do
> >                 shrink_dcache_parent(direntry); */
> >         } else if (rc != -EACCES) {
> > -               cifs_dbg(VFS, "Unexpected lookup error %d\n", rc);
> > +               cifs_dbg(FYI, "Unexpected lookup error %d\n", rc);
> >                 /* We special case check for Access Denied - since that
> >                 is a common return code */
> >         }
> > --
> > 1.8.3.1
> >
> >
diff mbox

Patch

diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index d3e2eaa..55c38cf 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -755,7 +755,7 @@  cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
 	/*	if it was once a directory (but how can we tell?) we could do
 		shrink_dcache_parent(direntry); */
 	} else if (rc != -EACCES) {
-		cifs_dbg(VFS, "Unexpected lookup error %d\n", rc);
+		cifs_dbg(FYI, "Unexpected lookup error %d\n", rc);
 		/* We special case check for Access Denied - since that
 		is a common return code */
 	}