diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-12-05 14:27:05 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-12-05 14:27:05 -0500 |
commit | d01c6ed6db38a4db2921591e4f5425bee1931aca (patch) | |
tree | 6342f36a51fa5c2ded7e8ce27eb09822ee96bb34 /fs/nfs | |
parent | 5776a9cd2a66cdc037c8e6ee34cde40ee768893d (diff) |
NFS4.x/pnfs: Fix up logging of layout stateids
If the layout is invalid, then just log a '0' value.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4trace.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h index 2cff5901c689..e3fbdc8a98eb 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h @@ -1815,7 +1815,7 @@ TRACE_EVENT(pnfs_update_layout, __entry->count = count; __entry->iomode = iomode; __entry->reason = reason; - if (lo != NULL) { + if (lo != NULL && pnfs_layout_is_valid(lo)) { __entry->layoutstateid_seq = be32_to_cpu(lo->plh_stateid.seqid); __entry->layoutstateid_hash = @@ -1869,7 +1869,7 @@ DECLARE_EVENT_CLASS(pnfs_layout_event, __entry->pos = pos; __entry->count = count; __entry->iomode = iomode; - if (lo != NULL) { + if (lo != NULL && pnfs_layout_is_valid(lo)) { __entry->layoutstateid_seq = be32_to_cpu(lo->plh_stateid.seqid); __entry->layoutstateid_hash = |