Skip to content

Commit

Permalink
nfsd: report in /proc/fs/nfsd/clients/*/states when state is admin-re…
Browse files Browse the repository at this point in the history
…voke

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 <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
  • Loading branch information
neilbrown authored and chucklever committed Mar 1, 2024
1 parent 39e1be6 commit 11b2cfb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -2717,6 +2717,8 @@ static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st)
}
spin_unlock(&nf->fi_lock);
nfs4_show_owner(s, oo);
if (st->sc_status & SC_STATUS_ADMIN_REVOKED)
seq_puts(s, ", admin-revoked");
seq_puts(s, " }\n");
return 0;
}
Expand Down Expand Up @@ -2753,6 +2755,8 @@ static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st)
seq_puts(s, ", ");
}
nfs4_show_owner(s, oo);
if (st->sc_status & SC_STATUS_ADMIN_REVOKED)
seq_puts(s, ", admin-revoked");
seq_puts(s, " }\n");
spin_unlock(&nf->fi_lock);
return 0;
Expand Down Expand Up @@ -2784,8 +2788,10 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)
seq_puts(s, ", ");
nfs4_show_fname(s, file);
}
seq_puts(s, " }\n");
spin_unlock(&nf->fi_lock);
if (st->sc_status & SC_STATUS_ADMIN_REVOKED)
seq_puts(s, ", admin-revoked");
seq_puts(s, " }\n");
return 0;
}

Expand All @@ -2809,6 +2815,8 @@ static int nfs4_show_layout(struct seq_file *s, struct nfs4_stid *st)
seq_puts(s, ", ");
nfs4_show_fname(s, file);
}
if (st->sc_status & SC_STATUS_ADMIN_REVOKED)
seq_puts(s, ", admin-revoked");
seq_puts(s, " }\n");

return 0;
Expand Down

0 comments on commit 11b2cfb

Please sign in to comment.