Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333138
b: refs/heads/master
c: 965938b
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Sep 28, 2012
1 parent 8cb9d4c commit 6514aeb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 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: 1f7977c1368afc483908281daaffd31bca5a8d1e
refs/heads/master: 965938b83b19aeffdc1d16ce9947c8c127e8f59b
4 changes: 1 addition & 3 deletions trunk/fs/nfs/nfs4filelayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ static int filelayout_async_handle_error(struct rpc_task *task,
* i/o and all i/o waiting on the slot table to the MDS until
* layout is destroyed and a new valid layout is obtained.
*/
set_bit(NFS_LAYOUT_INVALID,
&NFS_I(inode)->layout->plh_flags);
pnfs_destroy_layout(NFS_I(inode));
rpc_wake_up(&tbl->slot_tbl_waitq);
goto reset;
Expand Down Expand Up @@ -281,7 +279,7 @@ filelayout_reset_to_mds(struct pnfs_layout_segment *lseg)
{
struct nfs4_deviceid_node *node = FILELAYOUT_DEVID_NODE(lseg);

return filelayout_test_layout_invalid(lseg->pls_layout) ||
return pnfs_test_layout_destroyed(lseg->pls_layout) ||
filelayout_test_devid_unavailable(node);
}

Expand Down
6 changes: 0 additions & 6 deletions trunk/fs/nfs/nfs4filelayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ filelayout_mark_devid_invalid(struct nfs4_deviceid_node *node)
set_bit(NFS_DEVICEID_INVALID, &node->flags);
}

static inline bool
filelayout_test_layout_invalid(struct pnfs_layout_hdr *lo)
{
return test_bit(NFS_LAYOUT_INVALID, &lo->plh_flags);
}

static inline bool
filelayout_test_devid_invalid(struct nfs4_deviceid_node *node)
{
Expand Down
7 changes: 6 additions & 1 deletion trunk/fs/nfs/pnfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ enum {
NFS_LAYOUT_BULK_RECALL, /* bulk recall affecting layout */
NFS_LAYOUT_ROC, /* some lseg had roc bit set */
NFS_LAYOUT_DESTROYED, /* no new use of layout allowed */
NFS_LAYOUT_INVALID, /* layout is being destroyed */
NFS_LAYOUT_RETURNED, /* layout has already been returned */
};

Expand Down Expand Up @@ -279,6 +278,12 @@ pnfs_test_layout_returned(struct pnfs_layout_hdr *lo)
return test_bit(NFS_LAYOUT_RETURNED, &lo->plh_flags);
}

static inline bool
pnfs_test_layout_destroyed(struct pnfs_layout_hdr *lo)
{
return test_bit(NFS_LAYOUT_DESTROYED, &lo->plh_flags);
}

static inline struct pnfs_layout_segment *
pnfs_get_lseg(struct pnfs_layout_segment *lseg)
{
Expand Down

0 comments on commit 6514aeb

Please sign in to comment.