diff options
author | Fred Isaman <iisaman@citi.umich.edu> | 2011-07-31 04:52:46 +0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-31 20:18:16 +0400 |
commit | 2f9fd182607e7b3bdca35f6ed7f2fae539f7c46b (patch) | |
tree | 9a61ca5ef63c4160c3b632fe333720d3927b627f /fs/nfs/blocklayout/blocklayoutdev.c | |
parent | 03341d2cc91c700fc38883e572043a6a8f17dd5c (diff) | |
download | linux-2f9fd182607e7b3bdca35f6ed7f2fae539f7c46b.tar.xz |
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/blocklayoutdev.c')
-rw-r--r-- | fs/nfs/blocklayout/blocklayoutdev.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/nfs/blocklayout/blocklayoutdev.c b/fs/nfs/blocklayout/blocklayoutdev.c index 64da33a40eaf..b23fe601d1c9 100644 --- a/fs/nfs/blocklayout/blocklayoutdev.c +++ b/fs/nfs/blocklayout/blocklayoutdev.c @@ -116,8 +116,7 @@ void bl_pipe_destroy_msg(struct rpc_pipe_msg *msg) */ struct pnfs_block_dev * nfs4_blk_decode_device(struct nfs_server *server, - struct pnfs_device *dev, - struct list_head *sdlist) + struct pnfs_device *dev) { struct pnfs_block_dev *rv = NULL; struct block_device *bd = NULL; @@ -129,6 +128,7 @@ nfs4_blk_decode_device(struct nfs_server *server, uint8_t *dataptr; DECLARE_WAITQUEUE(wq, current); struct bl_dev_msg *reply = &bl_mount_reply; + int offset, len, i; dprintk("%s CREATING PIPEFS MESSAGE\n", __func__); dprintk("%s: deviceid: %s, mincount: %d\n", __func__, dev->dev_id.data, @@ -143,7 +143,14 @@ nfs4_blk_decode_device(struct nfs_server *server, memcpy(msg.data, &bl_msg, sizeof(bl_msg)); dataptr = (uint8_t *) msg.data; - memcpy(&dataptr[sizeof(bl_msg)], dev->area, dev->mincount); + len = dev->mincount; + offset = sizeof(bl_msg); + for (i = 0; len > 0; i++) { + memcpy(&dataptr[offset], page_address(dev->pages[i]), + len < PAGE_CACHE_SIZE ? len : PAGE_CACHE_SIZE); + len -= PAGE_CACHE_SIZE; + offset += PAGE_CACHE_SIZE; + } msg.len = sizeof(bl_msg) + dev->mincount; dprintk("%s CALLING USERSPACE DAEMON\n", __func__); |