[PATCH] Gluster VFS: Remove excessive log messages generated when opening directories.

Christopher R. Hertel crh at ubiqx.mn.org
Thu Aug 29 12:33:48 MDT 2013


In tests against Windows 7, a DEBUG statement in the Gluster VFS module's
vfs_gluster_open() function was filling up the logs something awful.

It turns out that it is common that an attempt will be made to open a
pathname that represents a directory as if it were a regular file.  In that
case, EISDIR is returned in errno, and something higher in the stack will
attempt the open again, specifying that the pathname be opened as a
directory.  That appears to be normal behavior.

The problem is that our code is treating all open errors as equal, including
EISDIR.  In one set of tests (which do a lot of file and directory opens, so
it's not a fully representative test) 99% of messages in the log file were
cause by "Is a directory" errors.

The attached patch distinguishes between EISDIR and other errors that may be
generated on open.  It raises the DEBUG level for EISDIR to 4.  All other
open errors are reported at DEBUG level 1 (instead of 0).

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Master-vfs_glusterfs-Fix-excessive-debug-output-from-vfs_gl-v4.patch
Type: text/x-patch
Size: 1677 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130829/32edf1a0/attachment.bin>


More information about the samba-technical mailing list