summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorChristoph Hellwig2014-09-03 06:27:59 +0200
committerTrond Myklebust2014-09-10 21:47:04 +0200
commit30ff0603ca4d66c8244efc80ea8470d3d04aee8b (patch)
treeee6417bbf67facef5cc1cd4b22d33f4a25b7ee2b /fs/nfs/pnfs.h
parentpnfs: add a common GETDEVICELIST implementation (diff)
downloadkernel-qcow2-linux-30ff0603ca4d66c8244efc80ea8470d3d04aee8b.tar.gz
kernel-qcow2-linux-30ff0603ca4d66c8244efc80ea8470d3d04aee8b.tar.xz
kernel-qcow2-linux-30ff0603ca4d66c8244efc80ea8470d3d04aee8b.zip
pnfs: add a nfs4_get_deviceid helper
This will be used by the block layout driver when splitting extents. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 3eeca49d9ca2..d84fe29fc88b 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -280,6 +280,13 @@ void nfs4_deviceid_purge_client(const struct nfs_client *);
int nfs4_deviceid_getdevicelist(struct nfs_server *server,
const struct nfs_fh *fh);
+static inline struct nfs4_deviceid_node *
+nfs4_get_deviceid(struct nfs4_deviceid_node *d)
+{
+ atomic_inc(&d->ref);
+ return d;
+}
+
static inline struct pnfs_layout_segment *
pnfs_get_lseg(struct pnfs_layout_segment *lseg)
{