forked from luck/tmp_suning_uos_patched
[CIFS] Distinguish posix opens and mkdirs from legacy mkdirs in stats
Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
c2cc49a2f8
commit
65bc98b005
|
@ -261,6 +261,8 @@ static ssize_t cifs_stats_proc_write(struct file *file,
|
||||||
atomic_set(&tcon->num_reads, 0);
|
atomic_set(&tcon->num_reads, 0);
|
||||||
atomic_set(&tcon->num_oplock_brks, 0);
|
atomic_set(&tcon->num_oplock_brks, 0);
|
||||||
atomic_set(&tcon->num_opens, 0);
|
atomic_set(&tcon->num_opens, 0);
|
||||||
|
atomic_set(&tcon->num_posixopens, 0);
|
||||||
|
atomic_set(&tcon->num_posixmkdirs, 0);
|
||||||
atomic_set(&tcon->num_closes, 0);
|
atomic_set(&tcon->num_closes, 0);
|
||||||
atomic_set(&tcon->num_deletes, 0);
|
atomic_set(&tcon->num_deletes, 0);
|
||||||
atomic_set(&tcon->num_mkdirs, 0);
|
atomic_set(&tcon->num_mkdirs, 0);
|
||||||
|
@ -347,11 +349,15 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
|
||||||
atomic_read(&tcon->num_locks),
|
atomic_read(&tcon->num_locks),
|
||||||
atomic_read(&tcon->num_hardlinks),
|
atomic_read(&tcon->num_hardlinks),
|
||||||
atomic_read(&tcon->num_symlinks));
|
atomic_read(&tcon->num_symlinks));
|
||||||
seq_printf(m, "\nOpens: %d Closes: %d"
|
seq_printf(m, "\nOpens: %d Closes: %d "
|
||||||
"Deletes: %d",
|
"Deletes: %d",
|
||||||
atomic_read(&tcon->num_opens),
|
atomic_read(&tcon->num_opens),
|
||||||
atomic_read(&tcon->num_closes),
|
atomic_read(&tcon->num_closes),
|
||||||
atomic_read(&tcon->num_deletes));
|
atomic_read(&tcon->num_deletes));
|
||||||
|
seq_printf(m, "\nPosix Opens: %d "
|
||||||
|
"Posix Mkdirs: %d",
|
||||||
|
atomic_read(&tcon->num_posixopens),
|
||||||
|
atomic_read(&tcon->num_posixmkdirs));
|
||||||
seq_printf(m, "\nMkdirs: %d Rmdirs: %d",
|
seq_printf(m, "\nMkdirs: %d Rmdirs: %d",
|
||||||
atomic_read(&tcon->num_mkdirs),
|
atomic_read(&tcon->num_mkdirs),
|
||||||
atomic_read(&tcon->num_rmdirs));
|
atomic_read(&tcon->num_rmdirs));
|
||||||
|
|
|
@ -260,6 +260,8 @@ struct cifsTconInfo {
|
||||||
atomic_t num_closes;
|
atomic_t num_closes;
|
||||||
atomic_t num_deletes;
|
atomic_t num_deletes;
|
||||||
atomic_t num_mkdirs;
|
atomic_t num_mkdirs;
|
||||||
|
atomic_t num_posixopens;
|
||||||
|
atomic_t num_posixmkdirs;
|
||||||
atomic_t num_rmdirs;
|
atomic_t num_rmdirs;
|
||||||
atomic_t num_renames;
|
atomic_t num_renames;
|
||||||
atomic_t num_t2renames;
|
atomic_t num_t2renames;
|
||||||
|
|
|
@ -1113,7 +1113,10 @@ CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon, __u32 posix_flags,
|
||||||
psx_create_err:
|
psx_create_err:
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
|
||||||
cifs_stats_inc(&tcon->num_mkdirs);
|
if (posix_flags & SMB_O_DIRECTORY)
|
||||||
|
cifs_stats_inc(&tcon->num_posixmkdirs);
|
||||||
|
else
|
||||||
|
cifs_stats_inc(&tcon->num_posixopens);
|
||||||
|
|
||||||
if (rc == -EAGAIN)
|
if (rc == -EAGAIN)
|
||||||
goto PsxCreat;
|
goto PsxCreat;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user