aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayoutdev.c
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2011-05-20 07:47:33 -0400
committerBoaz Harrosh <bharrosh@panasas.com>2011-05-29 13:50:42 -0400
commit1775bc342c6eacd6304493cbb2e0cda1a0182246 (patch)
treeb0a884a41f565a41957524146ff6ee51b2b7db7b /fs/nfs/nfs4filelayoutdev.c
parenta1eaecbc4c8307e27772d6584ef85a2e93250661 (diff)
NFSv4.1: purge deviceid cache on nfs_free_client
Use the pnfs_layoutdriver_type both as a qualifier for the deviceid, distinguishing deviceid from different layout types on the server, and for freeing the layout-driver allocated structure containing the nfs4_deviceid_node. [BUG in _deviceid_purge_client] [layout_driver MUST set free_deviceid_node if using dev-cache] [let ver < 4.1 compile] Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> [removed EXPORT_SYMBOL_GPL(nfs4_deviceid_purge_client)] Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs/nfs4filelayoutdev.c')
-rw-r--r--fs/nfs/nfs4filelayoutdev.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index eda4527a57e..5914659c8ec 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -156,7 +156,7 @@ destroy_ds(struct nfs4_pnfs_ds *ds)
156 kfree(ds); 156 kfree(ds);
157} 157}
158 158
159static void 159void
160nfs4_fl_free_deviceid(struct nfs4_file_layout_dsaddr *dsaddr) 160nfs4_fl_free_deviceid(struct nfs4_file_layout_dsaddr *dsaddr)
161{ 161{
162 struct nfs4_pnfs_ds *ds; 162 struct nfs4_pnfs_ds *ds;
@@ -386,7 +386,9 @@ decode_device(struct inode *ino, struct pnfs_device *pdev, gfp_t gfp_flags)
386 dsaddr->stripe_indices = stripe_indices; 386 dsaddr->stripe_indices = stripe_indices;
387 stripe_indices = NULL; 387 stripe_indices = NULL;
388 dsaddr->ds_num = num; 388 dsaddr->ds_num = num;
389 nfs4_init_deviceid_node(&dsaddr->id_node, NFS_SERVER(ino)->nfs_client, 389 nfs4_init_deviceid_node(&dsaddr->id_node,
390 NFS_SERVER(ino)->pnfs_curr_ld,
391 NFS_SERVER(ino)->nfs_client,
390 &pdev->dev_id); 392 &pdev->dev_id);
391 393
392 for (i = 0; i < dsaddr->ds_num; i++) { 394 for (i = 0; i < dsaddr->ds_num; i++) {
@@ -548,8 +550,7 @@ out_free:
548void 550void
549nfs4_fl_put_deviceid(struct nfs4_file_layout_dsaddr *dsaddr) 551nfs4_fl_put_deviceid(struct nfs4_file_layout_dsaddr *dsaddr)
550{ 552{
551 if (nfs4_put_deviceid_node(&dsaddr->id_node)) 553 nfs4_put_deviceid_node(&dsaddr->id_node);
552 nfs4_fl_free_deviceid(dsaddr);
553} 554}
554 555
555/* 556/*