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>
This commit is contained in:

committed by
Trond Myklebust

parent
332dfab6f4
commit
9e2e74dba6
@@ -37,6 +37,7 @@
|
||||
#include <linux/sunrpc/rpc_pipe_fs.h>
|
||||
|
||||
#include "../pnfs.h"
|
||||
#include "../netns.h"
|
||||
|
||||
#define PAGE_CACHE_SECTORS (PAGE_CACHE_SIZE >> SECTOR_SHIFT)
|
||||
#define PAGE_CACHE_SECTOR_SHIFT (PAGE_CACHE_SHIFT - SECTOR_SHIFT)
|
||||
@@ -50,6 +51,7 @@ struct pnfs_block_dev {
|
||||
struct list_head bm_node;
|
||||
struct nfs4_deviceid bm_mdevid; /* associated devid */
|
||||
struct block_device *bm_mdev; /* meta device itself */
|
||||
struct net *net;
|
||||
};
|
||||
|
||||
enum exstate4 {
|
||||
@@ -161,7 +163,6 @@ struct bl_msg_hdr {
|
||||
u16 totallen; /* length of entire message, including hdr itself */
|
||||
};
|
||||
|
||||
extern struct rpc_pipe *bl_device_pipe;
|
||||
extern wait_queue_head_t bl_wq;
|
||||
|
||||
#define BL_DEVICE_UMOUNT 0x0 /* Umount--delete devices */
|
||||
|
Reference in New Issue
Block a user