diff options
author | Christoph Hellwig <hch@lst.de> | 2014-09-02 21:28:00 -0700 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-09-10 12:47:04 -0700 |
commit | 20d655d6197d02e98574208839da11684dc2ad1f (patch) | |
tree | 0212cbd41504909d6921db5a661a10058b7ab61c /fs/nfs/blocklayout/blocklayoutdm.c | |
parent | 30ff0603ca4d66c8244efc80ea8470d3d04aee8b (diff) | |
download | lwn-20d655d6197d02e98574208839da11684dc2ad1f.tar.gz lwn-20d655d6197d02e98574208839da11684dc2ad1f.zip |
pnfs/blocklayout: use the device id cache
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/blocklayout/blocklayoutdm.c')
-rw-r--r-- | fs/nfs/blocklayout/blocklayoutdm.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/fs/nfs/blocklayout/blocklayoutdm.c b/fs/nfs/blocklayout/blocklayoutdm.c index 8999cfddd866..abc2e9e45610 100644 --- a/fs/nfs/blocklayout/blocklayoutdm.c +++ b/fs/nfs/blocklayout/blocklayoutdm.c @@ -38,7 +38,7 @@ #define NFSDBG_FACILITY NFSDBG_PNFS_LD -static void dev_remove(struct net *net, dev_t dev) +void bl_dm_remove(struct net *net, dev_t dev) { struct bl_pipe_msg bl_pipe_msg; struct rpc_pipe_msg *msg = &bl_pipe_msg.msg; @@ -82,27 +82,3 @@ static void dev_remove(struct net *net, dev_t dev) out: kfree(msg->data); } - -/* - * Release meta device - */ -static void nfs4_blk_metadev_release(struct pnfs_block_dev *bdev) -{ - dprintk("%s Releasing\n", __func__); - nfs4_blkdev_put(bdev->bm_mdev); - dev_remove(bdev->net, bdev->bm_mdev->bd_dev); -} - -void bl_free_block_dev(struct pnfs_block_dev *bdev) -{ - if (bdev) { - if (bdev->bm_mdev) { - dprintk("%s Removing DM device: %d:%d\n", - __func__, - MAJOR(bdev->bm_mdev->bd_dev), - MINOR(bdev->bm_mdev->bd_dev)); - nfs4_blk_metadev_release(bdev); - } - kfree(bdev); - } -} |