Commit 45baadaa authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

NFSv4/pNFS: Always allow update of a zero valued layout barrier

A zero value for the layout barrier indicates that it has been cleared
(since seqid '0' is an illegal value), so we should always allow it to
be updated.

Fixes: d29b468d ("pNFS/NFSv4: Improve rejection of out-of-order layouts")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 7c0bbf2d
...@@ -335,7 +335,7 @@ static bool pnfs_seqid_is_newer(u32 s1, u32 s2) ...@@ -335,7 +335,7 @@ static bool pnfs_seqid_is_newer(u32 s1, u32 s2)
static void pnfs_barrier_update(struct pnfs_layout_hdr *lo, u32 newseq) static void pnfs_barrier_update(struct pnfs_layout_hdr *lo, u32 newseq)
{ {
if (pnfs_seqid_is_newer(newseq, lo->plh_barrier)) if (pnfs_seqid_is_newer(newseq, lo->plh_barrier) || !lo->plh_barrier)
lo->plh_barrier = newseq; lo->plh_barrier = newseq;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment