summaryrefslogtreecommitdiff
path: root/fs/nfs/objlayout/objlayout.h
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2011-05-26 21:45:34 +0300
committerBoaz Harrosh <bharrosh@panasas.com>2011-05-29 20:53:33 +0300
commitb6c05f1693115164c7b797152ac7ea3ef8e5d296 (patch)
tree24430851c2569f4db76b13f41e82514326fbb878 /fs/nfs/objlayout/objlayout.h
parent09f5bf4e6d0607399c16ec7a2d8d166f31086686 (diff)
pnfs-obj: objio_osd device information retrieval and caching
When a new layout is received in objio_alloc_lseg all device_ids referenced are retrieved. The device information is queried for from MDS and then the osd_device is looked-up from the osd-initiator library. The devices are cached in a per-mount-point list, for later use. At unmount all devices are "put" back to the library. objlayout_get_deviceinfo(), objlayout_put_deviceinfo() middleware API for retrieving device information given a device_id. TODO: The device cache can get big. Cap its size. Keep an LRU and start to return devices which were not used, when list gets to big, or when new entries allocation fail. [pnfs-obj: Bugs in new global-device-cache code] Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> [gfp_flags] [use global device cache] [use layout driver in global device cache] Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs/objlayout/objlayout.h')
-rw-r--r--fs/nfs/objlayout/objlayout.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfs/objlayout/objlayout.h b/fs/nfs/objlayout/objlayout.h
index 066280a07fa8..0814271bb9ba 100644
--- a/fs/nfs/objlayout/objlayout.h
+++ b/fs/nfs/objlayout/objlayout.h
@@ -56,6 +56,14 @@ extern int objio_alloc_lseg(struct pnfs_layout_segment **outp,
extern void objio_free_lseg(struct pnfs_layout_segment *lseg);
/*
+ * callback API
+ */
+extern int objlayout_get_deviceinfo(struct pnfs_layout_hdr *pnfslay,
+ struct nfs4_deviceid *d_id, struct pnfs_osd_deviceaddr **deviceaddr,
+ gfp_t gfp_flags);
+extern void objlayout_put_deviceinfo(struct pnfs_osd_deviceaddr *deviceaddr);
+
+/*
* exported generic objects function vectors
*/
extern struct pnfs_layout_segment *objlayout_alloc_lseg(