diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-01-10 08:04:24 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-31 18:20:27 -0500 |
commit | 9e2e74dba6ddce94da187369b50a27536147d5df (patch) | |
tree | b4c2e7570775f0d9b0477fdf26e5f99c91e61ac4 /fs/nfs/blocklayout/blocklayout.h | |
parent | 332dfab6f4e02d3c5897e9470492bee7d14f29cc (diff) |
NFS: blocklayout pipe creation per network namespace context introduced
This patch implements blocklayout pipe creation and registration per each
existent network namespace.
This was achived by registering NFS per-net operations, responsible for
blocklayout pipe allocation/register and unregister/destruction instead of
initialization and destruction of static "bl_device_pipe" pipe (this one was
removed).
Note, than pointer to network blocklayout pipe is stored in per-net "nfs_net"
structure, because allocating of one more per-net structure for blocklayout
module looks redundant.
This patch also changes dev_remove() function prototype (and all it's callers,
where it' requied) by adding network namespace pointer parameter, which is used
to discover proper blocklayout pipe for rpc_queue_upcall() call.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.h b/fs/nfs/blocklayout/blocklayout.h index 49c670b18a9e..0966b39bbcfb 100644 --- a/fs/nfs/blocklayout/blocklayout.h +++ b/fs/nfs/blocklayout/blocklayout.h | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/sunrpc/rpc_pipe_fs.h> | 37 | #include <linux/sunrpc/rpc_pipe_fs.h> |
38 | 38 | ||
39 | #include "../pnfs.h" | 39 | #include "../pnfs.h" |
40 | #include "../netns.h" | ||
40 | 41 | ||
41 | #define PAGE_CACHE_SECTORS (PAGE_CACHE_SIZE >> SECTOR_SHIFT) | 42 | #define PAGE_CACHE_SECTORS (PAGE_CACHE_SIZE >> SECTOR_SHIFT) |
42 | #define PAGE_CACHE_SECTOR_SHIFT (PAGE_CACHE_SHIFT - SECTOR_SHIFT) | 43 | #define PAGE_CACHE_SECTOR_SHIFT (PAGE_CACHE_SHIFT - SECTOR_SHIFT) |
@@ -50,6 +51,7 @@ struct pnfs_block_dev { | |||
50 | struct list_head bm_node; | 51 | struct list_head bm_node; |
51 | struct nfs4_deviceid bm_mdevid; /* associated devid */ | 52 | struct nfs4_deviceid bm_mdevid; /* associated devid */ |
52 | struct block_device *bm_mdev; /* meta device itself */ | 53 | struct block_device *bm_mdev; /* meta device itself */ |
54 | struct net *net; | ||
53 | }; | 55 | }; |
54 | 56 | ||
55 | enum exstate4 { | 57 | enum exstate4 { |
@@ -161,7 +163,6 @@ struct bl_msg_hdr { | |||
161 | u16 totallen; /* length of entire message, including hdr itself */ | 163 | u16 totallen; /* length of entire message, including hdr itself */ |
162 | }; | 164 | }; |
163 | 165 | ||
164 | extern struct rpc_pipe *bl_device_pipe; | ||
165 | extern wait_queue_head_t bl_wq; | 166 | extern wait_queue_head_t bl_wq; |
166 | 167 | ||
167 | #define BL_DEVICE_UMOUNT 0x0 /* Umount--delete devices */ | 168 | #define BL_DEVICE_UMOUNT 0x0 /* Umount--delete devices */ |