diff options
author | Fred Isaman <iisaman@citi.umich.edu> | 2011-07-30 20:52:46 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-31 12:18:16 -0400 |
commit | 2f9fd182607e7b3bdca35f6ed7f2fae539f7c46b (patch) | |
tree | 9a61ca5ef63c4160c3b632fe333720d3927b627f /fs/nfs/blocklayout/blocklayout.h | |
parent | 03341d2cc91c700fc38883e572043a6a8f17dd5c (diff) |
pnfsblock: call and parse getdevicelist
Call GETDEVICELIST during mount, then call and parse GETDEVICEINFO
for each device returned.
[pnfsblock: get rid of deprecated xdr macros]
Signed-off-by: Jim Rees <rees@umich.edu>
[pnfsblock: fix pnfs_deviceid references]
Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
[pnfsblock: fix print format warnings for sector_t and size_t]
[pnfs-block: #include <linux/vmalloc.h>]
[pnfsblock: no PNFS_NFS_SERVER]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[pnfsblock: fix bug determining size of striped volume]
[pnfsblock: fix oops when using multiple devices]
Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Benny Halevy <bhalevy@tonian.com>
[pnfsblock: get rid of vmap and deviceid->area structure]
Signed-off-by: Peng Tao <peng_tao@emc.com>
Signed-off-by: Jim Rees <rees@umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/blocklayout/blocklayout.h')
-rw-r--r-- | fs/nfs/blocklayout/blocklayout.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.h b/fs/nfs/blocklayout/blocklayout.h index 581d8f47a723..d645880f61a0 100644 --- a/fs/nfs/blocklayout/blocklayout.h +++ b/fs/nfs/blocklayout/blocklayout.h | |||
@@ -38,6 +38,11 @@ | |||
38 | 38 | ||
39 | #include "../pnfs.h" | 39 | #include "../pnfs.h" |
40 | 40 | ||
41 | struct block_mount_id { | ||
42 | spinlock_t bm_lock; /* protects list */ | ||
43 | struct list_head bm_devlist; /* holds pnfs_block_dev */ | ||
44 | }; | ||
45 | |||
41 | struct pnfs_block_dev { | 46 | struct pnfs_block_dev { |
42 | struct list_head bm_node; | 47 | struct list_head bm_node; |
43 | struct nfs4_deviceid bm_mdevid; /* associated devid */ | 48 | struct nfs4_deviceid bm_mdevid; /* associated devid */ |
@@ -99,7 +104,10 @@ struct pnfs_block_layout { | |||
99 | sector_t bl_blocksize; /* Server blocksize in sectors */ | 104 | sector_t bl_blocksize; /* Server blocksize in sectors */ |
100 | }; | 105 | }; |
101 | 106 | ||
102 | static inline struct pnfs_block_layout *BLK_LO2EXT(struct pnfs_layout_hdr *lo) | 107 | #define BLK_ID(lo) ((struct block_mount_id *)(NFS_SERVER(lo->plh_inode)->pnfs_ld_data)) |
108 | |||
109 | static inline struct pnfs_block_layout * | ||
110 | BLK_LO2EXT(struct pnfs_layout_hdr *lo) | ||
103 | { | 111 | { |
104 | return container_of(lo, struct pnfs_block_layout, bl_layout); | 112 | return container_of(lo, struct pnfs_block_layout, bl_layout); |
105 | } | 113 | } |
@@ -137,8 +145,7 @@ void bl_pipe_destroy_msg(struct rpc_pipe_msg *); | |||
137 | struct block_device *nfs4_blkdev_get(dev_t dev); | 145 | struct block_device *nfs4_blkdev_get(dev_t dev); |
138 | int nfs4_blkdev_put(struct block_device *bdev); | 146 | int nfs4_blkdev_put(struct block_device *bdev); |
139 | struct pnfs_block_dev *nfs4_blk_decode_device(struct nfs_server *server, | 147 | struct pnfs_block_dev *nfs4_blk_decode_device(struct nfs_server *server, |
140 | struct pnfs_device *dev, | 148 | struct pnfs_device *dev); |
141 | struct list_head *sdlist); | ||
142 | int nfs4_blk_process_layoutget(struct pnfs_layout_hdr *lo, | 149 | int nfs4_blk_process_layoutget(struct pnfs_layout_hdr *lo, |
143 | struct nfs4_layoutget_res *lgr, gfp_t gfp_flags); | 150 | struct nfs4_layoutget_res *lgr, gfp_t gfp_flags); |
144 | 151 | ||