Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333213
b: refs/heads/master
c: 25a1a62
h: refs/heads/master
i:
  333211: 50ff7d6
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 3, 2012
1 parent efe5fdb commit 37b7b70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a65503f3dbdb4aa1cd6cb58c479c015d093292b
refs/heads/master: 25a1a6211dd2fcbf0e45a07030703e2a42d7aa87
11 changes: 7 additions & 4 deletions trunk/fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ pnfs_set_layout_stateid(struct pnfs_layout_hdr *lo, const nfs4_stateid *new,
if (update_barrier) {
u32 new_barrier = be32_to_cpu(new->seqid);

if ((int)(new_barrier - lo->plh_barrier))
if (pnfs_seqid_is_newer(new_barrier, lo->plh_barrier))
lo->plh_barrier = new_barrier;
} else {
/* Because of wraparound, we want to keep the barrier
Expand All @@ -593,9 +593,12 @@ static bool
pnfs_layoutgets_blocked(struct pnfs_layout_hdr *lo, nfs4_stateid *stateid,
int lget)
{
if ((stateid) &&
(int)(lo->plh_barrier - be32_to_cpu(stateid->seqid)) >= 0)
return true;
if (stateid != NULL) {
u32 seqid = be32_to_cpu(stateid->seqid);

if (!pnfs_seqid_is_newer(seqid, lo->plh_barrier))
return true;
}
return lo->plh_block_lgets ||
test_bit(NFS_LAYOUT_BULK_RECALL, &lo->plh_flags) ||
(list_empty(&lo->plh_segs) &&
Expand Down

0 comments on commit 37b7b70

Please sign in to comment.