Is there a way how to find out open/closed files in cifs mount point (el6 have two separate columns for Posix Opens and Posix Mkdirs, el5 version seems to report both (files and dirs) to MkDirs column. el6 version: cat /proc/fs/cifs/Stats ...snipped... Opens: 0 Closes: 1 Deletes: 0 Posix Opens: 1 Posix Mkdirs: 0 ...snipped... el5 version: cat /proc/fs/cifs/Stats ...snipped... Opens: 0 Closes: 20Deletes: 10 <---- closed files Mkdirs: 21 Rmdirs: 1 <---- opened files ...snipped... ) +++ This bug was initially created as a clone of Bug #706333 +++ Description of problem: cifsiostat doesn't report files opened on share mounted from linux machine. cifsiostat obtains values from /proc/fs/cifs/Stats. When file on linux share is opened, this action is counted as "Mkdirs" in /proc/fs/cifs/Stats. Version-Release number of selected component (if applicable): sysstat-7.0.2-6.el5 How reproducible: always Steps to Reproduce: 1. mount samba share from linux machine 2. open /proc/fs/cifs/Stats 3. run "touch file.txt" on share mounted in step 1. Actual results: Mkdirs and Closes values are increment by one: Opens: 0 Closes: 1Deletes: 0 Mkdirs: 1 Rmdirs: 0 Expected results: Opens and Closes values are increment by one: Opens: 1 Closes: 1Deletes: 0 Mkdirs: 0 Rmdirs: 0 Additional info: 2) \\linuxmachine\linuxshare SMBs: 865 Oplock Breaks: 0 Reads: 480 Bytes: 7847956 Writes: 184 Bytes: 10268672 Flushes: 0 Locks: 0 HardLinks: 0 Symlinks: 0 Opens: 0 Closes: 20Deletes: 10 <---- closed files Mkdirs: 21 Rmdirs: 1 <---- opened files <snip>
I've posted a set of test kernels to my people.redhat.com page that have a patch for this issue: http://people.redhat.com/jlayton/ ...could you test them and let me know if they resolve the issue for you?
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Patch(es) available in kernel-2.6.18-283.el5 You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5 Detailed testing feedback is always welcomed.
Reproduced in 2.6.18-282.el5 and verified in 2.6.18-283.el5.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-0150.html