aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayout.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-21 14:48:04 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-28 16:03:16 -0400
commit8006bfba36d42b6976ed92979f51e5f9bef2625c (patch)
tree83b5c3761408b6cbfef4112431ef466b5392f909 /fs/nfs/nfs4filelayout.c
parent579342785f7069d32e9637ef30d59c4256dcec3d (diff)
NFSv4.1: Get rid of the NFS_LAYOUT_DESTROYED state
We already have a mechanism for blocking LAYOUTGET by means of the plh_block_lgets counter. The only "service" that NFS_LAYOUT_DESTROYED provides at this point is to block layoutget once the layout segment list is empty, which basically means that you have to wait until the pnfs_layout_hdr is destroyed before you can do pNFS on that file again. This patch enables the reuse of the pnfs_layout_hdr if the layout segment list is empty. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r--fs/nfs/nfs4filelayout.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 6cce57e7fe55..52d847212066 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -279,8 +279,7 @@ filelayout_reset_to_mds(struct pnfs_layout_segment *lseg)
279{ 279{
280 struct nfs4_deviceid_node *node = FILELAYOUT_DEVID_NODE(lseg); 280 struct nfs4_deviceid_node *node = FILELAYOUT_DEVID_NODE(lseg);
281 281
282 return pnfs_test_layout_destroyed(lseg->pls_layout) || 282 return filelayout_test_devid_unavailable(node);
283 filelayout_test_devid_unavailable(node);
284} 283}
285 284
286/* 285/*