Skip to content

Commit 11b2cfb

Browse files
neilbrownchucklever
authored andcommitted
nfsd: report in /proc/fs/nfsd/clients/*/states when state is admin-revoke
Add "admin-revoked" to the status information for any states that have been admin-revoked. This can be useful for confirming correct behaviour. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent 39e1be6 commit 11b2cfb

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

fs/nfsd/nfs4state.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2717,6 +2717,8 @@ static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st)
27172717
}
27182718
spin_unlock(&nf->fi_lock);
27192719
nfs4_show_owner(s, oo);
2720+
if (st->sc_status & SC_STATUS_ADMIN_REVOKED)
2721+
seq_puts(s, ", admin-revoked");
27202722
seq_puts(s, " }\n");
27212723
return 0;
27222724
}
@@ -2753,6 +2755,8 @@ static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st)
27532755
seq_puts(s, ", ");
27542756
}
27552757
nfs4_show_owner(s, oo);
2758+
if (st->sc_status & SC_STATUS_ADMIN_REVOKED)
2759+
seq_puts(s, ", admin-revoked");
27562760
seq_puts(s, " }\n");
27572761
spin_unlock(&nf->fi_lock);
27582762
return 0;
@@ -2784,8 +2788,10 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)
27842788
seq_puts(s, ", ");
27852789
nfs4_show_fname(s, file);
27862790
}
2787-
seq_puts(s, " }\n");
27882791
spin_unlock(&nf->fi_lock);
2792+
if (st->sc_status & SC_STATUS_ADMIN_REVOKED)
2793+
seq_puts(s, ", admin-revoked");
2794+
seq_puts(s, " }\n");
27892795
return 0;
27902796
}
27912797

@@ -2809,6 +2815,8 @@ static int nfs4_show_layout(struct seq_file *s, struct nfs4_stid *st)
28092815
seq_puts(s, ", ");
28102816
nfs4_show_fname(s, file);
28112817
}
2818+
if (st->sc_status & SC_STATUS_ADMIN_REVOKED)
2819+
seq_puts(s, ", admin-revoked");
28122820
seq_puts(s, " }\n");
28132821

28142822
return 0;

0 commit comments

Comments
 (0)