aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2019-05-14 15:52:57 -0400
committerJ. Bruce Fields <bfields@redhat.com>2019-07-03 17:52:50 -0400
commit0c4b62b042fe3a4a0b18449eae26989611955db1 (patch)
treed9bee1b6253cf47d432f2e642f06c79eeb27426d /fs/nfsd
parentnfsd: show lock and deleg stateids (diff)
downloadlinux-dev-0c4b62b042fe3a4a0b18449eae26989611955db1.tar.xz
linux-dev-0c4b62b042fe3a4a0b18449eae26989611955db1.zip
nfsd4: show layout stateids
These are also minimal for now, I'm not sure what information would be useful. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index e457bb099d0b..e1936d3b7ece 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2398,6 +2398,24 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)
return 0;
}
+static int nfs4_show_layout(struct seq_file *s, struct nfs4_stid *st)
+{
+ struct nfs4_layout_stateid *ls;
+ struct file *file;
+
+ ls = container_of(st, struct nfs4_layout_stateid, ls_stid);
+ file = ls->ls_file;
+
+ seq_printf(s, "- 0x%16phN: { type: layout, ", &st->sc_stateid);
+
+ /* XXX: What else would be useful? */
+
+ nfs4_show_superblock(s, file);
+ seq_printf(s, " }\n");
+
+ return 0;
+}
+
static int states_show(struct seq_file *s, void *v)
{
struct nfs4_stid *st = v;
@@ -2409,6 +2427,8 @@ static int states_show(struct seq_file *s, void *v)
return nfs4_show_lock(s, st);
case NFS4_DELEG_STID:
return nfs4_show_deleg(s, st);
+ case NFS4_LAYOUT_STID:
+ return nfs4_show_layout(s, st);
default:
return 0; /* XXX: or SEQ_SKIP? */
}