nfsd4: add filename to states output
Subsystems (2)
PATCH v2 1/1 nfsd4: add filename to states output
Add filename to states output for ease of debugging.
Signed-off-by Achilles Gaikwad <[email protected]>
Signed-off-by Kenneth Dsouza <[email protected]>
--- fs/nfsd/nfs4state.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
fs/nfsd/nfs4state.c +11 -0
@@ -2404,6 +2404,11 @@ static void states_stop(struct seq_file *s, void *v)spin_unlock (&clp->cl_lock); } +static void nfs4_show_fname (struct seq_file *s,struct nfsd_file *f) +{ +seq_printf (s,"filename: \"%pD2\"" , f->nf_file); +} +static void nfs4_show_superblock (struct seq_file *s,struct nfsd_file *f) {struct inode *inode = f->nf_inode;
@@ -2449,6 +2454,8 @@ static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st)nfs4_show_superblock (s, file);seq_printf (s,", " ); +nfs4_show_fname (s, file); +seq_printf (s,", " );nfs4_show_owner (s, oo);seq_printf (s," }\n" );nfsd_file_put (file);
@@ -2480,6 +2487,8 @@ static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st)nfs4_show_superblock (s, file);/* XXX: open stateid? */ seq_printf (s,", " ); +nfs4_show_fname (s, file); +seq_printf (s,", " );nfs4_show_owner (s, oo);seq_printf (s," }\n" );nfsd_file_put (file);
@@ -2506,6 +2515,7 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)/* XXX: lease time, whether it's being recalled. */ nfs4_show_superblock (s, file); +nfs4_show_fname (s, file);seq_printf (s," }\n" );return 0 ;
@@ -2524,6 +2534,7 @@ static int nfs4_show_layout(struct seq_file *s, struct nfs4_stid *st)/* XXX: What else would be useful? */ nfs4_show_superblock (s, file); +nfs4_show_fname (s, file);seq_printf (s," }\n" );return 0 ;
Signature · 1 line
2.25.3
There's a minor Bug that needs squashing in the code I sent. I'll send a V3. :) Sorry for the trouble.
Best,
- Achilles
---
Quoted 62 lines · Achilles Gaikwad
Add filename to states output for ease of debugging.
Signed-off-by Achilles Gaikwad <[email protected]>Signed-off-by Kenneth Dsouza <[email protected]>--- fs/nfsd/nfs4state.c | 11 +++++++++++ 1 file changed, 11 insertions(+)fs/nfsd/nfs4state.c +11
-1@@ -2404,6 +2404,11 @@ static void states_stop(struct seq_file *s, void *v)spin_unlock (&clp->cl_lock); } +static void nfs4_show_fname (struct seq_file *s,struct nfsd_file *f) +{ +seq_printf (s,"filename: \"%pD2\"" , f->nf_file); +} +static void nfs4_show_superblock (struct seq_file *s,struct nfsd_file *f) {struct inode *inode = f->nf_inode;@@ -2449,6 +2454,8 @@ static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st)nfs4_show_superblock (s, file);seq_printf (s,", " ); +nfs4_show_fname (s, file); +seq_printf (s,", " );nfs4_show_owner (s, oo);seq_printf (s," }\n" );nfsd_file_put (file);@@ -2480,6 +2487,8 @@ static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st)nfs4_show_superblock (s, file);/* XXX: open stateid? */ seq_printf (s,", " ); +nfs4_show_fname (s, file); +seq_printf (s,", " );nfs4_show_owner (s, oo);seq_printf (s," }\n" );nfsd_file_put (file);@@ -2506,6 +2515,7 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)/* XXX: lease time, whether it's being recalled. */ nfs4_show_superblock (s, file); +nfs4_show_fname (s, file);seq_printf (s," }\n" );return 0 ;@@ -2524,6 +2534,7 @@ static int nfs4_show_layout(struct seq_file *s, struct nfs4_stid *st)/* XXX: What else would be useful? */ nfs4_show_superblock (s, file); +nfs4_show_fname (s, file);seq_printf (s," }\n" );return 0 ; --2.25.3