* [PATCH 0/13] Remove non-file layout code from submit tree
@ 2010-04-28 22:24 andros
2010-04-28 22:24 ` [PATCH 01/13] SQUASHME pnfs_submit: remove GETDEVICELIST andros
0 siblings, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs
Applies to 2.6.34-rc3 pnfs-submit branch on top of the "pNFS generic devce ID
cache version 3" patches sent April 26 which includes these patches:
0001-SQUASHME-pnfs_submit-generic-device-ID-cache.patch
0002-SQUASHME-pnfs_submit-fix-multiple-mount-set_pnfs_lay.patch
0003-SQUASHME-pnfs-submit-file-layout-driver-generic-devi.patch
This patch set begins separating non-file layout code from file layout code.
Adjust to using the generic device id cache.
Permanetly remove structure fields and function parameters not used by any
layout driver.
The next patch set will restore object and block layout code removed by these
patches.
0001-SQUASHME-pnfs_submit-remove-GETDEVICELIST.patch
0002-SQUASHME-pnfs_submit-remove-CB_NOTIFY_DEVICEID.patch
0003-SQUASHME-pnfs_submit-remove-pnfs_mount_type-from-all.patch
0004-SQUASHME-pnfs_submit-remove-get_blocksize-policy-ope.patch
0005-SQUASHME-pnfs_submit-remove-ds_wsize-ds_rsize-ds_wpa.patch
0006-SQUASHME-pnfs_submit-remove-uninitialize_mountpoint.patch
0007-SQUASHME-pnfs_submit-remove-struct-pnfs_mount_type.patch
0008-SQUASHME-pnfs_submit-change-initialize_mountpoint-pa.patch
0009-SQUASHME-pnfs_submit-change-nfs_fsino-layoutclass-na.patch
0010-SQUASHME-pnfs_submit-remove-pnfs_fs_ltype.patch
0011-SQUASHME-pnfs_submit-remove-layout_name.patch
File layout code bug fix and cleanup.
0012-SQUASHME-pnfs_submit-fall-back-to-MDS-on-filelayout_.patch
0013-SQUASHME-pnfs_submit-cleanup-nfs4_pnfs_ds_add.patch
Tested:
CONFIG_NFS_V4_1 set
V4.0, V4.1, and pNFS mounts:
Connectathon tests pass.
CONFIG_NFS_V4_1 not set:
Connectathon tests pass.
-->Andy
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 01/13] SQUASHME pnfs_submit: remove GETDEVICELIST
2010-04-28 22:24 [PATCH 0/13] Remove non-file layout code from submit tree andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 02/13] SQUASHME pnfs_submit: remove CB_NOTIFY_DEVICEID andros
0 siblings, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
The file layout driver does not use GETDEVICELIST
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4proc.c | 47 -----------------
fs/nfs/nfs4xdr.c | 126 ---------------------------------------------
fs/nfs/pnfs.c | 1 -
fs/nfs/pnfs.h | 3 -
include/linux/nfs4.h | 1 -
include/linux/nfs4_pnfs.h | 2 -
include/linux/pnfs_xdr.h | 11 ----
7 files changed, 0 insertions(+), 191 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index e5faf09..0d7b6d7 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5764,53 +5764,6 @@ out:
return status;
}
-/*
- * Retrieve the list of Data Server devices from the MDS.
- */
-static int _nfs4_pnfs_getdevicelist(struct nfs_fh *fh,
- struct nfs_server *server,
- struct pnfs_devicelist *devlist)
-{
- struct nfs4_pnfs_getdevicelist_arg arg = {
- .fh = fh,
- .layoutclass = server->pnfs_curr_ld->id,
- };
- struct nfs4_pnfs_getdevicelist_res res = {
- .devlist = devlist,
- };
- struct rpc_message msg = {
- .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_PNFS_GETDEVICELIST],
- .rpc_argp = &arg,
- .rpc_resp = &res,
- };
- int status;
-
- dprintk("--> %s\n", __func__);
- status = nfs4_call_sync(server, &msg, &arg, &res, 0);
- dprintk("<-- %s status=%d\n", __func__, status);
- return status;
-}
-
-int nfs4_pnfs_getdevicelist(struct super_block *sb,
- struct nfs_fh *fh,
- struct pnfs_devicelist *devlist)
-{
- struct nfs4_exception exception = { };
- struct nfs_server *server = NFS_SB(sb);
- int err;
-
- do {
- err = nfs4_handle_exception(server,
- _nfs4_pnfs_getdevicelist(fh, server, devlist),
- &exception);
- } while (exception.retry);
-
- dprintk("nfs4_pnfs_getdevlist: err=%d, num_devs=%u\n",
- err, devlist->num_devs);
-
- return err;
-}
-
int nfs4_pnfs_getdeviceinfo(struct super_block *sb, struct pnfs_device *pdev)
{
struct nfs_server *server = NFS_SB(sb);
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 1a9e5e7..7089284 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -305,12 +305,6 @@ static int nfs4_stat_to_errno(int);
XDR_QUADLEN(NFS4_MAX_SESSIONID_LEN) + 5)
#define encode_reclaim_complete_maxsz (op_encode_hdr_maxsz + 4)
#define decode_reclaim_complete_maxsz (op_decode_hdr_maxsz + 4)
-#define encode_getdevicelist_maxsz (op_encode_hdr_maxsz + 4 + \
- encode_verifier_maxsz)
-#define decode_getdevicelist_maxsz (op_decode_hdr_maxsz + 2 + 1 + 1 + \
- decode_verifier_maxsz + \
- XDR_QUADLEN(NFS4_PNFS_GETDEVLIST_MAXNUM * \
- NFS4_PNFS_DEVICEID4_SIZE))
#define encode_getdeviceinfo_maxsz (op_encode_hdr_maxsz + 4 + \
XDR_QUADLEN(NFS4_PNFS_DEVICEID4_SIZE))
#define decode_getdeviceinfo_maxsz (op_decode_hdr_maxsz + \
@@ -717,14 +711,6 @@ static int nfs4_stat_to_errno(int);
#define NFS4_dec_reclaim_complete_sz (compound_decode_hdr_maxsz + \
decode_sequence_maxsz + \
decode_reclaim_complete_maxsz)
-#define NFS4_enc_getdevicelist_sz (compound_encode_hdr_maxsz + \
- encode_sequence_maxsz + \
- encode_putfh_maxsz + \
- encode_getdevicelist_maxsz)
-#define NFS4_dec_getdevicelist_sz (compound_decode_hdr_maxsz + \
- decode_sequence_maxsz + \
- decode_putfh_maxsz + \
- decode_getdevicelist_maxsz)
#define NFS4_enc_getdeviceinfo_sz (compound_encode_hdr_maxsz + \
encode_sequence_maxsz +\
encode_getdeviceinfo_maxsz)
@@ -1813,25 +1799,6 @@ static void encode_sequence(struct xdr_stream *xdr,
#ifdef CONFIG_NFS_V4_1
static void
-encode_getdevicelist(struct xdr_stream *xdr,
- const struct nfs4_pnfs_getdevicelist_arg *args,
- struct compound_hdr *hdr)
-{
- __be32 *p;
- nfs4_verifier dummy = {
- .data = "dummmmmy",
- };
-
- p = reserve_space(xdr, 20);
- *p++ = cpu_to_be32(OP_GETDEVICELIST);
- *p++ = cpu_to_be32(args->layoutclass);
- *p++ = cpu_to_be32(NFS4_PNFS_GETDEVLIST_MAXNUM);
- xdr_encode_hyper(p, 0ULL); /* cookie */
- encode_nfs4_verifier(xdr, &dummy);
- hdr->nops++;
-}
-
-static void
encode_getdeviceinfo(struct xdr_stream *xdr,
const struct nfs4_pnfs_getdeviceinfo_arg *args,
struct compound_hdr *hdr)
@@ -2768,27 +2735,6 @@ static int nfs4_xdr_enc_reclaim_complete(struct rpc_rqst *req, uint32_t *p,
}
/*
- * Encode GETDEVICELIST request
- */
-static int
-nfs4_xdr_enc_getdevicelist(struct rpc_rqst *req, uint32_t *p,
- struct nfs4_pnfs_getdevicelist_arg *args)
-{
- struct xdr_stream xdr;
- struct compound_hdr hdr = {
- .minorversion = nfs4_xdr_minorversion(&args->seq_args),
- };
-
- xdr_init_encode(&xdr, &req->rq_snd_buf, p);
- encode_compound_hdr(&xdr, req, &hdr);
- encode_sequence(&xdr, &args->seq_args, &hdr);
- encode_putfh(&xdr, args->fh, &hdr);
- encode_getdevicelist(&xdr, args, &hdr);
- encode_nops(&hdr);
- return 0;
-}
-
-/*
* Encode GETDEVICEINFO request
*/
static int nfs4_xdr_enc_getdeviceinfo(struct rpc_rqst *req, uint32_t *p,
@@ -5168,50 +5114,6 @@ out_overflow:
}
#if defined(CONFIG_NFS_V4_1)
-/*
- * TODO: Need to handle case when EOF != true;
- */
-static int decode_getdevicelist(struct xdr_stream *xdr,
- struct pnfs_devicelist *res)
-{
- __be32 *p;
- int status, i;
- struct nfs_writeverf verftemp;
-
- status = decode_op_hdr(xdr, OP_GETDEVICELIST);
- if (status)
- return status;
-
- p = xdr_inline_decode(xdr, 8 + 8 + 4);
- if (unlikely(!p))
- goto out_overflow;
-
- /* TODO: Skip cookie for now */
- p += 2;
-
- /* Read verifier */
- p = xdr_decode_opaque_fixed(p, verftemp.verifier, 8);
-
- res->num_devs = be32_to_cpup(p);
-
- dprintk("%s: num_dev %d \n", __func__, res->num_devs);
-
- if (res->num_devs > NFS4_PNFS_GETDEVLIST_MAXNUM)
- return -NFS4ERR_REP_TOO_BIG;
-
- p = xdr_inline_decode(xdr,
- res->num_devs * NFS4_PNFS_DEVICEID4_SIZE + 4);
- if (unlikely(!p))
- goto out_overflow;
- for (i = 0; i < res->num_devs; i++)
- p = xdr_decode_opaque_fixed(p, res->dev_id[i].data,
- NFS4_PNFS_DEVICEID4_SIZE);
- res->eof = be32_to_cpup(p);
- return 0;
-out_overflow:
- print_overflow_msg(__func__, xdr);
- return -EIO;
-}
static int decode_getdeviceinfo(struct xdr_stream *xdr,
struct pnfs_device *pdev)
@@ -6403,33 +6305,6 @@ static int nfs4_xdr_dec_reclaim_complete(struct rpc_rqst *rqstp, uint32_t *p,
}
/*
- * Decode GETDEVICELIST response
- */
-static int nfs4_xdr_dec_getdevicelist(struct rpc_rqst *rqstp, uint32_t *p,
- struct nfs4_pnfs_getdevicelist_res *res)
-{
- struct xdr_stream xdr;
- struct compound_hdr hdr;
- int status;
-
- dprintk("encoding getdevicelist!\n");
-
- xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
- status = decode_compound_hdr(&xdr, &hdr);
- if (status != 0)
- goto out;
- status = decode_sequence(&xdr, &res->seq_res, rqstp);
- if (status != 0)
-goto out;
- status = decode_putfh(&xdr);
- if (status != 0)
- goto out;
- status = decode_getdevicelist(&xdr, res->devlist);
-out:
- return status;
-}
-
-/*
* Decode GETDEVINFO response
*/
static int nfs4_xdr_dec_getdeviceinfo(struct rpc_rqst *rqstp, uint32_t *p,
@@ -6758,7 +6633,6 @@ struct rpc_procinfo nfs4_procedures[] = {
PROC(SEQUENCE, enc_sequence, dec_sequence),
PROC(GET_LEASE_TIME, enc_get_lease_time, dec_get_lease_time),
PROC(RECLAIM_COMPLETE, enc_reclaim_complete, dec_reclaim_complete),
- PROC(PNFS_GETDEVICELIST, enc_getdevicelist, dec_getdevicelist),
PROC(PNFS_GETDEVICEINFO, enc_getdeviceinfo, dec_getdeviceinfo),
PROC(PNFS_LAYOUTGET, enc_layoutget, dec_layoutget),
PROC(PNFS_LAYOUTCOMMIT, enc_layoutcommit, dec_layoutcommit),
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index a3e8231..fbc04c3 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -2293,7 +2293,6 @@ void pnfs_free_fsdata(struct pnfs_fsdata *fsdata)
/* Callback operations for layout drivers.
*/
struct pnfs_client_operations pnfs_ops = {
- .nfs_getdevicelist = nfs4_pnfs_getdevicelist,
.nfs_getdeviceinfo = nfs4_pnfs_getdeviceinfo,
.nfs_readlist_complete = pnfs_read_done,
.nfs_writelist_complete = pnfs_writeback_done,
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 7dc3ecc..868c1ac 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -22,9 +22,6 @@
#include "iostat.h"
/* nfs4proc.c */
-extern int nfs4_pnfs_getdevicelist(struct super_block *sb,
- struct nfs_fh *fh,
- struct pnfs_devicelist *devlist);
extern int nfs4_pnfs_getdeviceinfo(struct super_block *sb,
struct pnfs_device *dev);
extern int pnfs4_proc_layoutget(struct nfs4_pnfs_layoutget *lgp);
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index 2bb8eeb..1730e86 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -543,7 +543,6 @@ enum {
NFSPROC4_CLNT_PNFS_LAYOUTGET,
NFSPROC4_CLNT_PNFS_LAYOUTCOMMIT,
NFSPROC4_CLNT_PNFS_LAYOUTRETURN,
- NFSPROC4_CLNT_PNFS_GETDEVICELIST,
NFSPROC4_CLNT_PNFS_GETDEVICEINFO,
NFSPROC4_CLNT_PNFS_WRITE,
NFSPROC4_CLNT_PNFS_COMMIT,
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index 3b7aeb7..ae2f7ed 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -331,8 +331,6 @@ extern void nfs4_unset_layout_deviceid(struct pnfs_layout_segment *,
* E.g., getdeviceinfo, I/O callbacks, etc
*/
struct pnfs_client_operations {
- int (*nfs_getdevicelist) (struct super_block *sb, struct nfs_fh *fh,
- struct pnfs_devicelist *devlist);
int (*nfs_getdeviceinfo) (struct super_block *sb,
struct pnfs_device *dev);
diff --git a/include/linux/pnfs_xdr.h b/include/linux/pnfs_xdr.h
index 4f34aa8..a0bf341 100644
--- a/include/linux/pnfs_xdr.h
+++ b/include/linux/pnfs_xdr.h
@@ -116,17 +116,6 @@ struct nfs4_pnfs_layoutreturn {
int rpc_status;
};
-struct nfs4_pnfs_getdevicelist_arg {
- const struct nfs_fh *fh;
- u32 layoutclass;
- struct nfs4_sequence_args seq_args;
-};
-
-struct nfs4_pnfs_getdevicelist_res {
- struct pnfs_devicelist *devlist;
- struct nfs4_sequence_res seq_res;
-};
-
struct nfs4_pnfs_getdeviceinfo_arg {
struct pnfs_device *pdev;
struct nfs4_sequence_args seq_args;
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 02/13] SQUASHME pnfs_submit: remove CB_NOTIFY_DEVICEID
2010-04-28 22:24 ` [PATCH 01/13] SQUASHME pnfs_submit: remove GETDEVICELIST andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 03/13] SQUASHME pnfs_submit: remove pnfs_mount_type from alloc_layout andros
0 siblings, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
The file layoutdriver submission will not support CB_NOTIFY_DEVICEID
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/callback_proc.c | 68 --------------------------------
fs/nfs/callback_xdr.c | 96 +--------------------------------------------
include/linux/nfs4_pnfs.h | 1 -
3 files changed, 1 insertions(+), 164 deletions(-)
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index efdea62..4d315f7 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -324,74 +324,6 @@ out:
return res;
}
-/* Remove all devices for each superblock for nfs_client. This may try
- * to remove the same device multple times if they are
- * shared across superblocks in the layout driver, but the
- * layout drive should be able to handle this */
-static __be32 pnfs_devicenotify_client(struct nfs_client *clp,
- struct cb_pnfs_devicenotifyargs *args)
-{
- struct nfs_server *server;
- __be32 res = 0, res2 = 0;
- int i, num_sb = 0;
- struct layoutdriver_io_operations *ops;
- uint32_t type;
-
- dprintk("%s: --> clp %p\n", __func__, clp);
-
- list_for_each_entry(server, &clp->cl_superblocks, client_link) {
- ops = server->pnfs_curr_ld->ld_io_ops;
- num_sb++;
- for (i = 0; i < args->ndevs; i++) {
- struct cb_pnfs_devicenotifyitem *dev = &args->devs[i];
- type = dev->cbd_notify_type;
- if (type == NOTIFY_DEVICEID4_DELETE &&
- PNFS_EXISTS_LDIO_OP(server, device_delete))
- res = ops->device_delete(server->pnfs_mountid,
- &dev->cbd_dev_id);
- else if (type == NOTIFY_DEVICEID4_CHANGE)
- printk(KERN_ERR "%s: NOTIFY_DEVICEID4_CHANGE "
- "not supported\n", __func__);
- if (res)
- res2 = res;
- }
- }
- dprintk("%s: exit with status = %d numsb %u\n",
- __func__, ntohl(res2), num_sb);
- return res2;
-}
-
-__be32 pnfs_cb_devicenotify(struct cb_pnfs_devicenotifyargs *args,
- void *dummy)
-{
- struct nfs_client *clp;
- __be32 res = 0;
- unsigned int num_client = 0;
-
- dprintk("%s: -->\n", __func__);
-
- res = __constant_htonl(NFS4ERR_INVAL);
- clp = nfs_find_client(args->addr, 4);
- if (clp == NULL) {
- dprintk("%s: no client for addr %u.%u.%u.%u\n",
- __func__, NIPQUAD(args->addr));
- goto out;
- }
-
- do {
- struct nfs_client *prev = clp;
- num_client++;
- res = pnfs_devicenotify_client(clp, args);
- clp = nfs_find_client_next(prev);
- nfs_put_client(prev);
- } while (clp != NULL);
-
-out:
- dprintk("%s: exit with status = %d numclient %u\n",
- __func__, ntohl(res), num_client);
- return res;
-}
-
int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation, const nfs4_stateid *stateid)
{
if (delegation == NULL)
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index d03a122..4a69882 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -22,7 +22,6 @@
#if defined(CONFIG_NFS_V4_1)
#define CB_OP_LAYOUTRECALL_RES_MAXSZ (CB_OP_HDR_RES_MAXSZ)
-#define CB_OP_DEVICENOTIFY_RES_MAXSZ (CB_OP_HDR_RES_MAXSZ)
#define CB_OP_SEQUENCE_RES_MAXSZ (CB_OP_HDR_RES_MAXSZ + \
4 + 1 + 3)
#define CB_OP_RECALLANY_RES_MAXSZ (CB_OP_HDR_RES_MAXSZ)
@@ -267,93 +266,6 @@ out:
return status;
}
-static __be32 decode_pnfs_devicenotify_args(struct svc_rqst *rqstp,
- struct xdr_stream *xdr,
- struct cb_pnfs_devicenotifyargs *args)
-{
- __be32 *p;
- __be32 status = 0;
- u32 tmp;
- int n, i;
- args->ndevs = 0;
-
- args->addr = svc_addr(rqstp);
-
- /* Num of device notifications */
- p = read_buf(xdr, sizeof(uint32_t));
- if (unlikely(p == NULL)) {
- status = htonl(NFS4ERR_RESOURCE);
- goto out;
- }
- n = ntohl(*p++);
- if (n <= 0)
- goto out;
-
- /* XXX: need to possibly return error in this case */
- if (n > NFS4_DEV_NOTIFY_MAXENTRIES) {
- dprintk("%s: Processing (%d) notifications out of (%d)\n",
- __func__, NFS4_DEV_NOTIFY_MAXENTRIES, n);
- n = NFS4_DEV_NOTIFY_MAXENTRIES;
- }
-
- /* Decode each dev notification */
- for (i = 0; i < n; i++) {
- struct cb_pnfs_devicenotifyitem *dev = &args->devs[i];
-
- p = read_buf(xdr, (4 * sizeof(uint32_t))
- + NFS4_PNFS_DEVICEID4_SIZE);
- if (unlikely(p == NULL)) {
- status = htonl(NFS4ERR_RESOURCE);
- goto out;
- }
-
- tmp = ntohl(*p++); /* bitmap size */
- if (tmp != 1) {
- status = htonl(NFS4ERR_INVAL);
- goto out;
- }
- dev->cbd_notify_type = ntohl(*p++);
- if (dev->cbd_notify_type != NOTIFY_DEVICEID4_CHANGE &&
- dev->cbd_notify_type != NOTIFY_DEVICEID4_DELETE) {
- status = htonl(NFS4ERR_INVAL);
- goto out;
- }
-
- tmp = ntohl(*p++); /* opaque size */
- if (((dev->cbd_notify_type == NOTIFY_DEVICEID4_CHANGE) &&
- (tmp != NFS4_PNFS_DEVICEID4_SIZE + 8)) ||
- ((dev->cbd_notify_type == NOTIFY_DEVICEID4_DELETE) &&
- (tmp != NFS4_PNFS_DEVICEID4_SIZE + 4))) {
- status = htonl(NFS4ERR_INVAL);
- goto out;
- }
- dev->cbd_layout_type = ntohl(*p++);
- memcpy(dev->cbd_dev_id.data, p, NFS4_PNFS_DEVICEID4_SIZE);
- p += XDR_QUADLEN(NFS4_PNFS_DEVICEID4_SIZE);
-
- if (dev->cbd_layout_type == NOTIFY_DEVICEID4_CHANGE) {
- p = read_buf(xdr, sizeof(uint32_t));
- if (unlikely(p == NULL)) {
- status = htonl(NFS4ERR_DELAY);
- goto out;
- }
- dev->cbd_immediate = ntohl(*p++);
- } else {
- dev->cbd_immediate = 0;
- }
-
- args->ndevs++;
-
- dprintk("%s: type %d layout 0x%x immediate %d\n",
- __func__, dev->cbd_notify_type, dev->cbd_layout_type,
- dev->cbd_immediate);
- }
-out:
- dprintk("%s: status %d ndevs %d\n",
- __func__, ntohl(status), args->ndevs);
- return status;
-}
-
static __be32 decode_sessionid(struct xdr_stream *xdr,
struct nfs4_sessionid *sid)
{
@@ -709,11 +621,11 @@ preprocess_nfs41_op(int nop, unsigned int op_nr, struct callback_op **op)
case OP_CB_RECALL_ANY:
case OP_CB_RECALL_SLOT:
case OP_CB_LAYOUTRECALL:
- case OP_CB_NOTIFY_DEVICEID:
*op = &callback_ops[op_nr];
break;
case OP_CB_NOTIFY:
+ case OP_CB_NOTIFY_DEVICEID:
case OP_CB_PUSH_DELEG:
case OP_CB_RECALLABLE_OBJ_AVAIL:
case OP_CB_WANTS_CANCELLED:
@@ -879,12 +791,6 @@ static struct callback_op callback_ops[] = {
(callback_decode_arg_t)decode_pnfs_layoutrecall_args,
.res_maxsize = CB_OP_LAYOUTRECALL_RES_MAXSZ,
},
- [OP_CB_NOTIFY_DEVICEID] = {
- .process_op = (callback_process_op_t)pnfs_cb_devicenotify,
- .decode_args =
- (callback_decode_arg_t)decode_pnfs_devicenotify_args,
- .res_maxsize = CB_OP_DEVICENOTIFY_RES_MAXSZ,
- },
[OP_CB_SEQUENCE] = {
.process_op = (callback_process_op_t)nfs4_callback_sequence,
.decode_args = (callback_decode_arg_t)decode_cb_sequence_args,
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index ae2f7ed..b2bec02 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -183,7 +183,6 @@ struct layoutdriver_io_operations {
*/
struct pnfs_mount_type * (*initialize_mountpoint) (struct super_block *, struct nfs_fh *fh);
int (*uninitialize_mountpoint) (struct pnfs_mount_type *mountid);
- int (*device_delete) (struct pnfs_mount_type *mountid, struct pnfs_deviceid *dev_id);
};
enum layoutdriver_policy_flags {
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 03/13] SQUASHME pnfs_submit: remove pnfs_mount_type from alloc_layout
2010-04-28 22:24 ` [PATCH 02/13] SQUASHME pnfs_submit: remove CB_NOTIFY_DEVICEID andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 04/13] SQUASHME pnfs_submit: remove get_blocksize policy operation andros
0 siblings, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
The pnfs_mount_type parameter is not used by any layout driver alloc_layout
function.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.c | 2 +-
fs/nfs/pnfs.c | 2 +-
include/linux/nfs4_pnfs.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 79b9df2..4a3f58a 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -334,7 +334,7 @@ filelayout_write_pagelist(struct pnfs_layout_type *layoutid,
* inode from now on.
*/
static void *
-filelayout_alloc_layout(struct pnfs_mount_type *mountid, struct inode *inode)
+filelayout_alloc_layout(struct inode *inode)
{
dprintk("NFS_FILELAYOUT: allocating layout\n");
return kzalloc(sizeof(struct nfs4_filelayout), GFP_KERNEL);
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index fbc04c3..e704dcf 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -864,7 +864,7 @@ alloc_init_layout(struct inode *ino)
io_ops = NFS_SERVER(ino)->pnfs_curr_ld->ld_io_ops;
lo = &NFS_I(ino)->layout;
- ld_data = io_ops->alloc_layout(NFS_SERVER(ino)->pnfs_mountid, ino);
+ ld_data = io_ops->alloc_layout(ino);
if (!ld_data) {
printk(KERN_ERR
"%s: out of memory: io_ops->alloc_layout failed\n",
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index b2bec02..be42370 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -162,7 +162,7 @@ struct layoutdriver_io_operations {
/* Layout information. For each inode, alloc_layout is executed once to retrieve an
* inode specific layout structure. Each subsequent layoutget operation results in
* a set_layout call to set the opaque layout in the layout driver.*/
- void * (*alloc_layout) (struct pnfs_mount_type *mountid, struct inode *inode);
+ void * (*alloc_layout) (struct inode *inode);
void (*free_layout) (void *layoutid);
struct pnfs_layout_segment * (*alloc_lseg) (struct pnfs_layout_type *layoutid, struct nfs4_pnfs_layoutget_res *lgr);
void (*free_lseg) (struct pnfs_layout_segment *lseg);
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 04/13] SQUASHME pnfs_submit: remove get_blocksize policy operation
2010-04-28 22:24 ` [PATCH 03/13] SQUASHME pnfs_submit: remove pnfs_mount_type from alloc_layout andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 05/13] SQUASHME pnfs_submit: remove ds_wsize, ds_rsize, ds_wpages and ds_rpages andros
0 siblings, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Not used by the file layout driver
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/pnfs.c | 41 ++++-------------------------------------
include/linux/nfs4_pnfs.h | 6 ------
2 files changed, 4 insertions(+), 43 deletions(-)
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index e704dcf..32bb852 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1607,46 +1607,13 @@ pnfs_use_write(struct inode *inode, ssize_t count)
return 1; /* use pNFS I/O */
}
-/* Return I/O buffer size for a layout driver
- * This value will determine what size reads and writes
- * will be gathered into and sent to the data servers.
- * blocksize must be a multiple of the page cache size.
- */
-unsigned int
-pnfs_getiosize(struct nfs_server *server)
-{
- struct pnfs_mount_type *mounttype;
- struct pnfs_layoutdriver_type *ld;
-
- mounttype = server->pnfs_mountid;
- ld = server->pnfs_curr_ld;
- if (!pnfs_enabled_sb(server) ||
- !mounttype ||
- !ld->ld_policy_ops ||
- !ld->ld_policy_ops->get_blocksize)
- return 0;
-
- return ld->ld_policy_ops->get_blocksize(mounttype);
-}
-
void
pnfs_set_ds_iosize(struct nfs_server *server)
{
- unsigned dssize = pnfs_getiosize(server);
-
- /* Set buffer size for data servers */
- if (dssize > 0) {
- server->ds_rsize = server->ds_wsize =
- nfs_block_size(dssize, NULL);
- server->ds_rpages = server->ds_wpages =
- (server->ds_rsize + PAGE_CACHE_SIZE - 1) >>
- PAGE_CACHE_SHIFT;
- } else {
- server->ds_wsize = server->wsize;
- server->ds_rsize = server->rsize;
- server->ds_rpages = server->rpages;
- server->ds_wpages = server->wpages;
- }
+ server->ds_wsize = server->wsize;
+ server->ds_rsize = server->rsize;
+ server->ds_rpages = server->rpages;
+ server->ds_wpages = server->wpages;
}
static int
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index be42370..f0eddbd 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -214,12 +214,6 @@ struct layoutdriver_policy_operations {
int (*do_flush)(struct pnfs_layout_segment *lseg, struct nfs_page *req,
struct pnfs_fsdata *fsdata);
- /* Retreive the block size of the file system. If gather_across_stripes == 1,
- * then the file system will gather requests into the block size.
- * TODO: Where will the layout driver get this info? It is hard coded in PVFS2.
- */
- ssize_t (*get_blocksize) (struct pnfs_mount_type *);
-
/* Read requests under this value are sent to the NFSv4 server */
ssize_t (*get_read_threshold) (struct pnfs_layout_type *, struct inode *);
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 05/13] SQUASHME pnfs_submit: remove ds_wsize, ds_rsize, ds_wpages and ds_rpages
2010-04-28 22:24 ` [PATCH 04/13] SQUASHME pnfs_submit: remove get_blocksize policy operation andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint andros
0 siblings, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
No layoutdriver uses ds_wpages or ds_rpages. The file layout driver does not
use ds_rsize nor ds_wsize - instead, rsize and wsize are used.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.c | 11 ++++++-----
fs/nfs/pnfs.c | 24 +++++-------------------
fs/nfs/pnfs.h | 6 +++---
fs/nfs/read.c | 2 +-
fs/nfs/super.c | 1 -
fs/nfs/write.c | 2 +-
include/linux/nfs_fs_sb.h | 7 -------
7 files changed, 16 insertions(+), 37 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 4a3f58a..9e81195 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -407,9 +407,10 @@ filelayout_check_layout(struct pnfs_layout_type *lo,
goto out;
}
- if (fl->stripe_unit % nfss->ds_rsize || fl->stripe_unit % nfss->ds_wsize) {
- dprintk("%s Stripe unit (%u) not aligned with rsize %u wsize %u\n",
- __func__, fl->stripe_unit, nfss->ds_rsize, nfss->ds_wsize);
+ if (fl->stripe_unit % nfss->rsize || fl->stripe_unit % nfss->wsize) {
+ dprintk("%s Stripe unit (%u) not aligned with rsize %u "
+ "wsize %u\n", __func__, fl->stripe_unit, nfss->rsize,
+ nfss->wsize);
}
/* reference the device */
@@ -740,9 +741,9 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
if (!pgio->pg_iswrite)
goto boundary;
- if (pgio->pg_bsize != NFS_SERVER(pgio->pg_inode)->ds_wsize &&
+ if (pgio->pg_bsize != NFS_SERVER(pgio->pg_inode)->wsize &&
pgio->pg_count > pgio->pg_threshold)
- pgio->pg_bsize = NFS_SERVER(pgio->pg_inode)->ds_wsize;
+ pgio->pg_bsize = NFS_SERVER(pgio->pg_inode)->wsize;
boundary:
if (pgio->pg_boundary == 0)
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 32bb852..83e8448 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1428,8 +1428,7 @@ void
pnfs_pageio_init_read(struct nfs_pageio_descriptor *pgio,
struct inode *inode,
struct nfs_open_context *ctx,
- struct list_head *pages,
- size_t *rsize)
+ struct list_head *pages)
{
struct nfs_server *nfss = NFS_SERVER(inode);
size_t count = 0;
@@ -1450,12 +1449,10 @@ pnfs_pageio_init_read(struct nfs_pageio_descriptor *pgio,
if (count > 0 && !below_threshold(inode, count, 0)) {
status = pnfs_update_layout(inode, ctx, count,
loff, IOMODE_READ, NULL);
- dprintk("%s *rsize %Zd virt update returned %d\n",
- __func__, *rsize, status);
+ dprintk("%s virt update returned %d\n", __func__, status);
if (status != 0)
return;
- *rsize = NFS_SERVER(inode)->ds_rsize;
pgio->pg_boundary = pnfs_getboundary(inode);
if (pgio->pg_boundary)
pnfs_set_pg_test(inode, pgio);
@@ -1463,8 +1460,7 @@ pnfs_pageio_init_read(struct nfs_pageio_descriptor *pgio,
}
void
-pnfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, struct inode *inode,
- size_t *wsize)
+pnfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, struct inode *inode)
{
struct nfs_server *server = NFS_SERVER(inode);
@@ -1478,7 +1474,6 @@ pnfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, struct inode *inode,
pgio->pg_threshold = pnfs_getthreshold(inode, 1);
pgio->pg_boundary = pnfs_getboundary(inode);
pnfs_set_pg_test(inode, pgio);
- *wsize = server->ds_wsize;
}
/* Retrieve I/O parameters for O_DIRECT.
@@ -1501,9 +1496,9 @@ _pnfs_direct_init_io(struct inode *inode, struct nfs_open_context *ctx,
return;
if (iswrite)
- rwsize = nfss->ds_wsize;
+ rwsize = nfss->wsize;
else
- rwsize = nfss->ds_rsize;
+ rwsize = nfss->rsize;
boundary = pnfs_getboundary(inode);
@@ -1607,15 +1602,6 @@ pnfs_use_write(struct inode *inode, ssize_t count)
return 1; /* use pNFS I/O */
}
-void
-pnfs_set_ds_iosize(struct nfs_server *server)
-{
- server->ds_wsize = server->wsize;
- server->ds_rsize = server->rsize;
- server->ds_rpages = server->rpages;
- server->ds_wpages = server->wpages;
-}
-
static int
pnfs_call_done(struct pnfs_call_data *pdata, struct rpc_task *task, void *data)
{
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 868c1ac..5745ee1 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -55,11 +55,11 @@ int pnfs_layoutcommit_inode(struct inode *inode, int sync);
void pnfs_update_last_write(struct nfs_inode *nfsi, loff_t offset, size_t extent);
void pnfs_need_layoutcommit(struct nfs_inode *nfsi, struct nfs_open_context *ctx);
unsigned int pnfs_getiosize(struct nfs_server *server);
-void pnfs_set_ds_iosize(struct nfs_server *server);
enum pnfs_try_status _pnfs_try_to_commit(struct nfs_write_data *,
const struct rpc_call_ops *, int);
-void pnfs_pageio_init_read(struct nfs_pageio_descriptor *, struct inode *, struct nfs_open_context *, struct list_head *, size_t *);
-void pnfs_pageio_init_write(struct nfs_pageio_descriptor *, struct inode *, size_t *wsize);
+void pnfs_pageio_init_read(struct nfs_pageio_descriptor *, struct inode *,
+ struct nfs_open_context *, struct list_head *);
+void pnfs_pageio_init_write(struct nfs_pageio_descriptor *, struct inode *);
void pnfs_update_layout_commit(struct inode *, struct list_head *, pgoff_t, unsigned int);
void pnfs_free_fsdata(struct pnfs_fsdata *fsdata);
ssize_t pnfs_file_write(struct file *, const char __user *, size_t, loff_t *);
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index fd8bac7..1d30336 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -663,7 +663,7 @@ int nfs_readpages(struct file *filp, struct address_space *mapping,
goto read_complete; /* all pages were read */
#ifdef CONFIG_NFS_V4_1
- pnfs_pageio_init_read(&pgio, inode, desc.ctx, pages, &rsize);
+ pnfs_pageio_init_read(&pgio, inode, desc.ctx, pages);
#endif /* CONFIG_NFS_V4_1 */
if (rsize < PAGE_CACHE_SIZE)
nfs_pageio_init(&pgio, inode, nfs_pagein_multi, rsize, 0);
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 38b13cd..a742846 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2590,7 +2590,6 @@ static void nfs4_init_pnfs(struct super_block *sb, struct nfs_fh *fh)
if (nfs4_has_session(clp) &&
(clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_MDS)) {
set_pnfs_layoutdriver(sb, fh, server->pnfs_fs_ltype);
- pnfs_set_ds_iosize(server);
}
#endif /* CONFIG_NFS_V4_1 */
}
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 9739b2a..7eb4f30 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -997,7 +997,7 @@ static void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio,
size_t wsize = NFS_SERVER(inode)->wsize;
#ifdef CONFIG_NFS_V4_1
- pnfs_pageio_init_write(pgio, inode, &wsize);
+ pnfs_pageio_init_write(pgio, inode);
#endif /* CONFIG_NFS_V4_1 */
if (wsize < PAGE_CACHE_SIZE)
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index ef2e18e..bb0aa9c 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -167,13 +167,6 @@ struct nfs_server {
struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */
struct pnfs_mount_type *pnfs_mountid; /* Mount identifier for
layout driver */
- /* Data server values will equal NFS server values if
- * no pNFS layout driver exists for the mountpoint
- */
- unsigned int ds_rsize; /* Data server read size */
- unsigned int ds_rpages; /* Data server read size (in pages) */
- unsigned int ds_wsize; /* Data server write size */
- unsigned int ds_wpages; /* Data server write size (in pages) */
#endif /* CONFIG_NFS_V4_1 */
void (*destroy)(struct nfs_server *);
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint
2010-04-28 22:24 ` [PATCH 05/13] SQUASHME pnfs_submit: remove ds_wsize, ds_rsize, ds_wpages and ds_rpages andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 07/13] SQUASHME pnfs_submit: remove struct pnfs_mount_type andros
2010-04-29 16:27 ` [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint Boaz Harrosh
0 siblings, 2 replies; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
The layoutdriver_io_operations uninitialize_mountpoint function is used
to free a layout driver specific device id cache.
The device id cache is now shared and moved to struct nfs_client and can be
removed in the generic unmount_pnfs_layoutdriver routine.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.c | 18 ------------------
fs/nfs/pnfs.c | 11 +++--------
include/linux/nfs4_pnfs.h | 1 -
3 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 9e81195..8d6f685 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -109,23 +109,6 @@ error_ret: ;
return NULL;
}
-/* Uninitialize a mountpoint by destroying its device list.
- */
-int
-filelayout_uninitialize_mountpoint(struct pnfs_mount_type *mountid)
-{
- struct filelayout_mount_type *fl_mt = NULL;
-
- dprintk("--> %s\n", __func__);
- if (mountid) {
- fl_mt = (struct filelayout_mount_type *)mountid->mountid;
- nfs4_put_deviceid_cache(NFS_SB(fl_mt->fl_sb)->nfs_client);
- kfree(fl_mt);
- kfree(mountid);
- }
- return 0;
-}
-
/* This function is used by the layout driver to calculate the
* offset of the file on the dserver based on whether the
* layout type is STRIPE_DENSE or STRIPE_SPARSE
@@ -782,7 +765,6 @@ struct layoutdriver_io_operations filelayout_io_operations = {
.alloc_lseg = filelayout_alloc_lseg,
.free_lseg = filelayout_free_lseg,
.initialize_mountpoint = filelayout_initialize_mountpoint,
- .uninitialize_mountpoint = filelayout_uninitialize_mountpoint,
};
struct layoutdriver_policy_operations filelayout_policy_operations = {
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 83e8448..0e03259 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -194,14 +194,9 @@ pnfs_update_last_write(struct nfs_inode *nfsi, loff_t offset, size_t extent)
void
unmount_pnfs_layoutdriver(struct super_block *sb)
{
- struct nfs_server *server = NFS_SB(sb);
- if (server->pnfs_curr_ld &&
- server->pnfs_curr_ld->ld_io_ops &&
- server->pnfs_curr_ld->ld_io_ops->uninitialize_mountpoint) {
- server->pnfs_curr_ld->ld_io_ops->uninitialize_mountpoint(
- server->pnfs_mountid);
- server->pnfs_mountid = NULL;
- }
+ if (NFS_SB(sb)->pnfs_curr_ld && NFS_SB(sb)->nfs_client->cl_devid_cache)
+ nfs4_put_deviceid_cache(NFS_SB(sb)->nfs_client);
+ NFS_SB(sb)->pnfs_curr_ld = NULL;
}
/*
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index f0eddbd..4fdf87e 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -182,7 +182,6 @@ struct layoutdriver_io_operations {
/* Registration information for a new mounted file system
*/
struct pnfs_mount_type * (*initialize_mountpoint) (struct super_block *, struct nfs_fh *fh);
- int (*uninitialize_mountpoint) (struct pnfs_mount_type *mountid);
};
enum layoutdriver_policy_flags {
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 07/13] SQUASHME pnfs_submit: remove struct pnfs_mount_type
2010-04-28 22:24 ` [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 08/13] SQUASHME pnfs_submit: change initialize_mountpoint parameters andros
2010-04-29 16:28 ` [PATCH 07/13] SQUASHME pnfs_submit: remove struct pnfs_mount_type Boaz Harrosh
2010-04-29 16:27 ` [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint Boaz Harrosh
1 sibling, 2 replies; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
The pnfs_mount_type structure was used to store per layout type device id
caches. It is no longer needed with the generic device id cache in struct
nfs_client.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.c | 40 +++++++---------------------------------
fs/nfs/pnfs.c | 8 ++------
include/linux/nfs4_pnfs.h | 15 +--------------
include/linux/nfs_fs_sb.h | 2 --
4 files changed, 10 insertions(+), 55 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 8d6f685..36a8fe1 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -68,45 +68,19 @@ struct pnfs_client_operations *pnfs_callback_ops;
ssize_t filelayout_get_stripesize(struct pnfs_layout_type *);
struct layoutdriver_io_operations filelayout_io_operations;
-/* Initialize and return the pnfs_mount_type structure so the
- * pNFS_client can refer to the mount point later on
- */
-struct pnfs_mount_type*
+int
filelayout_initialize_mountpoint(struct super_block *sb, struct nfs_fh *fh)
{
- struct filelayout_mount_type *fl_mt;
- struct pnfs_mount_type *mt;
-
- fl_mt = kmalloc(sizeof(struct filelayout_mount_type), GFP_KERNEL);
- if (!fl_mt)
- goto error_ret;
-
- mt = kmalloc(sizeof(struct pnfs_mount_type), GFP_KERNEL);
- if (!mt)
- goto cleanup_fl_mt;
-
- fl_mt->fl_sb = sb;
- mt->mountid = (void *)fl_mt;
if (nfs4_alloc_init_deviceid_cache(NFS_SB(sb)->nfs_client,
- nfs4_fl_free_deviceid_callback))
- goto cleanup_mt;
-
+ nfs4_fl_free_deviceid_callback)) {
+ printk(KERN_WARNING "%s: deviceid cache could not be "
+ "initialized\n", __func__);
+ return 0;
+ }
dprintk("%s: deviceid cache has been initialized successfully\n",
__func__);
- return mt;
-
-cleanup_mt: ;
- kfree(mt);
-
-cleanup_fl_mt: ;
- kfree(fl_mt);
-
-error_ret: ;
- printk(KERN_WARNING "%s: deviceid cache could not be initialized\n",
- __func__);
-
- return NULL;
+ return 1;
}
/* This function is used by the layout driver to calculate the
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 0e03259..3362ef5 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -207,16 +207,14 @@ void
set_pnfs_layoutdriver(struct super_block *sb, struct nfs_fh *fh, u32 id)
{
struct pnfs_module *mod;
- struct pnfs_mount_type *mt;
struct nfs_server *server = NFS_SB(sb);
if (server->pnfs_curr_ld)
return;
if (id > 0 && find_pnfs(id, &mod)) {
- mt = mod->pnfs_ld_type->ld_io_ops->initialize_mountpoint(
- sb, fh);
- if (!mt) {
+ if (!mod->pnfs_ld_type->ld_io_ops->initialize_mountpoint(
+ sb, fh)) {
printk(KERN_ERR "%s: Error initializing mount point "
"for layout driver %u. ", __func__, id);
goto out_err;
@@ -226,7 +224,6 @@ set_pnfs_layoutdriver(struct super_block *sb, struct nfs_fh *fh, u32 id)
* and has taken a reference on the nfs_client cl_devid_cache
*/
server->pnfs_curr_ld = mod->pnfs_ld_type;
- server->pnfs_mountid = mt;
server->nfs_client->rpc_ops = &pnfs_v4_clientops;
dprintk("%s: pNFS module for %u set\n", __func__, id);
return;
@@ -236,7 +233,6 @@ set_pnfs_layoutdriver(struct super_block *sb, struct nfs_fh *fh, u32 id)
out_err:
dprintk("Using NFSv4 I/O\n");
server->pnfs_curr_ld = NULL;
- server->pnfs_mountid = NULL;
return;
}
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index 4fdf87e..7ca8f85 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -30,13 +30,6 @@ struct pnfs_layoutdriver_type {
struct layoutdriver_policy_operations *ld_policy_ops;
};
-/* Layout driver specific identifier for a mount point. For each mountpoint
- * a reference is stored in the nfs_server structure.
- */
-struct pnfs_mount_type {
- void *mountid;
-};
-
struct pnfs_fsdata {
int ok_to_use_pnfs;
struct pnfs_layout_segment *lseg;
@@ -62,12 +55,6 @@ PNFS_NFS_SERVER(struct pnfs_layout_type *lo)
return NFS_SERVER(PNFS_INODE(lo));
}
-static inline struct pnfs_mount_type *
-PNFS_MOUNTID(struct pnfs_layout_type *lo)
-{
- return NFS_SERVER(PNFS_INODE(lo))->pnfs_mountid;
-}
-
static inline void *
PNFS_LD_DATA(struct pnfs_layout_type *lo)
{
@@ -181,7 +168,7 @@ struct layoutdriver_io_operations {
/* Registration information for a new mounted file system
*/
- struct pnfs_mount_type * (*initialize_mountpoint) (struct super_block *, struct nfs_fh *fh);
+ int (*initialize_mountpoint) (struct super_block *, struct nfs_fh *fh);
};
enum layoutdriver_policy_flags {
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index bb0aa9c..9b160d4 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -165,8 +165,6 @@ struct nfs_server {
#ifdef CONFIG_NFS_V4_1
u32 pnfs_fs_ltype;/* fs_layouttype attr */
struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */
- struct pnfs_mount_type *pnfs_mountid; /* Mount identifier for
- layout driver */
#endif /* CONFIG_NFS_V4_1 */
void (*destroy)(struct nfs_server *);
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 08/13] SQUASHME pnfs_submit: change initialize_mountpoint parameters
2010-04-28 22:24 ` [PATCH 07/13] SQUASHME pnfs_submit: remove struct pnfs_mount_type andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 09/13] SQUASHME pnfs_submit: change nfs_fsino layoutclass name andros
2010-04-29 16:28 ` [PATCH 07/13] SQUASHME pnfs_submit: remove struct pnfs_mount_type Boaz Harrosh
1 sibling, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
The layoutdriver_io_operation initalize_mountpoint is used to set up the
generic device id cache.
The super block and file handle parameters are unused except by the block
layout driver which uses them to call GETDEVICELIST.
A getdevicelist call will be added for the block layout driver.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.c | 4 ++--
fs/nfs/pnfs.c | 2 +-
fs/nfs/pnfs.h | 2 +-
include/linux/nfs4_pnfs.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 36a8fe1..80eb481 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -69,10 +69,10 @@ ssize_t filelayout_get_stripesize(struct pnfs_layout_type *);
struct layoutdriver_io_operations filelayout_io_operations;
int
-filelayout_initialize_mountpoint(struct super_block *sb, struct nfs_fh *fh)
+filelayout_initialize_mountpoint(struct nfs_client *clp)
{
- if (nfs4_alloc_init_deviceid_cache(NFS_SB(sb)->nfs_client,
+ if (nfs4_alloc_init_deviceid_cache(clp,
nfs4_fl_free_deviceid_callback)) {
printk(KERN_WARNING "%s: deviceid cache could not be "
"initialized\n", __func__);
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 3362ef5..5cf1aa7 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -214,7 +214,7 @@ set_pnfs_layoutdriver(struct super_block *sb, struct nfs_fh *fh, u32 id)
if (id > 0 && find_pnfs(id, &mod)) {
if (!mod->pnfs_ld_type->ld_io_ops->initialize_mountpoint(
- sb, fh)) {
+ server->nfs_client)) {
printk(KERN_ERR "%s: Error initializing mount point "
"for layout driver %u. ", __func__, id);
goto out_err;
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 5745ee1..b95886c 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -38,7 +38,7 @@ int pnfs_update_layout(struct inode *ino, struct nfs_open_context *ctx,
int _pnfs_return_layout(struct inode *, struct nfs4_pnfs_layout_segment *,
const nfs4_stateid *stateid, /* optional */
enum pnfs_layoutreturn_type);
-void set_pnfs_layoutdriver(struct super_block *sb, struct nfs_fh *fh, u32 id);
+void set_pnfs_layoutdriver(struct super_block *, struct nfs_fh *, u32 id);
void unmount_pnfs_layoutdriver(struct super_block *sb);
int pnfs_use_read(struct inode *inode, ssize_t count);
int pnfs_use_ds_io(struct list_head *, struct inode *, int);
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index 7ca8f85..46fec95 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -168,7 +168,7 @@ struct layoutdriver_io_operations {
/* Registration information for a new mounted file system
*/
- int (*initialize_mountpoint) (struct super_block *, struct nfs_fh *fh);
+ int (*initialize_mountpoint) (struct nfs_client *);
};
enum layoutdriver_policy_flags {
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 09/13] SQUASHME pnfs_submit: change nfs_fsino layoutclass name
2010-04-28 22:24 ` [PATCH 08/13] SQUASHME pnfs_submit: change initialize_mountpoint parameters andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 10/13] SQUASHME pnfs_submit: remove pnfs_fs_ltype andros
0 siblings, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/client.c | 2 +-
fs/nfs/nfs4xdr.c | 2 +-
include/linux/nfs_xdr.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 887d71e..004c5d3 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -903,7 +903,7 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo *
server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
#ifdef CONFIG_NFS_V4_1
/* Save the layout type for use during init of layout driver */
- server->pnfs_fs_ltype = fsinfo->layoutclass;
+ server->pnfs_fs_ltype = fsinfo->layouttype;
#endif /* CONFIG_NFS_V4_1 */
server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL);
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 7089284..e191488 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4277,7 +4277,7 @@ static int decode_fsinfo(struct xdr_stream *xdr, struct nfs_fsinfo *fsinfo)
goto xdr_error;
fsinfo->wtpref = fsinfo->wtmax;
#if defined(CONFIG_NFS_V4_1)
- status = decode_attr_pnfstype(xdr, bitmap, &fsinfo->layoutclass);
+ status = decode_attr_pnfstype(xdr, bitmap, &fsinfo->layouttype);
if (status)
goto xdr_error;
#endif /* CONFIG_NFS_V4_1 */
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index ea1b2f0..dee1c8c 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -114,7 +114,7 @@ struct nfs_fsinfo {
__u64 maxfilesize;
__u32 lease_time; /* in seconds */
#if defined(CONFIG_NFS_V4_1)
- __u32 layoutclass; /* supported pnfs layout driver */
+ __u32 layouttype; /* supported pnfs layout driver */
#endif
};
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 10/13] SQUASHME pnfs_submit: remove pnfs_fs_ltype
2010-04-28 22:24 ` [PATCH 09/13] SQUASHME pnfs_submit: change nfs_fsino layoutclass name andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 11/13] SQUASHME pnfs_submit: remove layout_name andros
0 siblings, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Set the pnfs_curr_ld pointer in nfs_probe_fsinfo. Use the pnfs_curr_ld
layout type.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/client.c | 20 ++++++++++++++++----
fs/nfs/pnfs.c | 3 +--
fs/nfs/pnfs.h | 2 +-
fs/nfs/super.c | 26 ++------------------------
include/linux/nfs_fs_sb.h | 1 -
5 files changed, 20 insertions(+), 32 deletions(-)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 004c5d3..87003e7 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -48,6 +48,7 @@
#include "iostat.h"
#include "internal.h"
#include "fscache.h"
+#include "pnfs.h"
#define NFSDBG_FACILITY NFSDBG_CLIENT
@@ -869,6 +870,20 @@ error:
}
/*
+ * Initialize the pNFS layout driver and setup pNFS related parameters
+ */
+static void nfs4_init_pnfs(struct nfs_server *server, struct nfs_fsinfo *fsinfo)
+{
+#if defined(CONFIG_NFS_V4_1)
+ struct nfs_client *clp = server->nfs_client;
+
+ if (nfs4_has_session(clp) &&
+ (clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_MDS))
+ set_pnfs_layoutdriver(server, fsinfo->layouttype);
+#endif /* CONFIG_NFS_V4_1 */
+}
+
+/*
* Load up the server record from information gained in an fsinfo record
*/
static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo *fsinfo)
@@ -901,10 +916,7 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo *
if (server->wsize > NFS_MAX_FILE_IO_SIZE)
server->wsize = NFS_MAX_FILE_IO_SIZE;
server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
-#ifdef CONFIG_NFS_V4_1
- /* Save the layout type for use during init of layout driver */
- server->pnfs_fs_ltype = fsinfo->layouttype;
-#endif /* CONFIG_NFS_V4_1 */
+ nfs4_init_pnfs(server, fsinfo);
server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL);
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 5cf1aa7..aab546f 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -204,10 +204,9 @@ unmount_pnfs_layoutdriver(struct super_block *sb)
* Only one pNFS layout driver is supported.
*/
void
-set_pnfs_layoutdriver(struct super_block *sb, struct nfs_fh *fh, u32 id)
+set_pnfs_layoutdriver(struct nfs_server *server, u32 id)
{
struct pnfs_module *mod;
- struct nfs_server *server = NFS_SB(sb);
if (server->pnfs_curr_ld)
return;
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index b95886c..308308f 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -38,7 +38,7 @@ int pnfs_update_layout(struct inode *ino, struct nfs_open_context *ctx,
int _pnfs_return_layout(struct inode *, struct nfs4_pnfs_layout_segment *,
const nfs4_stateid *stateid, /* optional */
enum pnfs_layoutreturn_type);
-void set_pnfs_layoutdriver(struct super_block *, struct nfs_fh *, u32 id);
+void set_pnfs_layoutdriver(struct nfs_server *, u32 id);
void unmount_pnfs_layoutdriver(struct super_block *sb);
int pnfs_use_read(struct inode *inode, ssize_t count);
int pnfs_use_ds_io(struct list_head *, struct inode *, int);
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index a742846..7cec8e5 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -678,13 +678,13 @@ char *layout_name(u32 layouttype)
void show_pnfs(struct seq_file *m, struct nfs_server *server)
{
- char *name = layout_name(server->pnfs_fs_ltype);
+ char *name = layout_name(server->pnfs_curr_ld->id);
seq_printf(m, ",pnfs=");
if (name)
seq_printf(m, "%s", name);
else
- seq_printf(m, "unknown(%d)", server->pnfs_fs_ltype);
+ seq_printf(m, "unknown(%d)", server->pnfs_curr_ld->id);
}
#else /* CONFIG_NFS_V4_1 */
void show_pnfs(struct seq_file *m, struct nfs_server *server) {}
@@ -2579,22 +2579,6 @@ out_no_address:
}
/*
- * Initialize the pNFS layout driver and setup pNFS related parameters
- */
-static void nfs4_init_pnfs(struct super_block *sb, struct nfs_fh *fh)
-{
-#if defined(CONFIG_NFS_V4_1)
- struct nfs_server *server = NFS_SB(sb);
- struct nfs_client *clp = server->nfs_client;
-
- if (nfs4_has_session(clp) &&
- (clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_MDS)) {
- set_pnfs_layoutdriver(sb, fh, server->pnfs_fs_ltype);
- }
-#endif /* CONFIG_NFS_V4_1 */
-}
-
-/*
* Get the superblock for the NFS4 root partition
*/
static int nfs4_remote_get_sb(struct file_system_type *fs_type,
@@ -2661,8 +2645,6 @@ static int nfs4_remote_get_sb(struct file_system_type *fs_type,
if (error)
goto error_splat_root;
- nfs4_init_pnfs(s, mntfh);
-
s->s_flags |= MS_ACTIVE;
mnt->mnt_sb = s;
mnt->mnt_root = mntroot;
@@ -2908,8 +2890,6 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags,
security_sb_clone_mnt_opts(data->sb, s);
- nfs4_init_pnfs(s, data->fh);
-
dprintk("<-- nfs4_xdev_get_sb() = 0\n");
return 0;
@@ -2995,8 +2975,6 @@ static int nfs4_remote_referral_get_sb(struct file_system_type *fs_type,
security_sb_clone_mnt_opts(data->sb, s);
- nfs4_init_pnfs(s, &mntfh);
-
dprintk("<-- nfs4_referral_get_sb() = 0\n");
return 0;
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 9b160d4..740aed1 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -163,7 +163,6 @@ struct nfs_server {
#endif
#ifdef CONFIG_NFS_V4_1
- u32 pnfs_fs_ltype;/* fs_layouttype attr */
struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */
#endif /* CONFIG_NFS_V4_1 */
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 11/13] SQUASHME pnfs_submit: remove layout_name
2010-04-28 22:24 ` [PATCH 10/13] SQUASHME pnfs_submit: remove pnfs_fs_ltype andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 12/13] SQUASHME pnfs_submit: fall back to MDS on filelayout_commit error andros
0 siblings, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Use the pnfs_curr_ld name field.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/super.c | 22 +++-------------------
1 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 7cec8e5..8366ad9 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -662,29 +662,13 @@ void show_sessions(struct seq_file *m, struct nfs_server *server) {}
#endif
#ifdef CONFIG_NFS_V4_1
-char *layout_name(u32 layouttype)
-{
- switch (layouttype) {
- case LAYOUT_NFSV4_FILES:
- return "files";
- case LAYOUT_OSD2_OBJECTS:
- return "objects";
- case LAYOUT_BLOCK_VOLUME:
- return "blocks";
- default:
- return NULL;
- }
-}
-
void show_pnfs(struct seq_file *m, struct nfs_server *server)
{
- char *name = layout_name(server->pnfs_curr_ld->id);
-
seq_printf(m, ",pnfs=");
- if (name)
- seq_printf(m, "%s", name);
+ if (server->pnfs_curr_ld)
+ seq_printf(m, "%s", server->pnfs_curr_ld->name);
else
- seq_printf(m, "unknown(%d)", server->pnfs_curr_ld->id);
+ seq_printf(m, "not configured");
}
#else /* CONFIG_NFS_V4_1 */
void show_pnfs(struct seq_file *m, struct nfs_server *server) {}
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 12/13] SQUASHME pnfs_submit: fall back to MDS on filelayout_commit error
2010-04-28 22:24 ` [PATCH 11/13] SQUASHME pnfs_submit: remove layout_name andros
@ 2010-04-28 22:24 ` andros
2010-04-28 22:24 ` [PATCH 13/13] SQUASHME pnfs_submit: cleanup nfs4_pnfs_ds_add andros
0 siblings, 1 reply; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 80eb481..dc762d9 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -563,6 +563,7 @@ filelayout_commit(struct pnfs_layout_type *layoutid, int sync,
loff_t file_offset, comp_offset;
size_t stripesz, cbytes;
int status;
+ enum pnfs_try_status trypnfs = PNFS_ATTEMPTED;
struct nfs4_file_layout_dsaddr *dsaddr;
u32 idx1, idx2;
@@ -662,11 +663,12 @@ out:
data->pdata.pnfs_error);
/* XXX should we send COMMIT to MDS e.g. not free data and return 1 ? */
- return PNFS_ATTEMPTED;
+ return trypnfs;
err_rewind:
/* put remaining pages back onto the original data->pages */
list_add(&data->pages, &head);
list_del_init(&head);
+ trypnfs = PNFS_NOT_ATTEMPTED;
goto out;
}
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 13/13] SQUASHME pnfs_submit: cleanup nfs4_pnfs_ds_add
2010-04-28 22:24 ` [PATCH 12/13] SQUASHME pnfs_submit: fall back to MDS on filelayout_commit error andros
@ 2010-04-28 22:24 ` andros
0 siblings, 0 replies; 20+ messages in thread
From: andros @ 2010-04-28 22:24 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Only initialize struct nfs4_pnfs_ds_add when using it.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayoutdev.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index 61a3381..8bd2544 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -273,31 +273,29 @@ nfs4_pnfs_ds_add(struct inode *inode, struct nfs4_pnfs_ds **dsp,
if (!ds)
return;
- /* Initialize ds */
- ds->ds_ip_addr = ip_addr;
- ds->ds_port = port;
- strncpy(ds->r_addr, r_addr, len);
- atomic_set(&ds->ds_count, 1);
- INIT_LIST_HEAD(&ds->ds_node);
- ds->ds_clp = NULL;
-
spin_lock(&nfs4_ds_cache_lock);
tmp_ds = _data_server_lookup(ip_addr, port);
if (tmp_ds == NULL) {
- dprintk("%s add new data server ip 0x%x\n", __func__,
- ds->ds_ip_addr);
+ ds->ds_ip_addr = ip_addr;
+ ds->ds_port = port;
+ strncpy(ds->r_addr, r_addr, len);
+ atomic_set(&ds->ds_count, 1);
+ INIT_LIST_HEAD(&ds->ds_node);
+ ds->ds_clp = NULL;
list_add(&ds->ds_node, &nfs4_data_server_cache);
*dsp = ds;
+ dprintk("%s add new data server ip 0x%x\n", __func__,
+ ds->ds_ip_addr);
+ spin_unlock(&nfs4_ds_cache_lock);
} else {
atomic_inc(&tmp_ds->ds_count);
+ *dsp = tmp_ds;
dprintk("%s data server found ip 0x%x, inc'ed ds_count to %d\n",
__func__, tmp_ds->ds_ip_addr,
atomic_read(&tmp_ds->ds_count));
- *dsp = tmp_ds;
+ spin_unlock(&nfs4_ds_cache_lock);
+ kfree(ds);
}
- spin_unlock(&nfs4_ds_cache_lock);
- if (tmp_ds != NULL)
- destroy_ds(ds);
}
static struct nfs4_pnfs_ds *
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint
2010-04-28 22:24 ` [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint andros
2010-04-28 22:24 ` [PATCH 07/13] SQUASHME pnfs_submit: remove struct pnfs_mount_type andros
@ 2010-04-29 16:27 ` Boaz Harrosh
2010-04-29 17:03 ` Boaz Harrosh
1 sibling, 1 reply; 20+ messages in thread
From: Boaz Harrosh @ 2010-04-29 16:27 UTC (permalink / raw)
To: andros; +Cc: bhalevy, linux-nfs
On 04/29/2010 01:24 AM, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
>
> The layoutdriver_io_operations uninitialize_mountpoint function is used
> to free a layout driver specific device id cache.
> The device id cache is now shared and moved to struct nfs_client and can be
> removed in the generic unmount_pnfs_layoutdriver routine.
>
> Signed-off-by: Andy Adamson <andros@netapp.com>
What ? no.
uninitialize_mountpoint is where the mountid private data is deallocated.
The one that was allocated at initialize_mountpoint.
Files layout might not currently have any, but we do and it will has well.
Any way what kind of API has initialize call and not an uninitialize call
Even if it's empty
NACK
> ---
> fs/nfs/nfs4filelayout.c | 18 ------------------
> fs/nfs/pnfs.c | 11 +++--------
> include/linux/nfs4_pnfs.h | 1 -
> 3 files changed, 3 insertions(+), 27 deletions(-)
>
> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
> index 9e81195..8d6f685 100644
> --- a/fs/nfs/nfs4filelayout.c
> +++ b/fs/nfs/nfs4filelayout.c
> @@ -109,23 +109,6 @@ error_ret: ;
> return NULL;
> }
>
> -/* Uninitialize a mountpoint by destroying its device list.
> - */
> -int
> -filelayout_uninitialize_mountpoint(struct pnfs_mount_type *mountid)
> -{
> - struct filelayout_mount_type *fl_mt = NULL;
> -
> - dprintk("--> %s\n", __func__);
> - if (mountid) {
> - fl_mt = (struct filelayout_mount_type *)mountid->mountid;
> - nfs4_put_deviceid_cache(NFS_SB(fl_mt->fl_sb)->nfs_client);
> - kfree(fl_mt);
> - kfree(mountid);
> - }
> - return 0;
> -}
> -
> /* This function is used by the layout driver to calculate the
> * offset of the file on the dserver based on whether the
> * layout type is STRIPE_DENSE or STRIPE_SPARSE
> @@ -782,7 +765,6 @@ struct layoutdriver_io_operations filelayout_io_operations = {
> .alloc_lseg = filelayout_alloc_lseg,
> .free_lseg = filelayout_free_lseg,
> .initialize_mountpoint = filelayout_initialize_mountpoint,
> - .uninitialize_mountpoint = filelayout_uninitialize_mountpoint,
> };
>
> struct layoutdriver_policy_operations filelayout_policy_operations = {
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index 83e8448..0e03259 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -194,14 +194,9 @@ pnfs_update_last_write(struct nfs_inode *nfsi, loff_t offset, size_t extent)
> void
> unmount_pnfs_layoutdriver(struct super_block *sb)
> {
> - struct nfs_server *server = NFS_SB(sb);
> - if (server->pnfs_curr_ld &&
> - server->pnfs_curr_ld->ld_io_ops &&
> - server->pnfs_curr_ld->ld_io_ops->uninitialize_mountpoint) {
> - server->pnfs_curr_ld->ld_io_ops->uninitialize_mountpoint(
> - server->pnfs_mountid);
> - server->pnfs_mountid = NULL;
> - }
> + if (NFS_SB(sb)->pnfs_curr_ld && NFS_SB(sb)->nfs_client->cl_devid_cache)
> + nfs4_put_deviceid_cache(NFS_SB(sb)->nfs_client);
> + NFS_SB(sb)->pnfs_curr_ld = NULL;
> }
>
> /*
> diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
> index f0eddbd..4fdf87e 100644
> --- a/include/linux/nfs4_pnfs.h
> +++ b/include/linux/nfs4_pnfs.h
> @@ -182,7 +182,6 @@ struct layoutdriver_io_operations {
> /* Registration information for a new mounted file system
> */
> struct pnfs_mount_type * (*initialize_mountpoint) (struct super_block *, struct nfs_fh *fh);
> - int (*uninitialize_mountpoint) (struct pnfs_mount_type *mountid);
> };
>
> enum layoutdriver_policy_flags {
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 07/13] SQUASHME pnfs_submit: remove struct pnfs_mount_type
2010-04-28 22:24 ` [PATCH 07/13] SQUASHME pnfs_submit: remove struct pnfs_mount_type andros
2010-04-28 22:24 ` [PATCH 08/13] SQUASHME pnfs_submit: change initialize_mountpoint parameters andros
@ 2010-04-29 16:28 ` Boaz Harrosh
1 sibling, 0 replies; 20+ messages in thread
From: Boaz Harrosh @ 2010-04-29 16:28 UTC (permalink / raw)
To: andros; +Cc: bhalevy, linux-nfs
On 04/29/2010 01:24 AM, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
>
> The pnfs_mount_type structure was used to store per layout type device id
> caches. It is no longer needed with the generic device id cache in struct
> nfs_client.
>
Same here NACK
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
> fs/nfs/nfs4filelayout.c | 40 +++++++---------------------------------
> fs/nfs/pnfs.c | 8 ++------
> include/linux/nfs4_pnfs.h | 15 +--------------
> include/linux/nfs_fs_sb.h | 2 --
> 4 files changed, 10 insertions(+), 55 deletions(-)
>
> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
> index 8d6f685..36a8fe1 100644
> --- a/fs/nfs/nfs4filelayout.c
> +++ b/fs/nfs/nfs4filelayout.c
> @@ -68,45 +68,19 @@ struct pnfs_client_operations *pnfs_callback_ops;
> ssize_t filelayout_get_stripesize(struct pnfs_layout_type *);
> struct layoutdriver_io_operations filelayout_io_operations;
>
> -/* Initialize and return the pnfs_mount_type structure so the
> - * pNFS_client can refer to the mount point later on
> - */
> -struct pnfs_mount_type*
> +int
> filelayout_initialize_mountpoint(struct super_block *sb, struct nfs_fh *fh)
> {
> - struct filelayout_mount_type *fl_mt;
> - struct pnfs_mount_type *mt;
> -
> - fl_mt = kmalloc(sizeof(struct filelayout_mount_type), GFP_KERNEL);
> - if (!fl_mt)
> - goto error_ret;
> -
> - mt = kmalloc(sizeof(struct pnfs_mount_type), GFP_KERNEL);
> - if (!mt)
> - goto cleanup_fl_mt;
> -
> - fl_mt->fl_sb = sb;
> - mt->mountid = (void *)fl_mt;
>
> if (nfs4_alloc_init_deviceid_cache(NFS_SB(sb)->nfs_client,
> - nfs4_fl_free_deviceid_callback))
> - goto cleanup_mt;
> -
> + nfs4_fl_free_deviceid_callback)) {
> + printk(KERN_WARNING "%s: deviceid cache could not be "
> + "initialized\n", __func__);
> + return 0;
> + }
> dprintk("%s: deviceid cache has been initialized successfully\n",
> __func__);
> - return mt;
> -
> -cleanup_mt: ;
> - kfree(mt);
> -
> -cleanup_fl_mt: ;
> - kfree(fl_mt);
> -
> -error_ret: ;
> - printk(KERN_WARNING "%s: deviceid cache could not be initialized\n",
> - __func__);
> -
> - return NULL;
> + return 1;
> }
>
> /* This function is used by the layout driver to calculate the
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index 0e03259..3362ef5 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -207,16 +207,14 @@ void
> set_pnfs_layoutdriver(struct super_block *sb, struct nfs_fh *fh, u32 id)
> {
> struct pnfs_module *mod;
> - struct pnfs_mount_type *mt;
> struct nfs_server *server = NFS_SB(sb);
>
> if (server->pnfs_curr_ld)
> return;
>
> if (id > 0 && find_pnfs(id, &mod)) {
> - mt = mod->pnfs_ld_type->ld_io_ops->initialize_mountpoint(
> - sb, fh);
> - if (!mt) {
> + if (!mod->pnfs_ld_type->ld_io_ops->initialize_mountpoint(
> + sb, fh)) {
> printk(KERN_ERR "%s: Error initializing mount point "
> "for layout driver %u. ", __func__, id);
> goto out_err;
> @@ -226,7 +224,6 @@ set_pnfs_layoutdriver(struct super_block *sb, struct nfs_fh *fh, u32 id)
> * and has taken a reference on the nfs_client cl_devid_cache
> */
> server->pnfs_curr_ld = mod->pnfs_ld_type;
> - server->pnfs_mountid = mt;
> server->nfs_client->rpc_ops = &pnfs_v4_clientops;
> dprintk("%s: pNFS module for %u set\n", __func__, id);
> return;
> @@ -236,7 +233,6 @@ set_pnfs_layoutdriver(struct super_block *sb, struct nfs_fh *fh, u32 id)
> out_err:
> dprintk("Using NFSv4 I/O\n");
> server->pnfs_curr_ld = NULL;
> - server->pnfs_mountid = NULL;
> return;
> }
>
> diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
> index 4fdf87e..7ca8f85 100644
> --- a/include/linux/nfs4_pnfs.h
> +++ b/include/linux/nfs4_pnfs.h
> @@ -30,13 +30,6 @@ struct pnfs_layoutdriver_type {
> struct layoutdriver_policy_operations *ld_policy_ops;
> };
>
> -/* Layout driver specific identifier for a mount point. For each mountpoint
> - * a reference is stored in the nfs_server structure.
> - */
> -struct pnfs_mount_type {
> - void *mountid;
> -};
> -
> struct pnfs_fsdata {
> int ok_to_use_pnfs;
> struct pnfs_layout_segment *lseg;
> @@ -62,12 +55,6 @@ PNFS_NFS_SERVER(struct pnfs_layout_type *lo)
> return NFS_SERVER(PNFS_INODE(lo));
> }
>
> -static inline struct pnfs_mount_type *
> -PNFS_MOUNTID(struct pnfs_layout_type *lo)
> -{
> - return NFS_SERVER(PNFS_INODE(lo))->pnfs_mountid;
> -}
> -
> static inline void *
> PNFS_LD_DATA(struct pnfs_layout_type *lo)
> {
> @@ -181,7 +168,7 @@ struct layoutdriver_io_operations {
>
> /* Registration information for a new mounted file system
> */
> - struct pnfs_mount_type * (*initialize_mountpoint) (struct super_block *, struct nfs_fh *fh);
> + int (*initialize_mountpoint) (struct super_block *, struct nfs_fh *fh);
> };
>
> enum layoutdriver_policy_flags {
> diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
> index bb0aa9c..9b160d4 100644
> --- a/include/linux/nfs_fs_sb.h
> +++ b/include/linux/nfs_fs_sb.h
> @@ -165,8 +165,6 @@ struct nfs_server {
> #ifdef CONFIG_NFS_V4_1
> u32 pnfs_fs_ltype;/* fs_layouttype attr */
> struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */
> - struct pnfs_mount_type *pnfs_mountid; /* Mount identifier for
> - layout driver */
> #endif /* CONFIG_NFS_V4_1 */
>
> void (*destroy)(struct nfs_server *);
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint
2010-04-29 16:27 ` [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint Boaz Harrosh
@ 2010-04-29 17:03 ` Boaz Harrosh
2010-04-29 17:14 ` Andy Adamson
0 siblings, 1 reply; 20+ messages in thread
From: Boaz Harrosh @ 2010-04-29 17:03 UTC (permalink / raw)
To: andros; +Cc: bhalevy, linux-nfs
On 04/29/2010 07:27 PM, Boaz Harrosh wrote:
> On 04/29/2010 01:24 AM, andros@netapp.com wrote:
>> From: Andy Adamson <andros@netapp.com>
>>
>> The layoutdriver_io_operations uninitialize_mountpoint function is used
>> to free a layout driver specific device id cache.
>> The device id cache is now shared and moved to struct nfs_client and can be
>> removed in the generic unmount_pnfs_layoutdriver routine.
>>
>> Signed-off-by: Andy Adamson <andros@netapp.com>
>
> What ? no.
>
> uninitialize_mountpoint is where the mountid private data is deallocated.
> The one that was allocated at initialize_mountpoint.
>
> Files layout might not currently have any, but we do and it will has well.
> Any way what kind of API has initialize call and not an uninitialize call
> Even if it's empty
>
> NACK
>
You are right that currently it's only device cache things. But I have code in
Q that have a page pool cache for RAID5/6 IO, and other initialization I need.
Please keep the initialize and a symmetric uninitialize and keep some private
data for each sb. It does not cost any thing. You could get rid of the double
indirection though.
Thanks
Boaz
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint
2010-04-29 17:03 ` Boaz Harrosh
@ 2010-04-29 17:14 ` Andy Adamson
2010-04-29 17:15 ` Boaz Harrosh
0 siblings, 1 reply; 20+ messages in thread
From: Andy Adamson @ 2010-04-29 17:14 UTC (permalink / raw)
To: Boaz Harrosh; +Cc: bhalevy, linux-nfs
On Apr 29, 2010, at 1:03 PM, Boaz Harrosh wrote:
> On 04/29/2010 07:27 PM, Boaz Harrosh wrote:
>> On 04/29/2010 01:24 AM, andros@netapp.com wrote:
>>> From: Andy Adamson <andros@netapp.com>
>>>
>>> The layoutdriver_io_operations uninitialize_mountpoint function is
>>> used
>>> to free a layout driver specific device id cache.
>>> The device id cache is now shared and moved to struct nfs_client
>>> and can be
>>> removed in the generic unmount_pnfs_layoutdriver routine.
>>>
>>> Signed-off-by: Andy Adamson <andros@netapp.com>
>>
>> What ? no.
>>
>> uninitialize_mountpoint is where the mountid private data is
>> deallocated.
>> The one that was allocated at initialize_mountpoint.
>>
>> Files layout might not currently have any, but we do and it will
>> has well.
>> Any way what kind of API has initialize call and not an
>> uninitialize call
>> Even if it's empty
>>
>> NACK
>>
>
> You are right that currently it's only device cache things. But I
> have code in
> Q that have a page pool cache for RAID5/6 IO, and other
> initialization I need.
>
> Please keep the initialize and a symmetric uninitialize and keep
> some private
> data for each sb. It does not cost any thing. You could get rid of
> the double
> indirection though.
OK. I'll keep the uninitialize_mountpoint. A private data pointer will
be put back in the object layout driver submission. I will provide the
patches.
-->Andy
>
> Thanks
> Boaz
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint
2010-04-29 17:14 ` Andy Adamson
@ 2010-04-29 17:15 ` Boaz Harrosh
0 siblings, 0 replies; 20+ messages in thread
From: Boaz Harrosh @ 2010-04-29 17:15 UTC (permalink / raw)
To: Andy Adamson; +Cc: bhalevy, linux-nfs
On 04/29/2010 08:14 PM, Andy Adamson wrote:
>
> On Apr 29, 2010, at 1:03 PM, Boaz Harrosh wrote:
>
>> On 04/29/2010 07:27 PM, Boaz Harrosh wrote:
>>> On 04/29/2010 01:24 AM, andros@netapp.com wrote:
>>>> From: Andy Adamson <andros@netapp.com>
>>>>
>>>> The layoutdriver_io_operations uninitialize_mountpoint function is
>>>> used
>>>> to free a layout driver specific device id cache.
>>>> The device id cache is now shared and moved to struct nfs_client
>>>> and can be
>>>> removed in the generic unmount_pnfs_layoutdriver routine.
>>>>
>>>> Signed-off-by: Andy Adamson <andros@netapp.com>
>>>
>>> What ? no.
>>>
>>> uninitialize_mountpoint is where the mountid private data is
>>> deallocated.
>>> The one that was allocated at initialize_mountpoint.
>>>
>>> Files layout might not currently have any, but we do and it will
>>> has well.
>>> Any way what kind of API has initialize call and not an
>>> uninitialize call
>>> Even if it's empty
>>>
>>> NACK
>>>
>>
>> You are right that currently it's only device cache things. But I
>> have code in
>> Q that have a page pool cache for RAID5/6 IO, and other
>> initialization I need.
>>
>> Please keep the initialize and a symmetric uninitialize and keep
>> some private
>> data for each sb. It does not cost any thing. You could get rid of
>> the double
>> indirection though.
>
> OK. I'll keep the uninitialize_mountpoint. A private data pointer will
> be put back in the object layout driver submission. I will provide the
> patches.
>
> -->Andy
>
>>
>> Thanks
>> Boaz
>
Thanks
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 03/13] SQUASHME pnfs_submit: remove pnfs_mount_type from alloc_layout
2010-04-29 20:34 ` [PATCH 02/13] SQUASHME pnfs_submit: remove CB_NOTIFY_DEVICEID andros
@ 2010-04-29 20:34 ` andros
0 siblings, 0 replies; 20+ messages in thread
From: andros @ 2010-04-29 20:34 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
The pnfs_mount_type parameter is not used by any layout driver alloc_layout
function.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.c | 2 +-
fs/nfs/pnfs.c | 2 +-
include/linux/nfs4_pnfs.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 79b9df2..4a3f58a 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -334,7 +334,7 @@ filelayout_write_pagelist(struct pnfs_layout_type *layoutid,
* inode from now on.
*/
static void *
-filelayout_alloc_layout(struct pnfs_mount_type *mountid, struct inode *inode)
+filelayout_alloc_layout(struct inode *inode)
{
dprintk("NFS_FILELAYOUT: allocating layout\n");
return kzalloc(sizeof(struct nfs4_filelayout), GFP_KERNEL);
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 50858c8..f6181bd 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -864,7 +864,7 @@ alloc_init_layout(struct inode *ino)
io_ops = NFS_SERVER(ino)->pnfs_curr_ld->ld_io_ops;
lo = &NFS_I(ino)->layout;
- ld_data = io_ops->alloc_layout(NFS_SERVER(ino)->pnfs_mountid, ino);
+ ld_data = io_ops->alloc_layout(ino);
if (!ld_data) {
printk(KERN_ERR
"%s: out of memory: io_ops->alloc_layout failed\n",
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index b2bec02..be42370 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -162,7 +162,7 @@ struct layoutdriver_io_operations {
/* Layout information. For each inode, alloc_layout is executed once to retrieve an
* inode specific layout structure. Each subsequent layoutget operation results in
* a set_layout call to set the opaque layout in the layout driver.*/
- void * (*alloc_layout) (struct pnfs_mount_type *mountid, struct inode *inode);
+ void * (*alloc_layout) (struct inode *inode);
void (*free_layout) (void *layoutid);
struct pnfs_layout_segment * (*alloc_lseg) (struct pnfs_layout_type *layoutid, struct nfs4_pnfs_layoutget_res *lgr);
void (*free_lseg) (struct pnfs_layout_segment *lseg);
--
1.6.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
end of thread, other threads:[~2010-04-30 18:27 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-28 22:24 [PATCH 0/13] Remove non-file layout code from submit tree andros
2010-04-28 22:24 ` [PATCH 01/13] SQUASHME pnfs_submit: remove GETDEVICELIST andros
2010-04-28 22:24 ` [PATCH 02/13] SQUASHME pnfs_submit: remove CB_NOTIFY_DEVICEID andros
2010-04-28 22:24 ` [PATCH 03/13] SQUASHME pnfs_submit: remove pnfs_mount_type from alloc_layout andros
2010-04-28 22:24 ` [PATCH 04/13] SQUASHME pnfs_submit: remove get_blocksize policy operation andros
2010-04-28 22:24 ` [PATCH 05/13] SQUASHME pnfs_submit: remove ds_wsize, ds_rsize, ds_wpages and ds_rpages andros
2010-04-28 22:24 ` [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint andros
2010-04-28 22:24 ` [PATCH 07/13] SQUASHME pnfs_submit: remove struct pnfs_mount_type andros
2010-04-28 22:24 ` [PATCH 08/13] SQUASHME pnfs_submit: change initialize_mountpoint parameters andros
2010-04-28 22:24 ` [PATCH 09/13] SQUASHME pnfs_submit: change nfs_fsino layoutclass name andros
2010-04-28 22:24 ` [PATCH 10/13] SQUASHME pnfs_submit: remove pnfs_fs_ltype andros
2010-04-28 22:24 ` [PATCH 11/13] SQUASHME pnfs_submit: remove layout_name andros
2010-04-28 22:24 ` [PATCH 12/13] SQUASHME pnfs_submit: fall back to MDS on filelayout_commit error andros
2010-04-28 22:24 ` [PATCH 13/13] SQUASHME pnfs_submit: cleanup nfs4_pnfs_ds_add andros
2010-04-29 16:28 ` [PATCH 07/13] SQUASHME pnfs_submit: remove struct pnfs_mount_type Boaz Harrosh
2010-04-29 16:27 ` [PATCH 06/13] SQUASHME pnfs_submit: remove uninitialize_mountpoint Boaz Harrosh
2010-04-29 17:03 ` Boaz Harrosh
2010-04-29 17:14 ` Andy Adamson
2010-04-29 17:15 ` Boaz Harrosh
-- strict thread matches above, loose matches on Subject: below --
2010-04-29 20:34 [PATCH 0/13] Remove non-file layout code from submit tree version 2 andros
2010-04-29 20:34 ` [PATCH 01/13] SQUASHME pnfs_submit: remove GETDEVICELIST andros
2010-04-29 20:34 ` [PATCH 02/13] SQUASHME pnfs_submit: remove CB_NOTIFY_DEVICEID andros
2010-04-29 20:34 ` [PATCH 03/13] SQUASHME pnfs_submit: remove pnfs_mount_type from alloc_layout andros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).