summaryrefslogtreecommitdiffstats
path: root/fs/nfs/objlayout/objlayout.h
diff options
context:
space:
mode:
authorBenny Halevy2011-05-22 18:51:48 +0200
committerBoaz Harrosh2011-05-29 19:53:51 +0200
commite51b841dd0be9ff53f740c44c32c32679edcb7c8 (patch)
tree03e46d6013fa2a45ad22b3f510267d11e5f8d25a /fs/nfs/objlayout/objlayout.h
parentpnfs: alloc and free layout_hdr layoutdriver methods (diff)
downloadkernel-qcow2-linux-e51b841dd0be9ff53f740c44c32c32679edcb7c8.tar.gz
kernel-qcow2-linux-e51b841dd0be9ff53f740c44c32c32679edcb7c8.tar.xz
kernel-qcow2-linux-e51b841dd0be9ff53f740c44c32c32679edcb7c8.zip
pnfs-obj: define per-inode private structure
allocate and deallocate per-inode private pnfs_layout_hdr in preparation for I/O implementation. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs/objlayout/objlayout.h')
-rw-r--r--fs/nfs/objlayout/objlayout.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/nfs/objlayout/objlayout.h b/fs/nfs/objlayout/objlayout.h
index 0814271bb9ba..fa0262149f59 100644
--- a/fs/nfs/objlayout/objlayout.h
+++ b/fs/nfs/objlayout/objlayout.h
@@ -46,6 +46,19 @@
#include "../pnfs.h"
/*
+ * per-inode layout
+ */
+struct objlayout {
+ struct pnfs_layout_hdr pnfs_layout;
+};
+
+static inline struct objlayout *
+OBJLAYOUT(struct pnfs_layout_hdr *lo)
+{
+ return container_of(lo, struct objlayout, pnfs_layout);
+}
+
+/*
* Raid engine I/O API
*/
extern int objio_alloc_lseg(struct pnfs_layout_segment **outp,
@@ -66,6 +79,10 @@ extern void objlayout_put_deviceinfo(struct pnfs_osd_deviceaddr *deviceaddr);
/*
* exported generic objects function vectors
*/
+
+extern struct pnfs_layout_hdr *objlayout_alloc_layout_hdr(struct inode *, gfp_t gfp_flags);
+extern void objlayout_free_layout_hdr(struct pnfs_layout_hdr *);
+
extern struct pnfs_layout_segment *objlayout_alloc_lseg(
struct pnfs_layout_hdr *,
struct nfs4_layoutget_res *,