linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pnfs git tree status pnfs-all-2.6.36-rc3-2010-08-30
@ 2010-08-30 16:34 Benny Halevy
  2010-08-30 16:43 ` [PATCH 1/2] SQUASHME: pnfs-submit: do not use NIPQUAD in nfs4_callback_layoutrecall dprintk Benny Halevy
                   ` (4 more replies)
  0 siblings, 5 replies; 58+ messages in thread
From: Benny Halevy @ 2010-08-30 16:34 UTC (permalink / raw)
  To: NFS list

This is the first rebased version of the tree over 2.6.36-rc*.
The tree's branches are structured the same (see details below).

Cumulative patches can be generated from
git://linux-nfs.org/~bhalevy/linux-pnfs.git
using
git diff v2.6.36-rc3 pnfs-all-2.6.36-rc3-2010-08-30
git diff v2.6.35 pnfs-all-2.6.35-2010-08-24

Or, they can be downloaded from the wiki at:
http://wiki.linux-nfs.org/wiki/index.php/PNFS_Development_Git_tree

Latest patches (since pnfs-all-2.6.35-2010-08-24):
pnfs-submit:
  Benny Halevy     32fb90a SQUASHME: pnfs-submit: do not use NIPQUAD in nfs4_callback_layoutrecall dprintk
  Benny Halevy     133b759 SQUASHME: pnfs-submit: get machince creds for getdeviceinfo

pnfs:
  Benny Halevy     247fe09 SQUASHME: pnfs: get machince creds for getdevicelist

pnfs-obj-all:
  Benny Halevy     c384327 SQUASHME: pnfs-obj use REQ flags rather than BIO flags

The full tree structure is:
master (v2.6.36-rc3)
	nfsd-upstream
		nfsd41-all
			nfs-upstream
				nfs41-all
					nfs41-all-latest
					pnfs-submit
						pnfs
							pnfs-block
					pnfsd-files
						pnfsd
							spnfs
								spnfs-block
							pnfsd-lexp
								pnfs-submit-all
									pnfs-all
										pnfs-obj-all
											pnfs-exofs-all
												pnfs-block-all
													spnfs-all
														spnfs-block-all
															pnfs-all-latest

Benny

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/2] SQUASHME: pnfs-submit: do not use NIPQUAD in nfs4_callback_layoutrecall dprintk
  2010-08-30 16:34 pnfs git tree status pnfs-all-2.6.36-rc3-2010-08-30 Benny Halevy
@ 2010-08-30 16:43 ` Benny Halevy
  2010-08-30 16:43 ` [PATCH 2/2] SQUASHME: pnfs-submit: get machince creds for getdeviceinfo Benny Halevy
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-08-30 16:43 UTC (permalink / raw)
  To: linux-nfs; +Cc: Benny Halevy

Not available in 2.6.26

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/callback_proc.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 6107b2e..09991d2 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -362,11 +362,8 @@ __be32 nfs4_callback_layoutrecall(struct cb_layoutrecallargs *args,
 
 	res = cpu_to_be32(NFS4ERR_OP_NOT_IN_SESSION);
 	clp  = nfs_find_client(args->cbl_addr, 4);
-	if (clp == NULL) {
-		dprintk("%s: no client for addr %u.%u.%u.%u\n",
-			__func__, NIPQUAD(args->cbl_addr));
+	if (clp == NULL)
 		goto out;
-	}
 
 	res = cpu_to_be32(NFS4ERR_NOMATCHING_LAYOUT);
 	do {
-- 
1.7.2.2


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 2/2] SQUASHME: pnfs-submit: get machince creds for getdeviceinfo
  2010-08-30 16:34 pnfs git tree status pnfs-all-2.6.36-rc3-2010-08-30 Benny Halevy
  2010-08-30 16:43 ` [PATCH 1/2] SQUASHME: pnfs-submit: do not use NIPQUAD in nfs4_callback_layoutrecall dprintk Benny Halevy
@ 2010-08-30 16:43 ` Benny Halevy
  2010-08-30 16:44 ` [PATCH 3/3] SQUASHME: pnfs: get machince creds for getdevicelist Benny Halevy
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-08-30 16:43 UTC (permalink / raw)
  To: linux-nfs; +Cc: Benny Halevy

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/nfs4_fs.h  |   13 ++++++++++++-
 fs/nfs/nfs4proc.c |    2 ++
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 9743326..ced4a20 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -303,13 +303,24 @@ extern void nfs4_kill_renewd(struct nfs_client *);
 extern void nfs4_renew_state(struct work_struct *);
 
 /* nfs4state.c */
+struct rpc_cred *nfs4_get_machine_cred_locked(struct nfs_client *clp);
 struct rpc_cred *nfs4_get_setclientid_cred(struct nfs_client *clp);
 struct rpc_cred *nfs4_get_renew_cred_locked(struct nfs_client *clp);
 #if defined(CONFIG_NFS_V4_1)
-struct rpc_cred *nfs4_get_machine_cred_locked(struct nfs_client *clp);
 struct rpc_cred *nfs4_get_exchange_id_cred(struct nfs_client *clp);
 #endif /* CONFIG_NFS_V4_1 */
 
+static inline struct rpc_cred *
+nfs4_get_machine_cred(struct nfs_client *clp)
+{
+	struct rpc_cred *cred;
+
+	spin_lock(&clp->cl_lock);
+	cred = nfs4_get_machine_cred_locked(clp);
+	spin_unlock(&clp->cl_lock);
+	return cred;
+}
+
 extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *);
 extern void nfs4_put_state_owner(struct nfs4_state_owner *);
 extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state_owner *);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 78717a7..33c4057 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5824,11 +5824,13 @@ int nfs4_proc_getdeviceinfo(struct nfs_server *server, struct pnfs_device *pdev)
 		.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_GETDEVICEINFO],
 		.rpc_argp = &args,
 		.rpc_resp = &res,
+		.rpc_cred = nfs4_get_machine_cred(server->nfs_client),
 	};
 	int status;
 
 	dprintk("--> %s\n", __func__);
 	status = nfs4_call_sync(server, &msg, &args, &res, 0);
+	put_rpccred(msg.rpc_cred);
 	dprintk("<-- %s status=%d\n", __func__, status);
 
 	return status;
-- 
1.7.2.2


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/3] SQUASHME: pnfs: get machince creds for getdevicelist
  2010-08-30 16:34 pnfs git tree status pnfs-all-2.6.36-rc3-2010-08-30 Benny Halevy
  2010-08-30 16:43 ` [PATCH 1/2] SQUASHME: pnfs-submit: do not use NIPQUAD in nfs4_callback_layoutrecall dprintk Benny Halevy
  2010-08-30 16:43 ` [PATCH 2/2] SQUASHME: pnfs-submit: get machince creds for getdeviceinfo Benny Halevy
@ 2010-08-30 16:44 ` Benny Halevy
  2010-08-30 16:44 ` [PATCH 4/4] SQUASHME: pnfs-obj use REQ flags rather than BIO flags Benny Halevy
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
  4 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-08-30 16:44 UTC (permalink / raw)
  To: linux-nfs; +Cc: Benny Halevy

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/nfs4proc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 33c4057..48a763e 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5784,11 +5784,13 @@ static int _nfs4_getdevicelist(struct nfs_server *server,
 		.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_GETDEVICELIST],
 		.rpc_argp = &args,
 		.rpc_resp = &res,
+		.rpc_cred = nfs4_get_machine_cred(server->nfs_client),
 	};
 	int status;
 
 	dprintk("--> %s\n", __func__);
 	status = nfs4_call_sync(server, &msg, &args, &res, 0);
+	put_rpccred(msg.rpc_cred);
 	dprintk("<-- %s status=%d\n", __func__, status);
 	return status;
 }
-- 
1.7.2.2


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 4/4] SQUASHME: pnfs-obj use REQ flags rather than BIO flags
  2010-08-30 16:34 pnfs git tree status pnfs-all-2.6.36-rc3-2010-08-30 Benny Halevy
                   ` (2 preceding siblings ...)
  2010-08-30 16:44 ` [PATCH 3/3] SQUASHME: pnfs: get machince creds for getdevicelist Benny Halevy
@ 2010-08-30 16:44 ` Benny Halevy
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
  4 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-08-30 16:44 UTC (permalink / raw)
  To: linux-nfs; +Cc: Benny Halevy, Boaz Harrosh

As they were converged starting 2.6.36

Cc: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/objlayout/objio_osd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
index 316f9c5..223980b 100644
--- a/fs/nfs/objlayout/objio_osd.c
+++ b/fs/nfs/objlayout/objio_osd.c
@@ -910,7 +910,7 @@ static int _write_mirrors(struct objio_state *ios, unsigned cur_comp)
 		} else {
 			bio = master_dev->bio;
 			/* FIXME: bio_set_dir() */
-			bio->bi_rw |= (1 << BIO_RW);
+			bio->bi_rw |= (1 << REQ_WRITE);
 		}
 
 		osd_req_write(or, &obj, per_dev->offset, bio, per_dev->length);
-- 
1.7.2.2


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-08-30 16:34 pnfs git tree status pnfs-all-2.6.36-rc3-2010-08-30 Benny Halevy
                   ` (3 preceding siblings ...)
  2010-08-30 16:44 ` [PATCH 4/4] SQUASHME: pnfs-obj use REQ flags rather than BIO flags Benny Halevy
@ 2010-09-29 11:06 ` Benny Halevy
  2010-09-29 11:09   ` [PATCH 1/5] SQUASHME: pnfs-submit: add missing include file in nfs4filelayoutdev.c Benny Halevy
                     ` (22 more replies)
  4 siblings, 23 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:06 UTC (permalink / raw)
  To: NFS list

This version includes Fred's pnfs-submit RFC patches (v5).
and is rebased onto v2.6.36-rc6

Cumulative patches can be generated from
git://linux-nfs.org/~bhalevy/linux-pnfs.git
using
git diff v2.6.36-rc6 pnfs-all-2.6.36-rc6-2010-09-29

Or, they can be downloaded from the wiki at:
http://wiki.linux-nfs.org/wiki/index.php/PNFS_Development_Git_tree

Latest patches (since pnfs-all-2.6.36-rc3-2010-08-30):

upstream:
  Boaz Harrosh     cc59b6a um: Proper Fix for f25c80a4: remove duplicate structure field initialization

pnfs-submit:
  The pNFS Team    1851dbc RFC: pnfsd, pnfs: protocol level pnfs constants
  The pNFS Team    a1b60af RFC: nfs: change stateid to be a union
  The pNFS Team    ff38ee4 RFC: nfs: ask for layouttypes during fsinfo call
  The pNFS Team    01f09aa RFC: nfs: set layout driver
  The pNFS Team    f7893b6 RFC: pnfs: full mount/umount infrastructure
  The pNFS Team    1cef5e0 RFC: pnfs: filelayout: introduce minimal file layout driver
  The pNFS Team    b7e2a3d RFC: nfs: create and destroy inode's layout cache
  The pNFS Team    34d2802 RFC: nfs: client needs to maintain list of inodes with active layouts
  The pNFS Team    292b90e RFC: pnfs: add LAYOUTGET and GETDEVICEINFO infrastructure
  The pNFS Team    bf610f6 RFC: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure
  Fred Isaman      068e761 pnfs-submit: revert range simplifications made by submission patches
  Benny Halevy     7c58c3d SQUASHME: pnfs-submit: add missing include file in nfs4filelayoutdev.c
  Benny Halevy     9a5956f SQUASHME: move nfs4_deviceid definitions to include/linux/nfs4.h
  Benny Halevy     bb2afce SQUASHME: pnfs-submit: handle non-pnfs case in set_pnfs_layoutdriver
  Benny Halevy     998fe4a pnfs-submit: file needs layout commit, server attributes may be stale
  Benny Halevy     f18cdf8 NFS: clear fsinfo before sendign rpc

pnfs:
  Benny Halevy     52a6277 pnfs: alloc and free layout_hdr layoutdriver methods
  Benny Halevy     6dd521e pnfs: allow nfs4_proc_layoutget to sleep on invalid lsegs
  Benny Halevy     ba1dd5b SQUASHME: pnfs: refactor put_lseg{_locked}
  Benny Halevy     bb03ecf SQUASHME: pnfs: get rid of lo_waitq

pnfs-block:
  Benny Halevy     73b1db9 SQUASHME: pnfsblock: remove obsolete include file from blocklayout.h
  Benny Halevy     d9ebc26 SQUASHME: pnfsblock: use nfs4_deviceid
  Benny Halevy     90e2af1 SQUASHME: pnfsblock: no callback ops
  Benny Halevy     0953b90 SQAUSHME: pnfsblock: no PNFS_NFS_SERVER
  Benny Halevy     7ab3774 SQUASHME: pnfsblock: no dev_notify_types
  Benny Halevy     f08f966 SQUASHME: pnfsblock: use new struct pnfs_layout_hdr

pnfs-obj-all:
  Benny Halevy     41a70b7 SQUASHME: pnfs-obj: fix REQ flags usage
  Benny Halevy     6057701 SQUASHME: pnfs-obj: convert to new pnfs-submit changes

pnfs-exofs-all:
  Benny Halevy     10d8e6e SQUASHME: pnfsd-exofs: convert to new pnfs-submit changes


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/5] SQUASHME: pnfs-submit: add missing include file in nfs4filelayoutdev.c
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
@ 2010-09-29 11:09   ` Benny Halevy
  2010-09-29 11:09   ` [PATCH 2/5] SQUASHME: move nfs4_deviceid definitions to include/linux/nfs4.h Benny Halevy
                     ` (21 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:09 UTC (permalink / raw)
  To: linux-nfs

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/nfs4filelayoutdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index bd76794..e4f91f6 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -29,6 +29,7 @@
  */
 
 #include <linux/nfs_fs.h>
+#include <linux/vmalloc.h>
 
 #include "internal.h"
 #include "nfs4filelayout.h"
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 2/5] SQUASHME: move nfs4_deviceid definitions to include/linux/nfs4.h
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
  2010-09-29 11:09   ` [PATCH 1/5] SQUASHME: pnfs-submit: add missing include file in nfs4filelayoutdev.c Benny Halevy
@ 2010-09-29 11:09   ` Benny Halevy
  2010-09-29 11:09   ` [PATCH 3/5] SQUASHME: pnfs-submit: handle non-pnfs case in set_pnfs_layoutdriver Benny Halevy
                     ` (20 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:09 UTC (permalink / raw)
  To: linux-nfs

These are pure protocol level constants
squash into "pnfs: add LAYOUTGET and GETDEVICEINFO infrastructure"

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/pnfs.h        |    6 ------
 include/linux/nfs4.h |    6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 97c3bc4..9500aa4 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -38,8 +38,6 @@ struct pnfs_layout_segment {
 	struct pnfs_layout_hdr *layout;
 };
 
-#define NFS4_DEVICEID4_SIZE 16
-
 enum pnfs_try_status {
 	PNFS_ATTEMPTED     = 0,
 	PNFS_NOT_ATTEMPTED = 1,
@@ -113,10 +111,6 @@ struct pnfs_layout_hdr {
 	struct inode		*inode;
 };
 
-struct nfs4_deviceid {
-	char data[NFS4_DEVICEID4_SIZE];
-};
-
 struct pnfs_device {
 	struct nfs4_deviceid dev_id;
 	unsigned int  layout_type;
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index ae99e4f..3d04746 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -613,6 +613,12 @@ enum filelayout_hint_care4 {
 	NFLH4_CARE_STRIPE_COUNT		= 0x00000080
 };
 
+#define NFS4_DEVICEID4_SIZE 16
+
+struct nfs4_deviceid {
+	char data[NFS4_DEVICEID4_SIZE];
+};
+
 #endif
 #endif
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/5] SQUASHME: pnfs-submit: handle non-pnfs case in set_pnfs_layoutdriver
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
  2010-09-29 11:09   ` [PATCH 1/5] SQUASHME: pnfs-submit: add missing include file in nfs4filelayoutdev.c Benny Halevy
  2010-09-29 11:09   ` [PATCH 2/5] SQUASHME: move nfs4_deviceid definitions to include/linux/nfs4.h Benny Halevy
@ 2010-09-29 11:09   ` Benny Halevy
  2010-09-29 11:10   ` [PATCH 4/5] pnfs-submit: file needs layout commit, server attributes may be stale Benny Halevy
                     ` (19 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:09 UTC (permalink / raw)
  To: linux-nfs

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/pnfs.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 1ccf8d8..9d53c3c 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -139,10 +139,14 @@ set_pnfs_layoutdriver(struct nfs_server *server, u32 id)
 {
 	struct pnfs_layoutdriver_type *ld_type = NULL;
 
-	BUG_ON(!(server->nfs_client->cl_exchange_flags &
-		 (EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS)));
 	if (id == 0)
 		goto out_no_driver;
+	if (!(server->nfs_client->cl_exchange_flags &
+		 (EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS))) {
+		printk(KERN_ERR "%s: id %u cl_exchange_flags 0x%x\n", __func__,
+		       id, server->nfs_client->cl_exchange_flags);
+		goto out_no_driver;
+	}
 	ld_type = find_pnfs_driver(id);
 	if (!ld_type) {
 		request_module("%s-%u", LAYOUT_NFSV4_1_MODULE_PREFIX, id);
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 4/5] pnfs-submit: file needs layout commit, server attributes may be stale
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (2 preceding siblings ...)
  2010-09-29 11:09   ` [PATCH 3/5] SQUASHME: pnfs-submit: handle non-pnfs case in set_pnfs_layoutdriver Benny Halevy
@ 2010-09-29 11:10   ` Benny Halevy
  2010-09-29 11:10   ` [PATCH 5/5] NFS: clear fsinfo before sendign rpc Benny Halevy
                     ` (18 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:10 UTC (permalink / raw)
  To: linux-nfs

[part of "pnfs: layoutcommit"]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/inode.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 979483f..8cdea1a 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1212,6 +1212,14 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
 		server->fsid = fattr->fsid;
 
 	/*
+	 * file needs layout commit, server attributes may be stale
+	 */
+	if (layoutcommit_needed(nfsi) && nfsi->change_attr >= fattr->change_attr) {
+		dprintk("NFS: %s: layoutcommit is needed for file %s/%ld\n",
+			__func__, inode->i_sb->s_id, inode->i_ino);
+		return 0;
+	}
+	/*
 	 * Update the read time so we don't revalidate too often.
 	 */
 	nfsi->read_cache_jiffies = fattr->time_start;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 5/5] NFS: clear fsinfo before sendign rpc
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (3 preceding siblings ...)
  2010-09-29 11:10   ` [PATCH 4/5] pnfs-submit: file needs layout commit, server attributes may be stale Benny Halevy
@ 2010-09-29 11:10   ` Benny Halevy
  2010-10-13 18:03     ` Fred Isaman
  2010-09-29 11:10   ` [PATCH 6/9] pnfs: alloc and free layout_hdr layoutdriver methods Benny Halevy
                     ` (17 subsequent siblings)
  22 siblings, 1 reply; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:10 UTC (permalink / raw)
  To: linux-nfs

To initialize all values to zero, in case the server or protocol version
do no support particular attributes.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/client.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 23d740c..beb206e 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -942,6 +942,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str
 			goto out_error;
 	}
 
+	memset(&fsinfo, 0, sizeof(fsinfo));
 	fsinfo.fattr = fattr;
 	error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo);
 	if (error < 0)
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 6/9] pnfs: alloc and free layout_hdr layoutdriver methods
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (4 preceding siblings ...)
  2010-09-29 11:10   ` [PATCH 5/5] NFS: clear fsinfo before sendign rpc Benny Halevy
@ 2010-09-29 11:10   ` Benny Halevy
  2010-09-29 11:10   ` [PATCH 7/9] pnfs: allow nfs4_proc_layoutget to sleep on invalid lsegs Benny Halevy
                     ` (16 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:10 UTC (permalink / raw)
  To: linux-nfs

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/pnfs.c |   21 ++++++++++++++++++---
 fs/nfs/pnfs.h |    4 ++++
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index b3e1e8a..8339444 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -233,6 +233,21 @@ EXPORT_SYMBOL_GPL(pnfs_unregister_layoutdriver);
  * pNFS client layout cache
  */
 
+static struct pnfs_layout_hdr *
+pnfs_alloc_layout_hdr(struct inode *ino)
+{
+	struct pnfs_layoutdriver_type *ld = NFS_SERVER(ino)->pnfs_curr_ld;
+	return ld->alloc_layout_hdr ? ld->alloc_layout_hdr(ino) :
+		kzalloc(sizeof(struct pnfs_layout_hdr), GFP_KERNEL);
+}
+
+static void
+pnfs_free_layout_hdr(struct pnfs_layout_hdr *lo)
+{
+	struct pnfs_layoutdriver_type *ld = NFS_SERVER(lo->inode)->pnfs_curr_ld;
+	return ld->alloc_layout_hdr ? ld->free_layout_hdr(lo) : kfree(lo);
+}
+
 static void
 get_layout_hdr_locked(struct pnfs_layout_hdr *lo)
 {
@@ -251,7 +266,7 @@ put_layout_hdr_locked(struct pnfs_layout_hdr *lo)
 		dprintk("%s: freeing layout cache %p\n", __func__, lo);
 		BUG_ON(!list_empty(&lo->layouts));
 		NFS_I(lo->inode)->layout = NULL;
-		kfree(lo);
+		pnfs_free_layout_hdr(lo);
 	}
 }
 
@@ -839,7 +854,7 @@ alloc_init_layout_hdr(struct inode *ino)
 {
 	struct pnfs_layout_hdr *lo;
 
-	lo = kzalloc(sizeof(struct pnfs_layout_hdr), GFP_KERNEL);
+	lo = pnfs_alloc_layout_hdr(ino);
 	if (!lo)
 		return NULL;
 	lo->refcount = 1;
@@ -869,7 +884,7 @@ pnfs_find_alloc_layout(struct inode *ino)
 	if (likely(nfsi->layout == NULL))	/* Won the race? */
 		nfsi->layout = new;
 	else
-		kfree(new);
+		pnfs_free_layout_hdr(new);
 	return nfsi->layout;
 }
 
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index af29b02..36ce9fa 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -76,6 +76,10 @@ struct pnfs_layoutdriver_type {
 	unsigned flags;
 	int (*initialize_mountpoint) (struct nfs_server *, const struct nfs_fh *);
 	int (*uninitialize_mountpoint) (struct nfs_server *);
+
+	struct pnfs_layout_hdr * (*alloc_layout_hdr) (struct inode *inode);
+	void (*free_layout_hdr) (struct pnfs_layout_hdr *);
+
 	struct pnfs_layout_segment * (*alloc_lseg) (struct pnfs_layout_hdr *layoutid, struct nfs4_layoutget_res *lgr);
 	void (*free_lseg) (struct pnfs_layout_segment *lseg);
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 7/9] pnfs: allow nfs4_proc_layoutget to sleep on invalid lsegs
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (5 preceding siblings ...)
  2010-09-29 11:10   ` [PATCH 6/9] pnfs: alloc and free layout_hdr layoutdriver methods Benny Halevy
@ 2010-09-29 11:10   ` Benny Halevy
  2010-09-29 11:10   ` [PATCH 8/9] SQUASHME: pnfs: refactor put_lseg{_locked} Benny Halevy
                     ` (15 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:10 UTC (permalink / raw)
  To: linux-nfs

Introduce lo_rpcwaitq and sleep on it while there's an lseg marked invalid,
i.e. it is being returned (in the future, it could also be layoutget in progress).

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/inode.c         |    1 +
 fs/nfs/nfs4proc.c      |   25 ++++++++++++++++++++++---
 fs/nfs/pnfs.c          |   26 ++++++++++++++++----------
 include/linux/nfs_fs.h |    1 +
 4 files changed, 40 insertions(+), 13 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 8cdea1a..e3d44a9 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1459,6 +1459,7 @@ static inline void nfs4_init_once(struct nfs_inode *nfsi)
 	nfsi->delegation_state = 0;
 	init_rwsem(&nfsi->rwsem);
 	init_waitqueue_head(&nfsi->lo_waitq);
+	rpc_init_wait_queue(&nfsi->lo_rpcwaitq, "pNFS Layout");
 	nfsi->layout = NULL;
 #endif
 }
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index cd87704..ebf5127 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5426,13 +5426,32 @@ nfs4_layoutget_prepare(struct rpc_task *task, void *calldata)
 {
 	struct nfs4_layoutget *lgp = calldata;
 	struct inode *ino = lgp->args.inode;
+	struct nfs_inode *nfsi = NFS_I(ino);
 	struct nfs_server *server = NFS_SERVER(ino);
+	struct pnfs_layout_segment *lseg;
 
 	dprintk("--> %s\n", __func__);
-	if (nfs4_setup_sequence(server, NULL, &lgp->args.seq_args,
-				&lgp->res.seq_res, 0, task))
+	spin_lock(&ino->i_lock);
+	lseg = pnfs_has_layout(nfsi->layout, &lgp->args.range);
+	if (likely(!lseg)) {
+		spin_unlock(&ino->i_lock);
+		dprintk("%s: no lseg found, proceeding\n", __func__);
+		if (!nfs4_setup_sequence(server, NULL, &lgp->args.seq_args,
+					 &lgp->res.seq_res, 0, task))
+			rpc_call_start(task);
 		return;
-	rpc_call_start(task);
+	}
+	if (!lseg->valid) {
+		put_lseg_locked(lseg);
+		spin_unlock(&ino->i_lock);
+		dprintk("%s: invalid lseg found, waiting\n", __func__);
+		rpc_sleep_on(&nfsi->lo_rpcwaitq, task, NULL);
+		return;
+	}
+	*lgp->lsegpp = lseg;
+	spin_unlock(&ino->i_lock);
+	dprintk("%s: valid lseg found, no rpc required\n", __func__);
+	rpc_exit(task, NFS4_OK);
 }
 
 static void nfs4_layoutget_done(struct rpc_task *task, void *calldata)
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 8339444..31a703d 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -315,8 +315,10 @@ put_lseg_locked(struct pnfs_layout_segment *lseg)
 	do_wake_up = !lseg->valid;
 	nfsi = NFS_I(lseg->layout->inode);
 	kref_put(&lseg->kref, destroy_lseg);
-	if (do_wake_up)
+	if (do_wake_up) {
 		wake_up(&nfsi->lo_waitq);
+		rpc_wake_up(&nfsi->lo_rpcwaitq);
+	}
 }
 EXPORT_SYMBOL_GPL(put_lseg_locked);
 
@@ -975,17 +977,21 @@ pnfs_update_layout(struct inode *ino,
 
 	/* Check to see if the layout for the given range already exists */
 	lseg = pnfs_has_layout(lo, &arg);
-	if (lseg && !lseg->valid) {
-		put_lseg_locked(lseg);
+	if (lseg) {
+		if (lseg->valid) {
+			dprintk("%s: Using cached lseg %p for %llu@%llu "
+				"iomode %d)\n",
+				__func__,
+				lseg,
+				arg.length,
+				arg.offset,
+				arg.iomode);
+
+			goto out_unlock;
+		}
 		/* someone is cleaning the layout */
+		put_lseg_locked(lseg);
 		lseg = NULL;
-		goto out_unlock;
-	}
-
-	if (lseg) {
-		dprintk("%s: Using cached lseg %p for iomode %d)\n",
-			__func__, lseg, iomode);
-		goto out_unlock;
 	}
 
 	/* if LAYOUTGET already failed once we don't try again */
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 3184e63..1af18fd 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -191,6 +191,7 @@ struct nfs_inode {
 
 	/* pNFS layout information */
 	wait_queue_head_t lo_waitq;
+	struct rpc_wait_queue lo_rpcwaitq;
 	struct pnfs_layout_hdr *layout;
 #endif /* CONFIG_NFS_V4*/
 #ifdef CONFIG_NFS_FSCACHE
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 8/9] SQUASHME: pnfs: refactor put_lseg{_locked}
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (6 preceding siblings ...)
  2010-09-29 11:10   ` [PATCH 7/9] pnfs: allow nfs4_proc_layoutget to sleep on invalid lsegs Benny Halevy
@ 2010-09-29 11:10   ` Benny Halevy
  2010-09-29 11:11   ` [PATCH 9/9] SQUASHME: pnfs: get rid of lo_waitq Benny Halevy
                     ` (14 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:10 UTC (permalink / raw)
  To: linux-nfs

move common code into put_lseg_common

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/nfs4proc.c |    8 ++++++++
 fs/nfs/pnfs.c     |   36 ++++++++++++++----------------------
 fs/nfs/pnfs.h     |    1 +
 3 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ebf5127..52c5ddf 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5664,9 +5664,17 @@ nfs4_layoutreturn_prepare(struct rpc_task *task, void *calldata)
 {
 	struct nfs4_layoutreturn *lrp = calldata;
 	struct inode *ino = lrp->args.inode;
+	struct nfs_inode *nfsi = NFS_I(ino);
 	struct nfs_server *server = NFS_SERVER(ino);
 
 	dprintk("--> %s\n", __func__);
+	if ((lrp->args.return_type == RETURN_FILE) &&
+	    pnfs_return_layout_barrier(nfsi, &lrp->args.range)) {
+		dprintk("%s: waiting on barrier\n", __func__);
+		rpc_sleep_on(&nfsi->lo_rpcwaitq, task, NULL);
+		return;
+	}
+
 	if (nfs4_setup_sequence(server, NULL, &lrp->args.seq_args,
 				&lrp->res.seq_res, 0, task))
 		return;
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 31a703d..4e47c2a 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -301,14 +301,10 @@ destroy_lseg(struct kref *kref)
 	put_layout_hdr_locked(local);
 }
 
-void
-put_lseg_locked(struct pnfs_layout_segment *lseg)
+static void
+put_lseg_common(struct nfs_inode *nfsi, struct pnfs_layout_segment *lseg)
 {
 	bool do_wake_up;
-	struct nfs_inode *nfsi;
-
-	if (!lseg)
-		return;
 
 	dprintk("%s: lseg %p ref %d valid %d\n", __func__, lseg,
 		atomic_read(&lseg->kref.refcount), lseg->valid);
@@ -320,12 +316,21 @@ put_lseg_locked(struct pnfs_layout_segment *lseg)
 		rpc_wake_up(&nfsi->lo_rpcwaitq);
 	}
 }
+
+void
+put_lseg_locked(struct pnfs_layout_segment *lseg)
+{
+	if (!lseg)
+		return;
+
+	assert_spin_locked(&lseg->layout->inode->i_lock);
+	put_lseg_common(NFS_I(lseg->layout->inode), lseg);
+}
 EXPORT_SYMBOL_GPL(put_lseg_locked);
 
 void
 put_lseg(struct pnfs_layout_segment *lseg)
 {
-	bool do_wake_up;
 	struct nfs_inode *nfsi;
 
 	if (!lseg)
@@ -333,13 +338,10 @@ put_lseg(struct pnfs_layout_segment *lseg)
 
 	dprintk("%s: lseg %p ref %d valid %d\n", __func__, lseg,
 		atomic_read(&lseg->kref.refcount), lseg->valid);
-	do_wake_up = !lseg->valid;
 	nfsi = NFS_I(lseg->layout->inode);
 	spin_lock(&nfsi->vfs_inode.i_lock);
-	kref_put(&lseg->kref, destroy_lseg);
+	put_lseg_common(nfsi, lseg);
 	spin_unlock(&nfsi->vfs_inode.i_lock);
-	if (do_wake_up)
-		wake_up(&nfsi->lo_waitq);
 }
 EXPORT_SYMBOL_GPL(put_lseg);
 
@@ -654,7 +656,7 @@ has_layout_to_return(struct pnfs_layout_hdr *lo,
 	return out;
 }
 
-static bool
+bool
 pnfs_return_layout_barrier(struct nfs_inode *nfsi,
 			   struct pnfs_layout_range *range)
 {
@@ -743,16 +745,6 @@ _pnfs_return_layout(struct inode *ino, struct pnfs_layout_range *range,
 
 		spin_unlock(&ino->i_lock);
 
-		if (pnfs_return_layout_barrier(nfsi, &arg)) {
-			if (stateid) { /* callback */
-				status = -EAGAIN;
-				goto out_put;
-			}
-			dprintk("%s: waiting\n", __func__);
-			wait_event(nfsi->lo_waitq,
-				   !pnfs_return_layout_barrier(nfsi, &arg));
-		}
-
 		if (layoutcommit_needed(nfsi)) {
 			if (stateid && !wait) { /* callback */
 				dprintk("%s: layoutcommit pending\n", __func__);
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 36ce9fa..b143390 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -239,6 +239,7 @@ pnfs_has_layout(struct pnfs_layout_hdr *lo, struct pnfs_layout_range *range);
 struct pnfs_layout_segment *
 pnfs_update_layout(struct inode *ino, struct nfs_open_context *ctx,
 		   loff_t pos, u64 count, enum pnfs_iomode access_type);
+bool pnfs_return_layout_barrier(struct nfs_inode *, struct pnfs_layout_range *);
 int _pnfs_return_layout(struct inode *, struct pnfs_layout_range *,
 			const nfs4_stateid *stateid, /* optional */
 			enum pnfs_layoutreturn_type, bool wait);
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 9/9] SQUASHME: pnfs: get rid of lo_waitq
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (7 preceding siblings ...)
  2010-09-29 11:10   ` [PATCH 8/9] SQUASHME: pnfs: refactor put_lseg{_locked} Benny Halevy
@ 2010-09-29 11:11   ` Benny Halevy
  2010-09-29 11:11   ` [PATCH 10/15] SQUASHME: pnfsblock: remove obsolete include file from blocklayout.h Benny Halevy
                     ` (13 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:11 UTC (permalink / raw)
  To: linux-nfs

it has no more users at this point.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/inode.c         |    1 -
 fs/nfs/pnfs.c          |    6 +-----
 include/linux/nfs_fs.h |    1 -
 3 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index e3d44a9..437d9a6 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1458,7 +1458,6 @@ static inline void nfs4_init_once(struct nfs_inode *nfsi)
 	nfsi->delegation = NULL;
 	nfsi->delegation_state = 0;
 	init_rwsem(&nfsi->rwsem);
-	init_waitqueue_head(&nfsi->lo_waitq);
 	rpc_init_wait_queue(&nfsi->lo_rpcwaitq, "pNFS Layout");
 	nfsi->layout = NULL;
 #endif
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 4e47c2a..0796c17 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -311,10 +311,8 @@ put_lseg_common(struct nfs_inode *nfsi, struct pnfs_layout_segment *lseg)
 	do_wake_up = !lseg->valid;
 	nfsi = NFS_I(lseg->layout->inode);
 	kref_put(&lseg->kref, destroy_lseg);
-	if (do_wake_up) {
-		wake_up(&nfsi->lo_waitq);
+	if (do_wake_up)
 		rpc_wake_up(&nfsi->lo_rpcwaitq);
-	}
 }
 
 void
@@ -476,7 +474,6 @@ pnfs_layoutget_release(struct pnfs_layout_hdr *lo)
 	 */
 	put_layout_hdr_locked(lo);
 	spin_unlock(&nfsi->vfs_inode.i_lock);
-	wake_up_all(&nfsi->lo_waitq);
 }
 
 void
@@ -494,7 +491,6 @@ pnfs_layoutreturn_release(struct pnfs_layout_hdr *lo,
 	 */
 	put_layout_hdr_locked(lo);
 	spin_unlock(&nfsi->vfs_inode.i_lock);
-	wake_up_all(&nfsi->lo_waitq);
 }
 
 void
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 1af18fd..059e61d 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -190,7 +190,6 @@ struct nfs_inode {
 	struct rw_semaphore	rwsem;
 
 	/* pNFS layout information */
-	wait_queue_head_t lo_waitq;
 	struct rpc_wait_queue lo_rpcwaitq;
 	struct pnfs_layout_hdr *layout;
 #endif /* CONFIG_NFS_V4*/
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 10/15] SQUASHME: pnfsblock: remove obsolete include file from blocklayout.h
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (8 preceding siblings ...)
  2010-09-29 11:11   ` [PATCH 9/9] SQUASHME: pnfs: get rid of lo_waitq Benny Halevy
@ 2010-09-29 11:11   ` Benny Halevy
  2010-09-29 11:11   ` [PATCH 11/15] SQUASHME: pnfsblock: use nfs4_deviceid Benny Halevy
                     ` (12 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:11 UTC (permalink / raw)
  To: linux-nfs

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/blocklayout/blocklayout.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/blocklayout/blocklayout.h b/fs/nfs/blocklayout/blocklayout.h
index ab61a19..fc0fb23 100644
--- a/fs/nfs/blocklayout/blocklayout.h
+++ b/fs/nfs/blocklayout/blocklayout.h
@@ -33,8 +33,8 @@
 #define FS_NFS_NFS4BLOCKLAYOUT_H
 
 #include <linux/nfs_fs.h>
-#include <linux/nfs4_pnfs.h>
 #include <linux/dm-ioctl.h> /* Needed for struct dm_ioctl*/
+#include <../pnfs.h>
 
 #define PAGE_CACHE_SECTORS (PAGE_CACHE_SIZE >> 9)
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 11/15] SQUASHME: pnfsblock: use nfs4_deviceid
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (9 preceding siblings ...)
  2010-09-29 11:11   ` [PATCH 10/15] SQUASHME: pnfsblock: remove obsolete include file from blocklayout.h Benny Halevy
@ 2010-09-29 11:11   ` Benny Halevy
  2010-09-29 11:11   ` [PATCH 12/15] SQUASHME: pnfsblock: no callback ops Benny Halevy
                     ` (11 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:11 UTC (permalink / raw)
  To: linux-nfs

---
 fs/nfs/blocklayout/blocklayout.c    |    2 +-
 fs/nfs/blocklayout/blocklayout.h    |   10 +++++-----
 fs/nfs/blocklayout/blocklayoutdev.c |    8 ++++----
 fs/nfs/blocklayout/extents.c        |    2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index f49c68c..071e7ef 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -683,7 +683,7 @@ static void free_blk_mountid(struct block_mount_id *mid)
  */
 static struct pnfs_block_dev *
 nfs4_blk_get_deviceinfo(struct nfs_server *server, const struct nfs_fh *fh,
-			struct pnfs_deviceid *d_id,
+			struct nfs4_deviceid *d_id,
 			struct list_head *sdlist)
 {
 	struct pnfs_device *dev;
diff --git a/fs/nfs/blocklayout/blocklayout.h b/fs/nfs/blocklayout/blocklayout.h
index fc0fb23..d62e3f9 100644
--- a/fs/nfs/blocklayout/blocklayout.h
+++ b/fs/nfs/blocklayout/blocklayout.h
@@ -55,7 +55,7 @@ struct block_mount_id {
 
 struct pnfs_block_dev {
 	struct list_head		bm_node;
-	struct pnfs_deviceid		bm_mdevid;    /* associated devid */
+	struct nfs4_deviceid		bm_mdevid;    /* associated devid */
 	struct block_device		*bm_mdev;     /* meta device itself */
 };
 
@@ -132,7 +132,7 @@ struct pnfs_inval_tracking {
 struct pnfs_block_extent {
 	struct kref	be_refcnt;
 	struct list_head be_node;	/* link into lseg list */
-	struct pnfs_deviceid be_devid;  /* STUB - remevable??? */
+	struct nfs4_deviceid be_devid;  /* STUB - remevable??? */
 	struct block_device *be_mdev;
 	sector_t	be_f_offset;	/* the starting offset in the file */
 	sector_t	be_length;	/* the size of the extent */
@@ -144,7 +144,7 @@ struct pnfs_block_extent {
 /* Shortened extent used by LAYOUTCOMMIT */
 struct pnfs_block_short_extent {
 	struct list_head bse_node;
-	struct pnfs_deviceid bse_devid;	/* STUB - removable??? */
+	struct nfs4_deviceid bse_devid;	/* STUB - removable??? */
 	struct block_device *bse_mdev;
 	sector_t	bse_f_offset;	/* the starting offset in the file */
 	sector_t	bse_length;	/* the size of the extent */
@@ -226,7 +226,7 @@ uint32_t *blk_overflow(uint32_t *p, uint32_t *end, size_t nbytes);
 	memcpy((x), p, nbytes);                 \
 	p += XDR_QUADLEN(nbytes);               \
 } while (0)
-#define READ_DEVID(x)	COPYMEM((x)->data, NFS4_PNFS_DEVICEID4_SIZE)
+#define READ_DEVID(x)	COPYMEM((x)->data, NFS4_DEVICEID4_SIZE)
 #define READ_SECTOR(x)     do { \
 	READ64(tmp); \
 	if (tmp & 0x1ff) { \
@@ -248,7 +248,7 @@ uint32_t *blk_overflow(uint32_t *p, uint32_t *end, size_t nbytes);
 #define WRITEMEM(ptr, nbytes)     do {                          \
 	p = xdr_encode_opaque_fixed(p, ptr, nbytes);	\
 } while (0)
-#define WRITE_DEVID(x)  WRITEMEM((x)->data, NFS4_PNFS_DEVICEID4_SIZE)
+#define WRITE_DEVID(x)  WRITEMEM((x)->data, NFS4_DEVICEID4_SIZE)
 
 /* blocklayoutdev.c */
 struct block_device *nfs4_blkdev_get(dev_t dev);
diff --git a/fs/nfs/blocklayout/blocklayoutdev.c b/fs/nfs/blocklayout/blocklayoutdev.c
index e9ea86a..17bd25a 100644
--- a/fs/nfs/blocklayout/blocklayoutdev.c
+++ b/fs/nfs/blocklayout/blocklayoutdev.c
@@ -133,7 +133,7 @@ nfs4_blk_decode_device(struct nfs_server *server,
 		goto out_err;
 
 	rv->bm_mdev = bd;
-	memcpy(&rv->bm_mdevid, &dev->dev_id, sizeof(struct pnfs_deviceid));
+	memcpy(&rv->bm_mdevid, &dev->dev_id, sizeof(struct nfs4_deviceid));
 	dprintk("%s Created device %s with bd_block_size %u\n",
 		__func__,
 		bd->bd_disk->disk_name,
@@ -153,7 +153,7 @@ out_err:
 
 /* Map deviceid returned by the server to constructed block_device */
 static struct block_device *translate_devid(struct pnfs_layout_hdr *lo,
-					    struct pnfs_deviceid *id)
+					    struct nfs4_deviceid *id)
 {
 	struct block_device *rv = NULL;
 	struct block_mount_id *mid;
@@ -164,7 +164,7 @@ static struct block_device *translate_devid(struct pnfs_layout_hdr *lo,
 	spin_lock(&mid->bm_lock);
 	list_for_each_entry(dev, &mid->bm_devlist, bm_node) {
 		if (memcmp(id->data, dev->bm_mdevid.data,
-			   NFS4_PNFS_DEVICEID4_SIZE) == 0) {
+			   NFS4_DEVICEID4_SIZE) == 0) {
 			rv = dev->bm_mdev;
 			goto out;
 		}
@@ -254,7 +254,7 @@ nfs4_blk_process_layoutget(struct pnfs_layout_hdr *lo,
 	READ32(count);
 
 	dprintk("%s enter, number of extents %i\n", __func__, count);
-	BLK_READBUF(p, end, (28 + NFS4_PNFS_DEVICEID4_SIZE) * count);
+	BLK_READBUF(p, end, (28 + NFS4_DEVICEID4_SIZE) * count);
 
 	/* Decode individual extents, putting them in temporary
 	 * staging area until whole layout is decoded to make error
diff --git a/fs/nfs/blocklayout/extents.c b/fs/nfs/blocklayout/extents.c
index 20cc863..40dff82 100644
--- a/fs/nfs/blocklayout/extents.c
+++ b/fs/nfs/blocklayout/extents.c
@@ -794,7 +794,7 @@ _prep_new_extent(struct pnfs_block_extent *new,
 {
 	kref_init(&new->be_refcnt);
 	/* don't need to INIT_LIST_HEAD(&new->be_node) */
-	memcpy(&new->be_devid, &orig->be_devid, sizeof(struct pnfs_deviceid));
+	memcpy(&new->be_devid, &orig->be_devid, sizeof(struct nfs4_deviceid));
 	new->be_mdev = orig->be_mdev;
 	new->be_f_offset = offset;
 	new->be_length = length;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 12/15] SQUASHME: pnfsblock: no callback ops
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (10 preceding siblings ...)
  2010-09-29 11:11   ` [PATCH 11/15] SQUASHME: pnfsblock: use nfs4_deviceid Benny Halevy
@ 2010-09-29 11:11   ` Benny Halevy
  2010-09-29 11:11   ` [PATCH 13/15] SQAUSHME: pnfsblock: no PNFS_NFS_SERVER Benny Halevy
                     ` (10 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:11 UTC (permalink / raw)
  To: linux-nfs

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/blocklayout/blocklayout.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 071e7ef..5dbd9c6 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -44,7 +44,6 @@ MODULE_AUTHOR("Andy Adamson <andros@citi.umich.edu>");
 MODULE_DESCRIPTION("The NFSv4.1 pNFS Block layout driver");
 
 /* Callback operations to the pNFS client */
-static struct pnfs_client_operations *pnfs_block_callback_ops;
 
 static void print_page(struct page *page)
 {
@@ -199,7 +198,7 @@ static void bl_read_cleanup(struct work_struct *work)
 	dprintk("%s enter\n", __func__);
 	task = container_of(work, struct rpc_task, u.tk_work);
 	rdata = container_of(task, struct nfs_read_data, task);
-	pnfs_block_callback_ops->nfs_readlist_complete(rdata);
+	pnfs_read_done(rdata);
 }
 
 static void
@@ -411,7 +410,7 @@ static void bl_write_cleanup(struct work_struct *work)
 		mark_extents_written(BLK_LSEG2EXT(wdata->pdata.lseg),
 				     wdata->args.offset, wdata->args.count);
 	}
-	pnfs_block_callback_ops->nfs_writelist_complete(wdata);
+	pnfs_writeback_done(wdata);
 }
 
 /* Called when last of bios associated with a bl_write_pagelist call finishes */
@@ -733,7 +732,7 @@ nfs4_blk_get_deviceinfo(struct nfs_server *server, const struct nfs_fh *fh,
 	dev->mincount = 0;
 
 	dprintk("%s: dev_id: %s\n", __func__, dev->dev_id.data);
-	rc = pnfs_block_callback_ops->nfs_getdeviceinfo(server, dev);
+	rc = nfs4_proc_getdeviceinfo(server, dev);
 	dprintk("%s getdevice info returns %d\n", __func__, rc);
 	if (rc)
 		goto out_free;
@@ -783,8 +782,7 @@ bl_initialize_mountpoint(struct nfs_server *server, const struct nfs_fh *fh)
 		goto out_error;
 	dlist->eof = 0;
 	while (!dlist->eof) {
-		status = pnfs_block_callback_ops->nfs_getdevicelist(
-							server, fh, dlist);
+		status = nfs4_proc_getdevicelist(server, fh, dlist);
 		if (status)
 			goto out_error;
 		dprintk("%s GETDEVICELIST numdevs=%i, eof=%i\n",
@@ -1140,11 +1138,14 @@ static struct pnfs_layoutdriver_type blocklayout_type = {
 
 static int __init nfs4blocklayout_init(void)
 {
+	int ret;
+
 	dprintk("%s: NFSv4 Block Layout Driver Registering...\n", __func__);
 
-	pnfs_block_callback_ops = pnfs_register_layoutdriver(&blocklayout_type);
-	bl_pipe_init();
-	return 0;
+	ret = pnfs_register_layoutdriver(&blocklayout_type);
+	if (!ret)
+		bl_pipe_init();
+	return ret;
 }
 
 static void __exit nfs4blocklayout_exit(void)
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 13/15] SQAUSHME: pnfsblock: no PNFS_NFS_SERVER
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (11 preceding siblings ...)
  2010-09-29 11:11   ` [PATCH 12/15] SQUASHME: pnfsblock: no callback ops Benny Halevy
@ 2010-09-29 11:11   ` Benny Halevy
  2010-09-29 11:12   ` [PATCH 14/15] SQUASHME: pnfsblock: no dev_notify_types Benny Halevy
                     ` (9 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:11 UTC (permalink / raw)
  To: linux-nfs

---
 fs/nfs/blocklayout/blocklayout.c |    2 +-
 fs/nfs/blocklayout/blocklayout.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 5dbd9c6..5e50c93 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -619,7 +619,7 @@ static int
 bl_setup_layoutcommit(struct pnfs_layout_hdr *lo,
 		      struct nfs4_layoutcommit_args *arg)
 {
-	struct nfs_server *nfss = PNFS_NFS_SERVER(lo);
+	struct nfs_server *nfss = NFS_SERVER(lo->inode);
 	struct bl_layoutupdate_data *layoutupdate_data;
 
 	dprintk("%s enter\n", __func__);
diff --git a/fs/nfs/blocklayout/blocklayout.h b/fs/nfs/blocklayout/blocklayout.h
index d62e3f9..7db7768 100644
--- a/fs/nfs/blocklayout/blocklayout.h
+++ b/fs/nfs/blocklayout/blocklayout.h
@@ -191,7 +191,7 @@ struct bl_layoutupdate_data {
 	struct list_head ranges;
 };
 
-#define BLK_ID(lo) ((struct block_mount_id *)(PNFS_NFS_SERVER(lo)->pnfs_ld_data))
+#define BLK_ID(lo) ((struct block_mount_id *)(NFS_SERVER(lo->inode)->pnfs_ld_data))
 
 static inline struct pnfs_block_layout *
 BLK_LO2EXT(struct pnfs_layout_hdr *lo)
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 14/15] SQUASHME: pnfsblock: no dev_notify_types
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (12 preceding siblings ...)
  2010-09-29 11:11   ` [PATCH 13/15] SQAUSHME: pnfsblock: no PNFS_NFS_SERVER Benny Halevy
@ 2010-09-29 11:12   ` Benny Halevy
  2010-09-29 11:12   ` [PATCH 15/15] SQUASHME: pnfsblock: use new struct pnfs_layout_hdr Benny Halevy
                     ` (8 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:12 UTC (permalink / raw)
  To: linux-nfs

not supported yet

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/blocklayout/blocklayout.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 5e50c93..ac53a3f 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -725,7 +725,6 @@ nfs4_blk_get_deviceinfo(struct nfs_server *server, const struct nfs_fh *fh,
 
 	memcpy(&dev->dev_id, d_id, sizeof(*d_id));
 	dev->layout_type = LAYOUT_BLOCK_VOLUME;
-	dev->dev_notify_types = 0;
 	dev->pages = pages;
 	dev->pgbase = 0;
 	dev->pglen = PAGE_SIZE * max_pages;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 15/15] SQUASHME: pnfsblock: use new struct pnfs_layout_hdr
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (13 preceding siblings ...)
  2010-09-29 11:12   ` [PATCH 14/15] SQUASHME: pnfsblock: no dev_notify_types Benny Halevy
@ 2010-09-29 11:12   ` Benny Halevy
  2010-09-29 11:12   ` [PATCH 16/17] SQUASHME: pnfs-obj: fix REQ flags usage Benny Halevy
                     ` (7 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:12 UTC (permalink / raw)
  To: linux-nfs

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/blocklayout/blocklayout.c |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index ac53a3f..23dbe91 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -546,7 +546,7 @@ release_inval_marks(struct pnfs_inval_markings *marks)
 
 /* Note we are relying on caller locking to prevent nasty races. */
 static void
-bl_free_layout(struct pnfs_layout_hdr *lo)
+bl_free_layout_hdr(struct pnfs_layout_hdr *lo)
 {
 	struct pnfs_block_layout *bl = BLK_LO2EXT(lo);
 
@@ -557,7 +557,7 @@ bl_free_layout(struct pnfs_layout_hdr *lo)
 }
 
 static struct pnfs_layout_hdr *
-bl_alloc_layout(struct inode *inode)
+bl_alloc_layout_hdr(struct inode *inode)
 {
 	struct pnfs_block_layout	*bl;
 
@@ -1105,15 +1105,17 @@ bl_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
 		return 1;
 }
 
-static struct layoutdriver_io_operations blocklayout_io_operations = {
+static struct pnfs_layoutdriver_type blocklayout_type = {
+	.id = LAYOUT_BLOCK_VOLUME,
+	.name = "LAYOUT_BLOCK_VOLUME",
 	.commit				= bl_commit,
 	.read_pagelist			= bl_read_pagelist,
 	.write_pagelist			= bl_write_pagelist,
 	.write_begin			= bl_write_begin,
 	.write_end			= bl_write_end,
 	.write_end_cleanup		= bl_write_end_cleanup,
-	.alloc_layout			= bl_alloc_layout,
-	.free_layout			= bl_free_layout,
+	.alloc_layout_hdr		= bl_alloc_layout_hdr,
+	.free_layout_hdr		= bl_free_layout_hdr,
 	.alloc_lseg			= bl_alloc_lseg,
 	.free_lseg			= bl_free_lseg,
 	.setup_layoutcommit		= bl_setup_layoutcommit,
@@ -1121,20 +1123,10 @@ static struct layoutdriver_io_operations blocklayout_io_operations = {
 	.cleanup_layoutcommit		= bl_cleanup_layoutcommit,
 	.initialize_mountpoint		= bl_initialize_mountpoint,
 	.uninitialize_mountpoint	= bl_uninitialize_mountpoint,
-};
-
-static struct layoutdriver_policy_operations blocklayout_policy_operations = {
 	.get_stripesize			= bl_get_stripesize,
 	.pg_test			= bl_pg_test,
 };
 
-static struct pnfs_layoutdriver_type blocklayout_type = {
-	.id = LAYOUT_BLOCK_VOLUME,
-	.name = "LAYOUT_BLOCK_VOLUME",
-	.ld_io_ops = &blocklayout_io_operations,
-	.ld_policy_ops = &blocklayout_policy_operations,
-};
-
 static int __init nfs4blocklayout_init(void)
 {
 	int ret;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 16/17] SQUASHME: pnfs-obj: fix REQ flags usage
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (14 preceding siblings ...)
  2010-09-29 11:12   ` [PATCH 15/15] SQUASHME: pnfsblock: use new struct pnfs_layout_hdr Benny Halevy
@ 2010-09-29 11:12   ` Benny Halevy
  2010-09-29 11:12   ` [PATCH 17/17] SQUASHME: pnfs-obj: convert to new pnfs-submit changes Benny Halevy
                     ` (6 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:12 UTC (permalink / raw)
  To: linux-nfs

fixes "pnfs-obj use REQ flags rather than BIO flags"

Cc: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/objlayout/objio_osd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
index 223980b..75d5df4 100644
--- a/fs/nfs/objlayout/objio_osd.c
+++ b/fs/nfs/objlayout/objio_osd.c
@@ -910,7 +910,7 @@ static int _write_mirrors(struct objio_state *ios, unsigned cur_comp)
 		} else {
 			bio = master_dev->bio;
 			/* FIXME: bio_set_dir() */
-			bio->bi_rw |= (1 << REQ_WRITE);
+			bio->bi_rw |= REQ_WRITE;
 		}
 
 		osd_req_write(or, &obj, per_dev->offset, bio, per_dev->length);
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 17/17] SQUASHME: pnfs-obj: convert to new pnfs-submit changes
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (15 preceding siblings ...)
  2010-09-29 11:12   ` [PATCH 16/17] SQUASHME: pnfs-obj: fix REQ flags usage Benny Halevy
@ 2010-09-29 11:12   ` Benny Halevy
  2010-09-29 11:12   ` [PATCH 18/18] SQUASHME: pnfsd-exofs: " Benny Halevy
                     ` (5 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:12 UTC (permalink / raw)
  To: linux-nfs

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/objlayout/objio_osd.c  |   57 ++++++++++++++++++++----------
 fs/nfs/objlayout/objlayout.c  |   77 ++++++++++++++++-------------------------
 fs/nfs/objlayout/objlayout.h  |   47 ++++++++++++++++++++++---
 fs/nfs/objlayout/panfs_shim.c |   51 ++++++++++++++++++---------
 include/linux/nfs4.h          |    2 +
 include/linux/pnfs_osd_xdr.h  |    4 +-
 6 files changed, 147 insertions(+), 91 deletions(-)

diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
index 75d5df4..696b6f5 100644
--- a/fs/nfs/objlayout/objio_osd.c
+++ b/fs/nfs/objlayout/objio_osd.c
@@ -64,7 +64,7 @@ struct objio_mount_type {
 
 struct _dev_ent {
 	struct list_head list;
-	struct pnfs_deviceid d_id;
+	struct nfs4_deviceid d_id;
 	struct osd_dev *od;
 };
 
@@ -85,7 +85,7 @@ static void _dev_list_remove_all(struct objio_mount_type *omt)
 }
 
 static struct osd_dev *___dev_list_find(struct objio_mount_type *omt,
-	struct pnfs_deviceid *d_id)
+	struct nfs4_deviceid *d_id)
 {
 	struct list_head *le;
 
@@ -100,7 +100,7 @@ static struct osd_dev *___dev_list_find(struct objio_mount_type *omt,
 }
 
 static struct osd_dev *_dev_list_find(struct objio_mount_type *omt,
-	struct pnfs_deviceid *d_id)
+	struct nfs4_deviceid *d_id)
 {
 	struct osd_dev *od;
 
@@ -111,7 +111,7 @@ static struct osd_dev *_dev_list_find(struct objio_mount_type *omt,
 }
 
 static int _dev_list_add(struct objio_mount_type *omt,
-	struct pnfs_deviceid *d_id, struct osd_dev *od)
+	struct nfs4_deviceid *d_id, struct osd_dev *od)
 {
 	struct _dev_ent *de = kzalloc(sizeof(*de), GFP_KERNEL);
 
@@ -180,10 +180,10 @@ static struct osd_dev *_device_lookup(struct pnfs_layout_hdr *pnfslay,
 {
 	struct pnfs_osd_layout *layout = objio_seg->layout;
 	struct pnfs_osd_deviceaddr *deviceaddr;
-	struct pnfs_deviceid *d_id;
+	struct nfs4_deviceid *d_id;
 	struct osd_dev *od;
 	struct osd_dev_info odi;
-	struct objio_mount_type *omt = PNFS_NFS_SERVER(pnfslay)->pnfs_ld_data;
+	struct objio_mount_type *omt = NFS_SERVER(pnfslay->inode)->pnfs_ld_data;
 	int err;
 
 	d_id = &layout->olo_comps[comp].oc_object_id.oid_device_id;
@@ -981,7 +981,8 @@ objlayout_get_stripesize(struct pnfs_layout_hdr *pnfslay)
 
 	list_for_each_entry(lseg, &pnfslay->segs, fi_list) {
 		int n;
-		struct objlayout_segment *objlseg = LSEG_LD_DATA(lseg);
+		struct objlayout_segment *objlseg =
+			container_of(lseg, struct objlayout_segment, lseg);
 		struct pnfs_osd_layout *lo =
 			(struct pnfs_osd_layout *)objlseg->pnfs_osd_layout;
 		struct pnfs_osd_data_map *map = &lo->olo_map;
@@ -1025,23 +1026,35 @@ objlayout_get_blocksize(void)
 	return sz;
 }
 
-static struct layoutdriver_policy_operations objlayout_policy_operations = {
 /*
  * Don't gather across stripes, but rather gather (coalesce) up to
  * the stripe size.
  *
  * FIXME: change interface to use merge_align, merge_count
  */
-	.flags                 = PNFS_LAYOUTRET_ON_SETATTR,
-	.get_stripesize        = objlayout_get_stripesize,
-	.get_blocksize         = objlayout_get_blocksize,
-};
-
 static struct pnfs_layoutdriver_type objlayout_type = {
 	.id = LAYOUT_OSD2_OBJECTS,
 	.name = "LAYOUT_OSD2_OBJECTS",
-	.ld_io_ops = &objlayout_io_operations,
-	.ld_policy_ops = &objlayout_policy_operations,
+	.flags                   = PNFS_LAYOUTRET_ON_SETATTR,
+
+	.initialize_mountpoint   = objlayout_initialize_mountpoint,
+	.uninitialize_mountpoint = objlayout_uninitialize_mountpoint,
+
+	.alloc_layout_hdr        = objlayout_alloc_layout_hdr,
+	.free_layout_hdr         = objlayout_free_layout_hdr,
+
+	.alloc_lseg              = objlayout_alloc_lseg,
+	.free_lseg               = objlayout_free_lseg,
+
+	.get_stripesize          = objlayout_get_stripesize,
+	.get_blocksize           = objlayout_get_blocksize,
+
+	.read_pagelist           = objlayout_read_pagelist,
+	.write_pagelist          = objlayout_write_pagelist,
+	.commit                  = objlayout_commit,
+
+	.encode_layoutcommit	 = objlayout_encode_layoutcommit,
+	.encode_layoutreturn     = objlayout_encode_layoutreturn,
 };
 
 void *objio_init_mt(void)
@@ -1069,10 +1082,16 @@ MODULE_LICENSE("GPL");
 static int __init
 objlayout_init(void)
 {
-	pnfs_client_ops = pnfs_register_layoutdriver(&objlayout_type);
-	printk(KERN_INFO "%s: Registered OSD pNFS Layout Driver\n",
-	       __func__);
-	return 0;
+	int ret = pnfs_register_layoutdriver(&objlayout_type);
+
+	if (ret)
+		printk(KERN_INFO
+			"%s: Registering OSD pNFS Layout Driver failed: error=%d\n",
+			__func__, ret);
+	else
+		printk(KERN_INFO "%s: Registered OSD pNFS Layout Driver\n",
+			__func__);
+	return ret;
 }
 
 static void __exit
diff --git a/fs/nfs/objlayout/objlayout.c b/fs/nfs/objlayout/objlayout.c
index 259c616..b647577 100644
--- a/fs/nfs/objlayout/objlayout.c
+++ b/fs/nfs/objlayout/objlayout.c
@@ -49,8 +49,8 @@ struct pnfs_client_operations *pnfs_client_ops;
 /*
  * Create a objlayout layout structure for the given inode and return it.
  */
-static struct pnfs_layout_hdr *
-objlayout_alloc_layout(struct inode *inode)
+struct pnfs_layout_hdr *
+objlayout_alloc_layout_hdr(struct inode *inode)
 {
 	struct objlayout *objlay;
 
@@ -66,8 +66,8 @@ objlayout_alloc_layout(struct inode *inode)
 /*
  * Free an objlayout layout structure
  */
-static void
-objlayout_free_layout(struct pnfs_layout_hdr *lo)
+void
+objlayout_free_layout_hdr(struct pnfs_layout_hdr *lo)
 {
 	struct objlayout *objlay = OBJLAYOUT(lo);
 
@@ -80,13 +80,12 @@ objlayout_free_layout(struct pnfs_layout_hdr *lo)
 /*
  * Unmarshall layout and store it in pnfslay.
  */
-static struct pnfs_layout_segment *
+struct pnfs_layout_segment *
 objlayout_alloc_lseg(struct pnfs_layout_hdr *pnfslay,
 		     struct nfs4_layoutget_res *lgr)
 {
 	int status;
 	void *layout = lgr->layout.buf;
-	struct pnfs_layout_segment *lseg;
 	struct objlayout_segment *objlseg;
 	struct pnfs_osd_layout *pnfs_osd_layout;
 
@@ -95,32 +94,31 @@ objlayout_alloc_lseg(struct pnfs_layout_hdr *pnfslay,
 	BUG_ON(!layout);
 
 	status = -ENOMEM;
-	lseg = kzalloc(sizeof(*lseg) + sizeof(*objlseg) +
-		       pnfs_osd_layout_incore_sz(layout), GFP_KERNEL);
-	if (!lseg)
+	objlseg = kzalloc(sizeof(*objlseg) +
+			  pnfs_osd_layout_incore_sz(layout), GFP_KERNEL);
+	if (!objlseg)
 		goto err;
 
-	objlseg = LSEG_LD_DATA(lseg);
 	pnfs_osd_layout = (struct pnfs_osd_layout *)objlseg->pnfs_osd_layout;
 	pnfs_osd_xdr_decode_layout(pnfs_osd_layout, layout);
 
-	status = objio_alloc_lseg(&objlseg->internal, pnfslay, lseg,
+	status = objio_alloc_lseg(&objlseg->internal, pnfslay, &objlseg->lseg,
 				  pnfs_osd_layout);
 	if (status)
 		goto err;
 
-	dprintk("%s: Return %p\n", __func__, lseg);
-	return lseg;
+	dprintk("%s: Return %p\n", __func__, &objlseg->lseg);
+	return &objlseg->lseg;
 
  err:
-	kfree(lseg);
+	kfree(objlseg);
 	return ERR_PTR(status);
 }
 
 /*
  * Free a layout segement
  */
-static void
+void
 objlayout_free_lseg(struct pnfs_layout_segment *lseg)
 {
 	struct objlayout_segment *objlseg;
@@ -130,9 +128,9 @@ objlayout_free_lseg(struct pnfs_layout_segment *lseg)
 	if (unlikely(!lseg))
 		return;
 
-	objlseg = LSEG_LD_DATA(lseg);
+	objlseg = container_of(lseg, struct objlayout_segment, lseg);
 	objio_free_lseg(objlseg->internal);
-	kfree(lseg);
+	kfree(objlseg);
 }
 
 /*
@@ -168,7 +166,8 @@ objlayout_alloc_io_state(struct pnfs_layout_hdr *pnfs_layout_type,
 			struct pnfs_layout_segment *lseg,
 			void *rpcdata)
 {
-	struct objlayout_segment *objlseg = LSEG_LD_DATA(lseg);
+	struct objlayout_segment *objlseg =
+		container_of(lseg, struct objlayout_segment, lseg);
 	struct objlayout_io_state *state;
 	u64 lseg_end_offset;
 	size_t size_nr_pages;
@@ -199,7 +198,7 @@ objlayout_alloc_io_state(struct pnfs_layout_hdr *pnfs_layout_type,
 		nr_pages = size_nr_pages;
 
 	INIT_LIST_HEAD(&state->err_list);
-	state->lseg = lseg;
+	state->objlseg = objlseg;
 	state->rpcdata = rpcdata;
 	state->pages = pages;
 	state->pgbase = pgbase;
@@ -232,7 +231,7 @@ objlayout_iodone(struct objlayout_io_state *state)
 	if (likely(state->status >= 0)) {
 		objlayout_free_io_state(state);
 	} else {
-		struct objlayout *objlay = OBJLAYOUT(state->lseg->layout);
+		struct objlayout *objlay = OBJLAYOUT(state->objlseg->lseg.layout);
 
 		spin_lock(&objlay->lock);
 		objlay->delta_space_valid = OBJ_DSU_INVALID;
@@ -255,9 +254,8 @@ objlayout_io_set_result(struct objlayout_io_state *state, unsigned index,
 
 	BUG_ON(index >= state->num_comps);
 	if (osd_error) {
-		struct objlayout_segment *objlseg = LSEG_LD_DATA(state->lseg);
 		struct pnfs_osd_layout *layout =
-				(typeof(layout))objlseg->pnfs_osd_layout;
+			(typeof(layout))state->objlseg->pnfs_osd_layout;
 
 		ioerr->oer_component = layout->olo_comps[index].oc_object_id;
 		ioerr->oer_comp_offset = offset;
@@ -290,7 +288,7 @@ static void _rpc_commit_complete(struct work_struct *work)
 	task = container_of(work, struct rpc_task, u.tk_work);
 	wdata = container_of(task, struct nfs_write_data, task);
 
-	pnfs_client_ops->nfs_commit_complete(wdata);
+	pnfs_commit_done(wdata);
 }
 
 /*
@@ -320,7 +318,7 @@ static void _rpc_read_complete(struct work_struct *work)
 	task = container_of(work, struct rpc_task, u.tk_work);
 	rdata = container_of(task, struct nfs_read_data, task);
 
-	pnfs_client_ops->nfs_readlist_complete(rdata);
+	pnfs_read_done(rdata);
 }
 
 void
@@ -341,7 +339,7 @@ objlayout_read_done(struct objlayout_io_state *state, ssize_t status, bool sync)
 	/* must not use state after this point */
 
 	if (sync)
-		pnfs_client_ops->nfs_readlist_complete(rdata);
+		pnfs_read_done(rdata);
 	else {
 		INIT_WORK(&rdata->task.u.tk_work, _rpc_read_complete);
 		schedule_work(&rdata->task.u.tk_work);
@@ -405,7 +403,7 @@ static void _rpc_write_complete(struct work_struct *work)
 	task = container_of(work, struct rpc_task, u.tk_work);
 	wdata = container_of(task, struct nfs_write_data, task);
 
-	pnfs_client_ops->nfs_writelist_complete(wdata);
+	pnfs_writeback_done(wdata);
 }
 
 void
@@ -431,7 +429,7 @@ objlayout_write_done(struct objlayout_io_state *state, ssize_t status,
 	/* must not use state after this point */
 
 	if (sync)
-		pnfs_client_ops->nfs_writelist_complete(wdata);
+		pnfs_writeback_done(wdata);
 	else {
 		INIT_WORK(&wdata->task.u.tk_work, _rpc_write_complete);
 		schedule_work(&wdata->task.u.tk_work);
@@ -683,7 +681,7 @@ struct objlayout_deviceinfo {
  * should be called.
  */
 int objlayout_get_deviceinfo(struct pnfs_layout_hdr *pnfslay,
-	struct pnfs_deviceid *d_id, struct pnfs_osd_deviceaddr **deviceaddr)
+	struct nfs4_deviceid *d_id, struct pnfs_osd_deviceaddr **deviceaddr)
 {
 	struct objlayout_deviceinfo *odi;
 	struct pnfs_device pd;
@@ -701,14 +699,13 @@ int objlayout_get_deviceinfo(struct pnfs_layout_hdr *pnfslay,
 
 	memcpy(&pd.dev_id, d_id, sizeof(*d_id));
 	pd.layout_type = LAYOUT_OSD2_OBJECTS;
-	pd.dev_notify_types = 0;
 	pd.pages = &page;
 	pd.pgbase = 0;
 	pd.pglen = PAGE_SIZE;
 	pd.mincount = 0;
 
-	sb = PNFS_INODE(pnfslay)->i_sb;
-	err = pnfs_client_ops->nfs_getdeviceinfo(PNFS_NFS_SERVER(pnfslay), &pd);
+	sb = pnfslay->inode->i_sb;
+	err = nfs4_proc_getdeviceinfo(NFS_SERVER(pnfslay->inode), &pd);
 	dprintk("%s nfs_getdeviceinfo returned %d\n", __func__, err);
 	if (err)
 		goto err_out;
@@ -746,7 +743,7 @@ void objlayout_put_deviceinfo(struct pnfs_osd_deviceaddr *deviceaddr)
  * Return the pnfs_mount_type structure so the
  * pNFS_client can refer to the mount point later on.
  */
-static int
+int
 objlayout_initialize_mountpoint(struct nfs_server *server,
 				const struct nfs_fh *mntfh)
 {
@@ -767,24 +764,10 @@ objlayout_initialize_mountpoint(struct nfs_server *server,
 /*
  * Uninitialize a mountpoint
  */
-static int
+int
 objlayout_uninitialize_mountpoint(struct nfs_server *server)
 {
 	dprintk("%s: Begin %p\n", __func__, server->pnfs_ld_data);
 	objio_fini_mt(server->pnfs_ld_data);
 	return 0;
 }
-
-struct layoutdriver_io_operations objlayout_io_operations = {
-	.commit                  = objlayout_commit,
-	.read_pagelist           = objlayout_read_pagelist,
-	.write_pagelist          = objlayout_write_pagelist,
-	.alloc_layout            = objlayout_alloc_layout,
-	.free_layout             = objlayout_free_layout,
-	.alloc_lseg              = objlayout_alloc_lseg,
-	.free_lseg               = objlayout_free_lseg,
-	.encode_layoutcommit	 = objlayout_encode_layoutcommit,
-	.encode_layoutreturn     = objlayout_encode_layoutreturn,
-	.initialize_mountpoint   = objlayout_initialize_mountpoint,
-	.uninitialize_mountpoint = objlayout_uninitialize_mountpoint,
-};
diff --git a/fs/nfs/objlayout/objlayout.h b/fs/nfs/objlayout/objlayout.h
index adec7ad..cad24a4 100644
--- a/fs/nfs/objlayout/objlayout.h
+++ b/fs/nfs/objlayout/objlayout.h
@@ -44,13 +44,14 @@
 #define _OBJLAYOUT_H
 
 #include <linux/nfs_fs.h>
-#include <linux/nfs4_pnfs.h>
 #include <linux/pnfs_osd_xdr.h>
+#include "../pnfs.h"
 
 /*
  * in-core layout segment
  */
 struct objlayout_segment {
+	struct pnfs_layout_segment lseg;
 	void *internal;    /* for provider internal use */
 	u8 pnfs_osd_layout[];
 };
@@ -85,7 +86,7 @@ OBJLAYOUT(struct pnfs_layout_hdr *lo)
  * embedded in objects provider io_state data structure
  */
 struct objlayout_io_state {
-	struct pnfs_layout_segment *lseg;
+	struct objlayout_segment *objlseg;
 
 	struct page **pages;
 	unsigned pgbase;
@@ -139,7 +140,7 @@ extern void objlayout_io_set_result(struct objlayout_io_state *state,
 static inline void
 objlayout_add_delta_space_used(struct objlayout_io_state *state, s64 space_used)
 {
-	struct objlayout *objlay = OBJLAYOUT(state->lseg->layout);
+	struct objlayout *objlay = OBJLAYOUT(state->objlseg->lseg.layout);
 
 	/* If one of the I/Os errored out and the delta_space_used was
 	 * invalid we render the complete report as invalid. Protocol mandate
@@ -159,13 +160,47 @@ extern void objlayout_write_done(struct objlayout_io_state *state,
 				 ssize_t status, bool sync);
 
 extern int objlayout_get_deviceinfo(struct pnfs_layout_hdr *pnfslay,
-	struct pnfs_deviceid *d_id, struct pnfs_osd_deviceaddr **deviceaddr);
+	struct nfs4_deviceid *d_id, struct pnfs_osd_deviceaddr **deviceaddr);
 extern void objlayout_put_deviceinfo(struct pnfs_osd_deviceaddr *deviceaddr);
 
 /*
  * exported generic objects function vectors
  */
-extern struct layoutdriver_io_operations objlayout_io_operations;
-extern struct pnfs_client_operations *pnfs_client_ops;
+
+extern int objlayout_initialize_mountpoint(
+	struct nfs_server *,
+	const struct nfs_fh *);
+extern int objlayout_uninitialize_mountpoint(struct nfs_server *);
+
+extern struct pnfs_layout_hdr *objlayout_alloc_layout_hdr(struct inode *);
+extern void objlayout_free_layout_hdr(struct pnfs_layout_hdr *);
+
+extern struct pnfs_layout_segment *objlayout_alloc_lseg(
+	struct pnfs_layout_hdr *,
+	struct nfs4_layoutget_res *);
+extern void objlayout_free_lseg(struct pnfs_layout_segment *);
+
+extern enum pnfs_try_status objlayout_read_pagelist(
+	struct nfs_read_data *,
+	unsigned nr_pages);
+
+extern enum pnfs_try_status objlayout_write_pagelist(
+	struct nfs_write_data *,
+	unsigned nr_pages,
+	int how);
+
+extern enum pnfs_try_status objlayout_commit(
+	struct nfs_write_data *,
+	int how);
+
+extern void objlayout_encode_layoutcommit(
+	struct pnfs_layout_hdr *,
+	struct xdr_stream *,
+	const struct nfs4_layoutcommit_args *);
+
+extern void objlayout_encode_layoutreturn(
+	struct pnfs_layout_hdr *,
+	struct xdr_stream *,
+	const struct nfs4_layoutreturn_args *);
 
 #endif /* _OBJLAYOUT_H */
diff --git a/fs/nfs/objlayout/panfs_shim.c b/fs/nfs/objlayout/panfs_shim.c
index fd46e96..9a499a9 100644
--- a/fs/nfs/objlayout/panfs_shim.c
+++ b/fs/nfs/objlayout/panfs_shim.c
@@ -463,8 +463,7 @@ objio_read_pagelist(struct objlayout_io_state *ol_state)
 {
 	struct panfs_shim_io_state *state = container_of(ol_state,
 					struct panfs_shim_io_state, ol_state);
-	struct objlayout_segment *lseg = LSEG_LD_DATA(ol_state->lseg);
-	pan_sm_map_cap_t *mcs = (pan_sm_map_cap_t *)lseg->internal;
+	pan_sm_map_cap_t *mcs = (pan_sm_map_cap_t *)ol_state->objlseg->internal;
 	ssize_t status = 0;
 	pan_status_t rc = PAN_SUCCESS;
 
@@ -544,8 +543,7 @@ objio_write_pagelist(struct objlayout_io_state *ol_state,
 {
 	struct panfs_shim_io_state *state = container_of(ol_state,
 					struct panfs_shim_io_state, ol_state);
-	struct objlayout_segment *lseg = LSEG_LD_DATA(ol_state->lseg);
-	pan_sm_map_cap_t *mcs = (pan_sm_map_cap_t *)lseg->internal;
+	pan_sm_map_cap_t *mcs = (pan_sm_map_cap_t *)ol_state->objlseg->internal;
 	ssize_t status = 0;
 	pan_status_t rc = PAN_SUCCESS;
 
@@ -636,7 +634,8 @@ panlayout_get_stripesize(struct pnfs_layout_hdr *pnfslay)
 
 	list_for_each_entry(lseg, &pnfslay->segs, fi_list) {
 		int n;
-		struct objlayout_segment *panlseg = LSEG_LD_DATA(lseg);
+		struct objlayout_segment *panlseg =
+			container_of(lseg, struct objlayout_segment, lseg);
 		struct pnfs_osd_layout *lo =
 			(struct pnfs_osd_layout *)panlseg->pnfs_osd_layout;
 		struct pnfs_osd_data_map *map = &lo->olo_map;
@@ -688,25 +687,37 @@ panlayout_get_blocksize(void)
 	return sz;
 }
 
-static struct layoutdriver_policy_operations panlayout_policy_operations = {
 /*
  * Don't gather across stripes, but rather gather (coalesce) up to
  * the stripe size.
  *
  * FIXME: change interface to use merge_align, merge_count
  */
-	.flags                 = PNFS_LAYOUTRET_ON_SETATTR,
-	.get_stripesize        = panlayout_get_stripesize,
-	.get_blocksize         = panlayout_get_blocksize,
-};
-
 #define PNFS_LAYOUT_PANOSD (NFS4_PNFS_PRIVATE_LAYOUT | LAYOUT_OSD2_OBJECTS)
 
 static struct pnfs_layoutdriver_type panlayout_type = {
 	.id = PNFS_LAYOUT_PANOSD,
 	.name = "PNFS_LAYOUT_PANOSD",
-	.ld_io_ops = &objlayout_io_operations,
-	.ld_policy_ops = &panlayout_policy_operations,
+	.flags                   = PNFS_LAYOUTRET_ON_SETATTR,
+
+	.initialize_mountpoint   = objlayout_initialize_mountpoint,
+	.uninitialize_mountpoint = objlayout_uninitialize_mountpoint,
+
+	.alloc_layout_hdr        = objlayout_alloc_layout_hdr,
+	.free_layout_hdr         = objlayout_free_layout_hdr,
+
+	.alloc_lseg              = objlayout_alloc_lseg,
+	.free_lseg               = objlayout_free_lseg,
+
+	.get_stripesize          = panlayout_get_stripesize,
+	.get_blocksize           = panlayout_get_blocksize,
+
+	.read_pagelist           = objlayout_read_pagelist,
+	.write_pagelist          = objlayout_write_pagelist,
+	.commit                  = objlayout_commit,
+
+	.encode_layoutcommit	 = objlayout_encode_layoutcommit,
+	.encode_layoutreturn     = objlayout_encode_layoutreturn,
 };
 
 MODULE_DESCRIPTION("pNFS Layout Driver for Panasas OSDs");
@@ -716,10 +727,16 @@ MODULE_LICENSE("GPL");
 static int __init
 panlayout_init(void)
 {
-	pnfs_client_ops = pnfs_register_layoutdriver(&panlayout_type);
-	printk(KERN_INFO "%s: Registered Panasas OSD pNFS Layout Driver\n",
-	       __func__);
-	return 0;
+	int ret = pnfs_register_layoutdriver(&panlayout_type);
+
+	if (ret)
+		printk(KERN_INFO
+			"%s: Registering Panasas OSD pNFS Layout Driver failed: error=%d\n",
+			__func__, ret);
+	else
+		printk(KERN_INFO "%s: Registered Panasas OSD pNFS Layout Driver\n",
+			__func__);
+	return ret;
 }
 
 static void __exit
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index fef61e4..df29296 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -588,6 +588,8 @@ enum pnfs_layouttype {
 	LAYOUT_NFSV4_1_FILES  = 1,
 	LAYOUT_OSD2_OBJECTS = 2,
 	LAYOUT_BLOCK_VOLUME = 3,
+
+	NFS4_PNFS_PRIVATE_LAYOUT = 0x80000000
 };
 
 /* used for both layout return and recall */
diff --git a/include/linux/pnfs_osd_xdr.h b/include/linux/pnfs_osd_xdr.h
index 8fc21b0..b404f33 100644
--- a/include/linux/pnfs_osd_xdr.h
+++ b/include/linux/pnfs_osd_xdr.h
@@ -118,7 +118,7 @@ pnfs_osd_data_map_incore_sz(void)
  *   };
  */
 struct pnfs_osd_objid {
-	struct pnfs_deviceid	oid_device_id;
+	struct nfs4_deviceid	oid_device_id;
 	u64			oid_partition_id;
 	u64			oid_object_id;
 };
@@ -133,7 +133,7 @@ struct pnfs_osd_objid {
 static inline int
 pnfs_osd_objid_xdr_sz(void)
 {
-	return (NFS4_PNFS_DEVICEID4_SIZE / 4) + 2 + 2;
+	return (NFS4_DEVICEID4_SIZE / 4) + 2 + 2;
 }
 
 static inline size_t
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 18/18] SQUASHME: pnfsd-exofs: convert to new pnfs-submit changes
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (16 preceding siblings ...)
  2010-09-29 11:12   ` [PATCH 17/17] SQUASHME: pnfs-obj: convert to new pnfs-submit changes Benny Halevy
@ 2010-09-29 11:12   ` Benny Halevy
  2010-09-29 11:17   ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (4 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:12 UTC (permalink / raw)
  To: linux-nfs

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/exofs/export.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/exofs/export.c b/fs/exofs/export.c
index fe2c3a7..69bce46 100644
--- a/fs/exofs/export.c
+++ b/fs/exofs/export.c
@@ -32,7 +32,7 @@ static int exofs_layout_type(struct super_block *sb)
 	return LAYOUT_OSD2_OBJECTS;
 }
 
-static void set_dev_id(struct pnfs_deviceid *pnfs_devid, u64 sbid, u64 devid)
+static void set_dev_id(struct nfs4_deviceid *pnfs_devid, u64 sbid, u64 devid)
 {
 	struct nfsd4_pnfs_deviceid *dev_id =
 		(struct nfsd4_pnfs_deviceid *)pnfs_devid;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (17 preceding siblings ...)
  2010-09-29 11:12   ` [PATCH 18/18] SQUASHME: pnfsd-exofs: " Benny Halevy
@ 2010-09-29 11:17   ` Benny Halevy
  2010-09-29 11:18   ` [PATCH] pnfs: get layout in proper segments Benny Halevy
                     ` (3 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:17 UTC (permalink / raw)
  To: NFS list

On 2010-09-29 13:06, Benny Halevy wrote:
> This version includes Fred's pnfs-submit RFC patches (v5).
> and is rebased onto v2.6.36-rc6
> 
> Cumulative patches can be generated from
> git://linux-nfs.org/~bhalevy/linux-pnfs.git
> using
> git diff v2.6.36-rc6 pnfs-all-2.6.36-rc6-2010-09-29
> 
> Or, they can be downloaded from the wiki at:
> http://wiki.linux-nfs.org/wiki/index.php/PNFS_Development_Git_tree
> 
> Latest patches (since pnfs-all-2.6.36-rc3-2010-08-30):
> 
> upstream:
>   Boaz Harrosh     cc59b6a um: Proper Fix for f25c80a4: remove duplicate structure field initialization
> 
> pnfs-submit:
>   The pNFS Team    1851dbc RFC: pnfsd, pnfs: protocol level pnfs constants
>   The pNFS Team    a1b60af RFC: nfs: change stateid to be a union
>   The pNFS Team    ff38ee4 RFC: nfs: ask for layouttypes during fsinfo call
>   The pNFS Team    01f09aa RFC: nfs: set layout driver
>   The pNFS Team    f7893b6 RFC: pnfs: full mount/umount infrastructure
>   The pNFS Team    1cef5e0 RFC: pnfs: filelayout: introduce minimal file layout driver
>   The pNFS Team    b7e2a3d RFC: nfs: create and destroy inode's layout cache
>   The pNFS Team    34d2802 RFC: nfs: client needs to maintain list of inodes with active layouts
>   The pNFS Team    292b90e RFC: pnfs: add LAYOUTGET and GETDEVICEINFO infrastructure
>   The pNFS Team    bf610f6 RFC: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure
>   Fred Isaman      068e761 pnfs-submit: revert range simplifications made by submission patches
>   Benny Halevy     7c58c3d SQUASHME: pnfs-submit: add missing include file in nfs4filelayoutdev.c
>   Benny Halevy     9a5956f SQUASHME: move nfs4_deviceid definitions to include/linux/nfs4.h
>   Benny Halevy     bb2afce SQUASHME: pnfs-submit: handle non-pnfs case in set_pnfs_layoutdriver
>   Benny Halevy     998fe4a pnfs-submit: file needs layout commit, server attributes may be stale
>   Benny Halevy     f18cdf8 NFS: clear fsinfo before sendign rpc
> 
> pnfs:

Hmm, one patch escaped the automatic tool.
It seems like its timestamp got changed due to squashing
while rebasing it. :-(

  Benny Halevy     9f05c5a pnfs: get layout in proper segments

>   Benny Halevy     52a6277 pnfs: alloc and free layout_hdr layoutdriver methods
>   Benny Halevy     6dd521e pnfs: allow nfs4_proc_layoutget to sleep on invalid lsegs
>   Benny Halevy     ba1dd5b SQUASHME: pnfs: refactor put_lseg{_locked}
>   Benny Halevy     bb03ecf SQUASHME: pnfs: get rid of lo_waitq
> 
> pnfs-block:
>   Benny Halevy     73b1db9 SQUASHME: pnfsblock: remove obsolete include file from blocklayout.h
>   Benny Halevy     d9ebc26 SQUASHME: pnfsblock: use nfs4_deviceid
>   Benny Halevy     90e2af1 SQUASHME: pnfsblock: no callback ops
>   Benny Halevy     0953b90 SQAUSHME: pnfsblock: no PNFS_NFS_SERVER
>   Benny Halevy     7ab3774 SQUASHME: pnfsblock: no dev_notify_types
>   Benny Halevy     f08f966 SQUASHME: pnfsblock: use new struct pnfs_layout_hdr
> 
> pnfs-obj-all:
>   Benny Halevy     41a70b7 SQUASHME: pnfs-obj: fix REQ flags usage
>   Benny Halevy     6057701 SQUASHME: pnfs-obj: convert to new pnfs-submit changes
> 
> pnfs-exofs-all:
>   Benny Halevy     10d8e6e SQUASHME: pnfsd-exofs: convert to new pnfs-submit changes
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH] pnfs: get layout in proper segments
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (18 preceding siblings ...)
  2010-09-29 11:17   ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
@ 2010-09-29 11:18   ` Benny Halevy
  2010-09-29 14:07   ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Tigran Mkrtchyan
                     ` (2 subsequent siblings)
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 11:18 UTC (permalink / raw)
  To: linux-nfs

Base the LAYOUTGET arguments on the actual required byte ranges
rather than asking for the whole file layout.

Add a check in readpage_async_filler that the layout segment
retrieved in pnfs_pageio_init_read still covers the current page
and if not, try getting a new one.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/file.c |    2 +-
 fs/nfs/pnfs.c |   15 ++++++++-------
 fs/nfs/pnfs.h |    4 ++--
 fs/nfs/read.c |   16 +++++++++++++++-
 4 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 1572817..f650ee3 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -390,7 +390,7 @@ static int nfs_write_begin(struct file *file, struct address_space *mapping,
 
 	lseg = pnfs_update_layout(mapping->host,
 				  nfs_file_open_context(file),
-				  IOMODE_RW);
+				  pos, len, IOMODE_RW);
 start:
 	/*
 	 * Prevent starvation issues if someone is doing a consistency
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index cf84f2c..4edab46 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -598,11 +598,9 @@ send_layoutget(struct pnfs_layout_hdr *lo,
 		pnfs_layoutget_release(lo);
 		return NULL;
 	}
-	lgp->args.minlength = NFS4_MAX_UINT64;
+	lgp->args.minlength = PAGE_CACHE_SIZE;
 	lgp->args.maxcount = PNFS_LAYOUT_MAXSIZE;
-	lgp->args.range.iomode = range->iomode;
-	lgp->args.range.offset = 0;
-	lgp->args.range.length = NFS4_MAX_UINT64;
+	lgp->args.range = *range;
 	lgp->args.type = server->pnfs_curr_ld->id;
 	lgp->args.inode = ino;
 	lgp->args.ctx = get_nfs_open_context(ctx);
@@ -937,12 +935,14 @@ EXPORT_SYMBOL_GPL(pnfs_has_layout);
 struct pnfs_layout_segment *
 pnfs_update_layout(struct inode *ino,
 		   struct nfs_open_context *ctx,
+		   loff_t pos,
+		   u64 count,
 		   enum pnfs_iomode iomode)
 {
 	struct pnfs_layout_range arg = {
 		.iomode = iomode,
-		.offset = 0,
-		.length = NFS4_MAX_UINT64,
+		.offset = pos,
+		.length = count,
 	};
 	struct nfs_inode *nfsi = NFS_I(ino);
 	struct pnfs_layout_hdr *lo;
@@ -1124,7 +1124,8 @@ pnfs_pageio_init_read(struct nfs_pageio_descriptor *pgio,
 	readahead_range(inode, pages, &loff, &count);
 
 	if (count > 0) {
-		pgio->pg_lseg = pnfs_update_layout(inode, ctx, IOMODE_READ);
+		pgio->pg_lseg = pnfs_update_layout(inode, ctx, loff, count,
+						   IOMODE_READ);
 		if (!pgio->pg_lseg)
 			return;
 
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index ee43489..0aac85f 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -195,7 +195,7 @@ struct pnfs_layout_segment *
 pnfs_has_layout(struct pnfs_layout_hdr *lo, struct pnfs_layout_range *range);
 struct pnfs_layout_segment *
 pnfs_update_layout(struct inode *ino, struct nfs_open_context *ctx,
-		   enum pnfs_iomode access_type);
+		   loff_t pos, u64 count, enum pnfs_iomode access_type);
 int _pnfs_return_layout(struct inode *, struct pnfs_layout_range *,
 			const nfs4_stateid *stateid, /* optional */
 			enum pnfs_layoutreturn_type, bool wait);
@@ -327,7 +327,7 @@ static inline void put_lseg_locked(struct pnfs_layout_segment *lseg)
 
 static inline struct pnfs_layout_segment *
 pnfs_update_layout(struct inode *ino, struct nfs_open_context *ctx,
-		   enum pnfs_iomode access_type)
+		   loff_t pos, u64 count, enum pnfs_iomode access_type)
 {
 	return NULL;
 }
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index be29689..e4b12b5 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -122,12 +122,14 @@ int nfs_readpage_async(struct nfs_open_context *ctx, struct inode *inode,
 	LIST_HEAD(one_request);
 	struct nfs_page	*new;
 	unsigned int len;
+	loff_t pgoffs;
 	struct pnfs_layout_segment *lseg;
 
 	len = nfs_page_length(page);
 	if (len == 0)
 		return nfs_return_empty_page(page);
-	lseg = pnfs_update_layout(inode, ctx, IOMODE_READ);
+	pgoffs = (loff_t)page->index << PAGE_CACHE_SHIFT;
+	lseg = pnfs_update_layout(inode, ctx, pgoffs, len, IOMODE_READ);
 	new = nfs_create_request(ctx, inode, page, 0, len, lseg);
 	put_lseg(lseg);
 	if (IS_ERR(new)) {
@@ -601,14 +603,26 @@ readpage_async_filler(void *data, struct page *page)
 {
 	struct nfs_readdesc *desc = (struct nfs_readdesc *)data;
 	struct inode *inode = page->mapping->host;
+	struct pnfs_layout_range *range;
 	struct nfs_page *new;
 	unsigned int len;
+	loff_t pgoff;
 	int error;
 
 	len = nfs_page_length(page);
 	if (len == 0)
 		return nfs_return_empty_page(page);
 
+	pgoff = (loff_t)page->index << PAGE_CACHE_SHIFT;
+	range = desc->pgio->pg_lseg ? &desc->pgio->pg_lseg->range : NULL;
+	if (!range ||
+	    (range->offset > pgoff + len) ||
+	    (range->offset + range->length < pgoff)) {
+		put_lseg(desc->pgio->pg_lseg);
+		desc->pgio->pg_lseg = pnfs_update_layout(inode, desc->ctx,
+			pgoff, len, IOMODE_READ);
+	}
+
 	new = nfs_create_request(desc->ctx, inode, page, 0, len,
 				 desc->pgio->pg_lseg);
 	if (IS_ERR(new))
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (19 preceding siblings ...)
  2010-09-29 11:18   ` [PATCH] pnfs: get layout in proper segments Benny Halevy
@ 2010-09-29 14:07   ` Tigran Mkrtchyan
  2010-09-29 14:09     ` Tigran Mkrtchyan
       [not found]   ` <4CA3C1E2.2050701@RedHat.com>
  2010-10-28 13:36   ` pnfs git tree status pnfs-all-2.6.36-2010-10-28 Benny Halevy
  22 siblings, 1 reply; 58+ messages in thread
From: Tigran Mkrtchyan @ 2010-09-29 14:07 UTC (permalink / raw)
  To: Benny Halevy; +Cc: NFS list

[-- Attachment #1: Type: text/plain, Size: 3430 bytes --]


I am support to publish first kernel crash.....

this is
pnfs-all-2.6.36-rc6-2010-09-29 git c2b3b75c6b1db1dfc3f236200de1763e14c514d8

Regards,
    Tigran.


On 09/29/2010 01:06 PM, Benny Halevy wrote:
> This version includes Fred's pnfs-submit RFC patches (v5).
> and is rebased onto v2.6.36-rc6
>
> Cumulative patches can be generated from
> git://linux-nfs.org/~bhalevy/linux-pnfs.git
> using
> git diff v2.6.36-rc6 pnfs-all-2.6.36-rc6-2010-09-29
>
> Or, they can be downloaded from the wiki at:
> http://wiki.linux-nfs.org/wiki/index.php/PNFS_Development_Git_tree
>
> Latest patches (since pnfs-all-2.6.36-rc3-2010-08-30):
>
> upstream:
>    Boaz Harrosh     cc59b6a um: Proper Fix for f25c80a4: remove duplicate structure field initialization
>
> pnfs-submit:
>    The pNFS Team    1851dbc RFC: pnfsd, pnfs: protocol level pnfs constants
>    The pNFS Team    a1b60af RFC: nfs: change stateid to be a union
>    The pNFS Team    ff38ee4 RFC: nfs: ask for layouttypes during fsinfo call
>    The pNFS Team    01f09aa RFC: nfs: set layout driver
>    The pNFS Team    f7893b6 RFC: pnfs: full mount/umount infrastructure
>    The pNFS Team    1cef5e0 RFC: pnfs: filelayout: introduce minimal file layout driver
>    The pNFS Team    b7e2a3d RFC: nfs: create and destroy inode's layout cache
>    The pNFS Team    34d2802 RFC: nfs: client needs to maintain list of inodes with active layouts
>    The pNFS Team    292b90e RFC: pnfs: add LAYOUTGET and GETDEVICEINFO infrastructure
>    The pNFS Team    bf610f6 RFC: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure
>    Fred Isaman      068e761 pnfs-submit: revert range simplifications made by submission patches
>    Benny Halevy     7c58c3d SQUASHME: pnfs-submit: add missing include file in nfs4filelayoutdev.c
>    Benny Halevy     9a5956f SQUASHME: move nfs4_deviceid definitions to include/linux/nfs4.h
>    Benny Halevy     bb2afce SQUASHME: pnfs-submit: handle non-pnfs case in set_pnfs_layoutdriver
>    Benny Halevy     998fe4a pnfs-submit: file needs layout commit, server attributes may be stale
>    Benny Halevy     f18cdf8 NFS: clear fsinfo before sendign rpc
>
> pnfs:
>    Benny Halevy     52a6277 pnfs: alloc and free layout_hdr layoutdriver methods
>    Benny Halevy     6dd521e pnfs: allow nfs4_proc_layoutget to sleep on invalid lsegs
>    Benny Halevy     ba1dd5b SQUASHME: pnfs: refactor put_lseg{_locked}
>    Benny Halevy     bb03ecf SQUASHME: pnfs: get rid of lo_waitq
>
> pnfs-block:
>    Benny Halevy     73b1db9 SQUASHME: pnfsblock: remove obsolete include file from blocklayout.h
>    Benny Halevy     d9ebc26 SQUASHME: pnfsblock: use nfs4_deviceid
>    Benny Halevy     90e2af1 SQUASHME: pnfsblock: no callback ops
>    Benny Halevy     0953b90 SQAUSHME: pnfsblock: no PNFS_NFS_SERVER
>    Benny Halevy     7ab3774 SQUASHME: pnfsblock: no dev_notify_types
>    Benny Halevy     f08f966 SQUASHME: pnfsblock: use new struct pnfs_layout_hdr
>
> pnfs-obj-all:
>    Benny Halevy     41a70b7 SQUASHME: pnfs-obj: fix REQ flags usage
>    Benny Halevy     6057701 SQUASHME: pnfs-obj: convert to new pnfs-submit changes
>
> pnfs-exofs-all:
>    Benny Halevy     10d8e6e SQUASHME: pnfsd-exofs: convert to new pnfs-submit changes
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-- Attachment #2: crash --]
[-- Type: text/plain, Size: 3689 bytes --]

[   71.450371] FS-Cache: Loaded
[   71.504142] FS-Cache: Netfs 'nfs' registered for caching
[   71.553022] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[  110.788743] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
[  110.788749] IP: [<ffffffffa006d416>] filelayout_get_stripesize+0x26/0x40 [nfs_layout_nfsv41_files]
[  110.788760] PGD 32b54067 PUD 2321a067 PMD 0 
[  110.788764] Oops: 0000 [#1] SMP 
[  110.788766] last sysfs file: /sys/block/sda/sda1/stat
[  110.788769] CPU 0 
[  110.788770] Modules linked in: nfs_layout_nfsv41_files nfs lockd fscache nfs_acl auth_rpcgss sunrpc ipv6 af_packet binfmt_misc dm_mirror dm_multipath scsi_dh video output sbs sbshc pci_slot fan container battery lp ac sg option usb_wwan usbserial thermal thermal_sys button parport_pc serio_raw parport tpm_tis tpm tpm_bios i2c_piix4 e1000 pata_mpiix dm_region_hash dm_log dm_mod [last unloaded: mperf]
[  110.788794] 
[  110.788797] Pid: 2162, comm: ls Not tainted 2.6.36-rc6.pnfs.1 #1 /VirtualBox
[  110.788799] RIP: 0010:[<ffffffffa006d416>]  [<ffffffffa006d416>] filelayout_get_stripesize+0x26/0x40 [nfs_layout_nfsv41_files]
[  110.788804] RSP: 0018:ffff880023219cc8  EFLAGS: 00010296
[  110.788807] RAX: 0000000000000000 RBX: ffffffffa006fa00 RCX: 7fffffffffffffff
[  110.788809] RDX: 0000000000002726 RSI: ffff880023219cc8 RDI: ffff88003ec892c0
[  110.788811] RBP: ffff880022851330 R08: 0000000000000000 R09: ffff880022851448
[  110.788813] R10: 0000000000000001 R11: ffffffffa0228570 R12: ffff8800228513dc
[  110.788815] R13: ffff880023219d50 R14: ffff880022851448 R15: ffff880022851150
[  110.788823] FS:  00007f9387c5a710(0000) GS:ffff880001800000(0000) knlGS:0000000000000000
[  110.788826] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  110.788828] CR2: 0000000000000040 CR3: 0000000026f2e000 CR4: 00000000000006f0
[  110.788834] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  110.788837] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  110.788840] Process ls (pid: 2162, threadinfo ffff880023218000, task ffff880028372e30)
[  110.788841] Stack:
[  110.788842]  ffff880000000001 0000000000000000 ffffffffffffffff ffffffff810d7864
[  110.788845] <0> ffffffffa006fa00 ffffffffa024a28e ffff880023219d78 ffff880022851330
[  110.788849] <0> ffff88002316a400 ffffffffa024b638 ffff880022851330 ffff880022851330
[  110.788853] Call Trace:
[  110.788858]  [<ffffffff810d7864>] ? do_lookup+0xb4/0x170
[  110.788882]  [<ffffffffa024a28e>] ? pnfs_getboundary+0x6e/0x80 [nfs]
[  110.788892]  [<ffffffffa024b638>] ? pnfs_pageio_init_write+0x78/0xa0 [nfs]
[  110.788901]  [<ffffffffa022725f>] ? nfs_pageio_init_write+0x3f/0x90 [nfs]
[  110.788909]  [<ffffffffa02285f0>] ? nfs_writepages+0x80/0x130 [nfs]
[  110.788913]  [<ffffffff810dac2a>] ? path_walk+0x6a/0xd0
[  110.788917]  [<ffffffff810949d4>] ? __filemap_fdatawrite_range+0x54/0x60
[  110.788920]  [<ffffffff81094c35>] ? filemap_write_and_wait+0x35/0x50
[  110.788928]  [<ffffffffa021b904>] ? nfs_getattr+0xf4/0x100 [nfs]
[  110.788932]  [<ffffffff810d267a>] ? vfs_fstatat+0x6a/0x80
[  110.788935]  [<ffffffff810d271f>] ? sys_newlstat+0x1f/0x50
[  110.788938]  [<ffffffff81002c6b>] ? system_call_fastpath+0x16/0x1b
[  110.788940] Code: 80 00 00 00 00 53 48 83 ec 20 48 89 e6 c7 04 24 01 00 00 00 48 c7 44 24 08 00 00 00 00 48 c7 44 24 10 ff ff ff ff e8 9a d2 1d 00 <8b> 58 40 48 89 c7 e8 0f d6 1d 00 48 83 c4 20 48 89 d8 5b c3 66 
[  110.788965] RIP  [<ffffffffa006d416>] filelayout_get_stripesize+0x26/0x40 [nfs_layout_nfsv41_files]
[  110.788969]  RSP <ffff880023219cc8>
[  110.788971] CR2: 0000000000000040
[  110.788973] ---[ end trace f509369417b82255 ]---

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-29 14:07   ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Tigran Mkrtchyan
@ 2010-09-29 14:09     ` Tigran Mkrtchyan
  2010-09-29 14:22       ` Benny Halevy
  0 siblings, 1 reply; 58+ messages in thread
From: Tigran Mkrtchyan @ 2010-09-29 14:09 UTC (permalink / raw)
  To: Benny Halevy; +Cc: NFS list

  On 09/29/2010 04:07 PM, Tigran Mkrtchyan wrote:
>
> I am support to publish first kernel crash.....
sorry to publish....

>
> this is
> pnfs-all-2.6.36-rc6-2010-09-29 git 
> c2b3b75c6b1db1dfc3f236200de1763e14c514d8
>
> Regards,
>    Tigran.
>
>
> On 09/29/2010 01:06 PM, Benny Halevy wrote:
>> This version includes Fred's pnfs-submit RFC patches (v5).
>> and is rebased onto v2.6.36-rc6
>>
>> Cumulative patches can be generated from
>> git://linux-nfs.org/~bhalevy/linux-pnfs.git
>> using
>> git diff v2.6.36-rc6 pnfs-all-2.6.36-rc6-2010-09-29
>>
>> Or, they can be downloaded from the wiki at:
>> http://wiki.linux-nfs.org/wiki/index.php/PNFS_Development_Git_tree
>>
>> Latest patches (since pnfs-all-2.6.36-rc3-2010-08-30):
>>
>> upstream:
>>    Boaz Harrosh     cc59b6a um: Proper Fix for f25c80a4: remove 
>> duplicate structure field initialization
>>
>> pnfs-submit:
>>    The pNFS Team    1851dbc RFC: pnfsd, pnfs: protocol level pnfs 
>> constants
>>    The pNFS Team    a1b60af RFC: nfs: change stateid to be a union
>>    The pNFS Team    ff38ee4 RFC: nfs: ask for layouttypes during 
>> fsinfo call
>>    The pNFS Team    01f09aa RFC: nfs: set layout driver
>>    The pNFS Team    f7893b6 RFC: pnfs: full mount/umount infrastructure
>>    The pNFS Team    1cef5e0 RFC: pnfs: filelayout: introduce minimal 
>> file layout driver
>>    The pNFS Team    b7e2a3d RFC: nfs: create and destroy inode's 
>> layout cache
>>    The pNFS Team    34d2802 RFC: nfs: client needs to maintain list 
>> of inodes with active layouts
>>    The pNFS Team    292b90e RFC: pnfs: add LAYOUTGET and 
>> GETDEVICEINFO infrastructure
>>    The pNFS Team    bf610f6 RFC: pnfs: filelayout: add driver's 
>> LAYOUTGET and GETDEVICEINFO infrastructure
>>    Fred Isaman      068e761 pnfs-submit: revert range simplifications 
>> made by submission patches
>>    Benny Halevy     7c58c3d SQUASHME: pnfs-submit: add missing 
>> include file in nfs4filelayoutdev.c
>>    Benny Halevy     9a5956f SQUASHME: move nfs4_deviceid definitions 
>> to include/linux/nfs4.h
>>    Benny Halevy     bb2afce SQUASHME: pnfs-submit: handle non-pnfs 
>> case in set_pnfs_layoutdriver
>>    Benny Halevy     998fe4a pnfs-submit: file needs layout commit, 
>> server attributes may be stale
>>    Benny Halevy     f18cdf8 NFS: clear fsinfo before sendign rpc
>>
>> pnfs:
>>    Benny Halevy     52a6277 pnfs: alloc and free layout_hdr 
>> layoutdriver methods
>>    Benny Halevy     6dd521e pnfs: allow nfs4_proc_layoutget to sleep 
>> on invalid lsegs
>>    Benny Halevy     ba1dd5b SQUASHME: pnfs: refactor put_lseg{_locked}
>>    Benny Halevy     bb03ecf SQUASHME: pnfs: get rid of lo_waitq
>>
>> pnfs-block:
>>    Benny Halevy     73b1db9 SQUASHME: pnfsblock: remove obsolete 
>> include file from blocklayout.h
>>    Benny Halevy     d9ebc26 SQUASHME: pnfsblock: use nfs4_deviceid
>>    Benny Halevy     90e2af1 SQUASHME: pnfsblock: no callback ops
>>    Benny Halevy     0953b90 SQAUSHME: pnfsblock: no PNFS_NFS_SERVER
>>    Benny Halevy     7ab3774 SQUASHME: pnfsblock: no dev_notify_types
>>    Benny Halevy     f08f966 SQUASHME: pnfsblock: use new struct 
>> pnfs_layout_hdr
>>
>> pnfs-obj-all:
>>    Benny Halevy     41a70b7 SQUASHME: pnfs-obj: fix REQ flags usage
>>    Benny Halevy     6057701 SQUASHME: pnfs-obj: convert to new 
>> pnfs-submit changes
>>
>> pnfs-exofs-all:
>>    Benny Halevy     10d8e6e SQUASHME: pnfsd-exofs: convert to new 
>> pnfs-submit changes
>>
>> -- 
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-29 14:09     ` Tigran Mkrtchyan
@ 2010-09-29 14:22       ` Benny Halevy
  2010-09-29 14:36         ` Tigran Mkrtchyan
  2010-09-30  8:30         ` Benny Halevy
  0 siblings, 2 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 14:22 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: NFS list

On 2010-09-29 16:09, Tigran Mkrtchyan wrote:
>   On 09/29/2010 04:07 PM, Tigran Mkrtchyan wrote:
>>
>> I am support to publish first kernel crash.....
> sorry to publish....
> 
>>
>> this is
>> pnfs-all-2.6.36-rc6-2010-09-29 git 
>> c2b3b75c6b1db1dfc3f236200de1763e14c514d8
>>
>> Regards,
>>    Tigran.
>>
>>

Thanks for testing!
Does the following patch help?

git diff --stat -p -M
 fs/nfs/nfs4filelayout.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 75e07c8..8fbb0db 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -636,6 +636,8 @@ filelayout_get_stripesize(struct pnfs_layout_hdr *lo)
 
 	/* Horrible hack...ideally upper layer would send lseg */
 	lseg = pnfs_has_layout(lo, &range);
+	if (!lseg)
+		return 0;
 	fl = container_of(lseg, struct nfs4_filelayout_segment, generic_hdr);
 	size = fl->stripe_unit;
 	put_lseg_locked(lseg);

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-29 14:22       ` Benny Halevy
@ 2010-09-29 14:36         ` Tigran Mkrtchyan
  2010-09-29 15:25           ` Benny Halevy
  2010-09-30  8:30         ` Benny Halevy
  1 sibling, 1 reply; 58+ messages in thread
From: Tigran Mkrtchyan @ 2010-09-29 14:36 UTC (permalink / raw)
  To: Benny Halevy; +Cc: NFS list

  On 09/29/2010 04:22 PM, Benny Halevy wrote:
> On 2010-09-29 16:09, Tigran Mkrtchyan wrote:
>>    On 09/29/2010 04:07 PM, Tigran Mkrtchyan wrote:
>>> I am support to publish first kernel crash.....
>> sorry to publish....
>>
>>> this is
>>> pnfs-all-2.6.36-rc6-2010-09-29 git
>>> c2b3b75c6b1db1dfc3f236200de1763e14c514d8
>>>
>>> Regards,
>>>     Tigran.
>>>
>>>
> Thanks for testing!
> Does the following patch help?
>

No :(

> git diff --stat -p -M
>   fs/nfs/nfs4filelayout.c |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
> index 75e07c8..8fbb0db 100644
> --- a/fs/nfs/nfs4filelayout.c
> +++ b/fs/nfs/nfs4filelayout.c
> @@ -636,6 +636,8 @@ filelayout_get_stripesize(struct pnfs_layout_hdr *lo)
>
>   	/* Horrible hack...ideally upper layer would send lseg */
>   	lseg = pnfs_has_layout(lo,&range);
> +	if (!lseg)
> +		return 0;
>   	fl = container_of(lseg, struct nfs4_filelayout_segment, generic_hdr);
>   	size = fl->stripe_unit;
>   	put_lseg_locked(lseg);


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-29 14:36         ` Tigran Mkrtchyan
@ 2010-09-29 15:25           ` Benny Halevy
  2010-09-29 16:57             ` Tigran Mkrtchyan
  2010-09-30  7:58             ` Tigran Mkrtchyan
  0 siblings, 2 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-29 15:25 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: NFS list

On 2010-09-29 16:36, Tigran Mkrtchyan wrote:
>   On 09/29/2010 04:22 PM, Benny Halevy wrote:
>> On 2010-09-29 16:09, Tigran Mkrtchyan wrote:
>>>    On 09/29/2010 04:07 PM, Tigran Mkrtchyan wrote:
>>>> I am support to publish first kernel crash.....
>>> sorry to publish....
>>>
>>>> this is
>>>> pnfs-all-2.6.36-rc6-2010-09-29 git
>>>> c2b3b75c6b1db1dfc3f236200de1763e14c514d8
>>>>
>>>> Regards,
>>>>     Tigran.
>>>>
>>>>
>> Thanks for testing!
>> Does the following patch help?
>>
> 
> No :(
> 

Tigran, do you have a new trace maybe?
I cross referenced the dump you sent to the
disassembled code and it seems like it hit NULL dereference on 
size = fl->stripe_unit;

I'm going to commit this patch anyway but I want to
understand what else I missed...

Benny

>> git diff --stat -p -M
>>   fs/nfs/nfs4filelayout.c |    2 ++
>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
>> index 75e07c8..8fbb0db 100644
>> --- a/fs/nfs/nfs4filelayout.c
>> +++ b/fs/nfs/nfs4filelayout.c
>> @@ -636,6 +636,8 @@ filelayout_get_stripesize(struct pnfs_layout_hdr *lo)
>>
>>   	/* Horrible hack...ideally upper layer would send lseg */
>>   	lseg = pnfs_has_layout(lo,&range);
>> +	if (!lseg)
>> +		return 0;
>>   	fl = container_of(lseg, struct nfs4_filelayout_segment, generic_hdr);
>>   	size = fl->stripe_unit;
>>   	put_lseg_locked(lseg);
> 

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-29 15:25           ` Benny Halevy
@ 2010-09-29 16:57             ` Tigran Mkrtchyan
  2010-09-29 18:35               ` Fred Isaman
  2010-09-30  7:58             ` Tigran Mkrtchyan
  1 sibling, 1 reply; 58+ messages in thread
From: Tigran Mkrtchyan @ 2010-09-29 16:57 UTC (permalink / raw)
  To: Benny Halevy; +Cc: NFS list

[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]


> Tigran, do you have a new trace maybe?
> I cross referenced the dump you sent to the
> disassembled code and it seems like it hit NULL dereference on
> size = fl->stripe_unit;
>
> I'm going to commit this patch anyway but I want to
> understand what else I missed...
>
> Benny
>

The stack attached.  Shall I compile the kernel with some debug options 
for better debugging?

Tigran.
>>> git diff --stat -p -M
>>>    fs/nfs/nfs4filelayout.c |    2 ++
>>>    1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
>>> index 75e07c8..8fbb0db 100644
>>> --- a/fs/nfs/nfs4filelayout.c
>>> +++ b/fs/nfs/nfs4filelayout.c
>>> @@ -636,6 +636,8 @@ filelayout_get_stripesize(struct pnfs_layout_hdr *lo)
>>>
>>>    	/* Horrible hack...ideally upper layer would send lseg */
>>>    	lseg = pnfs_has_layout(lo,&range);
>>> +	if (!lseg)
>>> +		return 0;
>>>    	fl = container_of(lseg, struct nfs4_filelayout_segment, generic_hdr);
>>>    	size = fl->stripe_unit;
>>>    	put_lseg_locked(lseg);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-- Attachment #2: crash --]
[-- Type: text/plain, Size: 26897 bytes --]

[    0.000000] Linux version 2.6.36-rc6.pnfs.1 (root@slinux) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Wed Sep 29 15:13:40 CEST 2010
[    0.000000] Command line: ro root=/dev/sda1
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 000000003fff0000 (usable)
[    0.000000]  BIOS-e820: 000000003fff0000 - 0000000040000000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] DMI 2.5 present.
[    0.000000] e820 update range: 0000000000000000 - 0000000000001000 (usable) ==> (reserved)
[    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
[    0.000000] No AGP bridge found
[    0.000000] last_pfn = 0x3fff0 max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR variable ranges disabled:
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] CPU MTRRs all blank - virtualized system.
[    0.000000] e820 update range: 0000000000001000 - 0000000000010000 (usable) ==> (reserved)
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] modified physical RAM map:
[    0.000000]  modified: 0000000000000000 - 0000000000010000 (reserved)
[    0.000000]  modified: 0000000000010000 - 000000000009fc00 (usable)
[    0.000000]  modified: 000000000009fc00 - 00000000000a0000 (reserved)
[    0.000000]  modified: 00000000000f0000 - 0000000000100000 (reserved)
[    0.000000]  modified: 0000000000100000 - 000000003fff0000 (usable)
[    0.000000]  modified: 000000003fff0000 - 0000000040000000 (ACPI data)
[    0.000000]  modified: 00000000fffc0000 - 0000000100000000 (reserved)
[    0.000000] initial memory mapped : 0 - 20000000
[    0.000000] init_memory_mapping: 0000000000000000-000000003fff0000
[    0.000000]  0000000000 - 003fe00000 page 2M
[    0.000000]  003fe00000 - 003fff0000 page 4k
[    0.000000] kernel direct mapping tables up to 3fff0000 @ 16000-19000
[    0.000000] RAMDISK: 37db7000 - 37ff0000
[    0.000000] ACPI: RSDP 00000000000e0000 00024 (v02 VBOX  )
[    0.000000] ACPI: XSDT 000000003fff0030 0003C (v01 VBOX   VBOXXSDT 00000001 ASL  00000061)
[    0.000000] ACPI: FACP 000000003fff00f0 000F4 (v04 VBOX   VBOXFACP 00000001 ASL  00000061)
[    0.000000] ACPI: DSDT 000000003fff0460 018FF (v01 VBOX   VBOXBIOS 00000002 INTL 20081031)
[    0.000000] ACPI: FACS 000000003fff0200 00040
[    0.000000] ACPI: APIC 000000003fff0240 0004A (v02 VBOX   VBOXAPIC 00000001 ASL  00000061)
[    0.000000] ACPI: SSDT 000000003fff0290 001CC (v01 VBOX   VBOXCPUT 00000002 INTL 20081031)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at 0000000000000000-000000003fff0000
[    0.000000] Initmem setup node 0 0000000000000000-000000003fff0000
[    0.000000]   NODE_DATA [000000000174b080 - 000000000175f07f]
[    0.000000]  [ffffea0000000000-ffffea0000dfffff] PMD -> [ffff880002000000-ffff880002dfffff] on node 0
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000010 -> 0x00001000
[    0.000000]   DMA32    0x00001000 -> 0x00100000
[    0.000000]   Normal   empty
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[2] active PFN ranges
[    0.000000]     0: 0x00000010 -> 0x0000009f
[    0.000000]     0: 0x00000100 -> 0x0003fff0
[    0.000000] On node 0 totalpages: 262015
[    0.000000]   DMA zone: 56 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 3927 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 3528 pages used for memmap
[    0.000000]   DMA32 zone: 254504 pages, LIFO batch:31
[    0.000000] ACPI: PM-Timer IO Port: 0x4008
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[    0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[    0.000000] nr_irqs_gsi: 40
[    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000f0000
[    0.000000] PM: Registered nosave memory: 00000000000f0000 - 0000000000100000
[    0.000000] Allocating PCI resources starting at 40000000 (gap: 40000000:bffc0000)
[    0.000000] setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:1 nr_node_ids:1
[    0.000000] early_res array is doubled to 64 at [17000 - 177ff]
[    0.000000] PERCPU: Embedded 26 pages/cpu @ffff880001800000 s77440 r8192 d20864 u2097152
[    0.000000] pcpu-alloc: s77440 r8192 d20864 u2097152 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 258431
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: ro root=/dev/sda1
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Calgary: detecting Calgary via BIOS EBDA area
[    0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
[    0.000000] Subtract (37 early reservations)
[    0.000000]   #1 [0001000000 - 000174aad0]   TEXT DATA BSS
[    0.000000]   #2 [0037db7000 - 0037ff0000]         RAMDISK
[    0.000000]   #3 [000009fc00 - 0000100000]   BIOS reserved
[    0.000000]   #4 [000174b000 - 000174b071]             BRK
[    0.000000]   #5 [0000010000 - 0000012000]      TRAMPOLINE
[    0.000000]   #6 [0000012000 - 0000016000]     ACPI WAKEUP
[    0.000000]   #7 [0000016000 - 0000017000]         PGTABLE
[    0.000000]   #8 [000174b080 - 000175f080]       NODE_DATA
[    0.000000]   #9 [000175f080 - 0001760080]         BOOTMEM
[    0.000000]   #10 [000174ab00 - 000174abc0]         BOOTMEM
[    0.000000]   #11 [0001f61000 - 0001f62000]         BOOTMEM
[    0.000000]   #12 [0001f62000 - 0001f63000]         BOOTMEM
[    0.000000]   #13 [0002000000 - 0002e00000]        MEMMAP 0
[    0.000000]   #14 [000174abc0 - 000174ad40]         BOOTMEM
[    0.000000]   #15 [0001760080 - 0001766080]         BOOTMEM
[    0.000000]   #16 [0001767000 - 0001768000]         BOOTMEM
[    0.000000]   #17 [000174ad40 - 000174ad83]         BOOTMEM
[    0.000000]   #18 [000174adc0 - 000174af48]         BOOTMEM
[    0.000000]   #19 [000174af80 - 000174afe8]         BOOTMEM
[    0.000000]   #20 [0001766080 - 00017660e8]         BOOTMEM
[    0.000000]   #21 [0001766100 - 0001766168]         BOOTMEM
[    0.000000]   #22 [0001766180 - 00017661e8]         BOOTMEM
[    0.000000]   #23 [0001766200 - 0001766268]         BOOTMEM
[    0.000000]   #24 [0001766280 - 00017662e8]         BOOTMEM
[    0.000000]   #25 [0001766300 - 0001766320]         BOOTMEM
[    0.000000]   #26 [0001766340 - 0001766352]         BOOTMEM
[    0.000000]   #27 [0001766380 - 0001766392]         BOOTMEM
[    0.000000]   #28 [0001800000 - 000181a000]         BOOTMEM
[    0.000000]   #29 [00017663c0 - 00017663c8]         BOOTMEM
[    0.000000]   #30 [0001766400 - 0001766408]         BOOTMEM
[    0.000000]   #31 [0001766440 - 0001766444]         BOOTMEM
[    0.000000]   #32 [0001766480 - 0001766488]         BOOTMEM
[    0.000000]   #33 [00017664c0 - 0001766610]         BOOTMEM
[    0.000000]   #34 [0001766640 - 00017666c0]         BOOTMEM
[    0.000000]   #35 [00017666c0 - 0001766740]         BOOTMEM
[    0.000000]   #36 [0001768000 - 0001770000]         BOOTMEM
[    0.000000] Memory: 1023692k/1048512k available (3608k kernel code, 452k absent, 24368k reserved, 1767k data, 1424k init)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU-based detection of stalled CPUs is disabled.
[    0.000000] 	Verbose stalled-CPUs detection is disabled.
[    0.000000] NR_IRQS:4352 nr_irqs:256
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] Fast TSC calibration failed
[    0.000000] TSC: Unable to calibrate against PIT
[    0.000000] TSC: using PMTIMER reference calibration
[    0.000000] Detected 2967.716 MHz processor.
[    0.060004] Calibrating delay loop (skipped), value calculated using timer frequency.. 5935.43 BogoMIPS (lpj=29677160)
[    0.061727] pid_max: default: 32768 minimum: 301
[    0.062580] Security Framework initialized
[    0.063365] SELinux:  Disabled at boot.
[    0.064218] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.065693] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.066796] Mount-cache hash table entries: 256
[    0.067795] mce: CPU supports 0 MCE banks
[    0.068608] using mwait in idle threads.
[    0.070008] Performance Events: unsupported p6 CPU model 23 no PMU driver, software events only.
[    0.071920] SMP alternatives: switching to UP code
[    0.249921] Freeing SMP alternatives: 16k freed
[    0.250036] ACPI: Core revision 20100702
[    0.251628] Setting APIC routing to flat
[    0.260466] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.367454] CPU0: Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz stepping 0a
[    0.370891] Brought up 1 CPUs
[    0.371642] Total of 1 processors activated (5935.43 BogoMIPS).
[    0.373027] devtmpfs: initialized
[    0.374377] Time: 14:33:56  Date: 09/29/10
[    0.375266] NET: Registered protocol family 16
[    0.376135] ACPI: bus type pci registered
[    0.376984] PCI: Using configuration type 1 for base access
[    0.381469] bio: create slab <bio-0> at 0
[    0.382668] ACPI: EC: Look up EC in DSDT
[    0.385540] ACPI: Interpreter enabled
[    0.386292] ACPI: (supports S0 S5)
[    0.387245] ACPI: Using IOAPIC for interrupt routing
[    0.390488] ACPI: No dock devices found.
[    0.391253] PCI: Ignoring host bridge windows from ACPI; if necessary, use "pci=use_crs" and report a bug
[    0.392820] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.393815] pci_root PNP0A03:00: host bridge window [io  0x0000-0x0cf7] (ignored)
[    0.393817] pci_root PNP0A03:00: host bridge window [io  0x0d00-0xffff] (ignored)
[    0.393819] pci_root PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff] (ignored)
[    0.393821] pci_root PNP0A03:00: host bridge window [mem 0x40000000-0xffdfffff] (ignored)
[    0.396556] pci 0000:00:02.0: reg 10: [mem 0xe0000000-0xe0ffffff pref]
[    0.408169] pci 0000:00:03.0: reg 10: [mem 0xf0000000-0xf001ffff]
[    0.411246] pci 0000:00:03.0: reg 18: [io  0xd000-0xd007]
[    0.417059] pci 0000:00:04.0: reg 10: [io  0xd020-0xd03f]
[    0.417929] pci 0000:00:04.0: reg 14: [mem 0xf0400000-0xf07fffff]
[    0.418686] pci 0000:00:04.0: reg 18: [mem 0xf0800000-0xf0803fff pref]
[    0.422034] pci 0000:00:05.0: reg 10: [io  0xd100-0xd1ff]
[    0.422118] pci 0000:00:05.0: reg 14: [io  0xd200-0xd23f]
[    0.423395] pci 0000:00:06.0: reg 10: [mem 0xf0804000-0xf0804fff]
[    0.430238] pci 0000:00:0b.0: reg 10: [mem 0xf0805000-0xf0805fff]
[    0.436912] pci 0000:00:0d.0: reg 10: [io  0xd240-0xd247]
[    0.438749] pci 0000:00:0d.0: reg 18: [io  0xd250-0xd257]
[    0.440306] pci 0000:00:0d.0: reg 20: [io  0xd260-0xd26f]
[    0.441817] pci 0000:00:0d.0: reg 24: [mem 0xf0806000-0xf0807fff]
[    0.443377] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    0.446525] ACPI: PCI Interrupt Link [LNKA] (IRQs *5 9 10 11)
[    0.450069] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 9 10 *11)
[    0.451700] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 9 *10 11)
[    0.453291] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 *9 10 11)
[    0.455297] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    0.456744] vgaarb: loaded
[    0.457724] SCSI subsystem initialized
[    0.460110] libata version 3.00 loaded.
[    0.460226] usbcore: registered new interface driver usbfs
[    0.461110] usbcore: registered new interface driver hub
[    0.462009] usbcore: registered new device driver usb
[    0.462957] PCI: Using ACPI for IRQ routing
[    0.463741] PCI: pci_cache_line_size set to 64 bytes
[    0.463963] reserve RAM buffer: 000000000009fc00 - 000000000009ffff 
[    0.463969] reserve RAM buffer: 000000003fff0000 - 000000003fffffff 
[    0.464238] Switching to clocksource tsc
[    0.465211] pnp: PnP ACPI init
[    0.465950] ACPI: bus type pnp registered
[    0.467526] pnp: PnP ACPI: found 5 devices
[    0.468302] ACPI: ACPI bus type pnp unregistered
[    0.470080] pci_bus 0000:00: resource 0 [io  0x0000-0xffff]
[    0.470083] pci_bus 0000:00: resource 1 [mem 0x00000000-0xffffffffffffffff]
[    0.470151] NET: Registered protocol family 2
[    0.471161] IP route cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.473159] TCP established hash table entries: 131072 (order: 9, 2097152 bytes)
[    0.476163] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    0.477569] TCP: Hash tables configured (established 131072 bind 65536)
[    0.478514] TCP reno registered
[    0.479258] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.480245] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.481305] NET: Registered protocol family 1
[    0.482121] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[    0.483029] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[    0.483941] pci 0000:00:02.0: Boot video device
[    0.484107] PCI: CLS 64 bytes, default 64
[    0.484197] Unpacking initramfs...
[    0.521689] Freeing initrd memory: 2276k freed
[    0.523224] platform rtc_cmos: registered platform RTC device (no PNP device found)
[    0.524853] Scanning for low memory corruption every 60 seconds
[    0.525929] audit: initializing netlink socket (disabled)
[    0.526806] type=2000 audit(1285770835.520:1): initialized
[    0.530414] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.531606] msgmni has been set to 2003
[    0.532444] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.533855] io scheduler noop registered
[    0.534610] io scheduler deadline registered
[    0.540873] io scheduler cfq registered (default)
[    0.541762] pci-stub: invalid id string ""
[    0.542743] Non-volatile memory driver v1.3
[    0.543521] Linux agpgart interface v0.103
[    0.544310] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.545579] ahci 0000:00:0d.0: version 3.0
[    0.545600]   alloc irq_desc for 21 on node -1
[    0.545602]   alloc kstat_irqs on node -1
[    0.545633] ahci 0000:00:0d.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[    0.546677] ahci: SSS flag set, parallel bus scan disabled
[    0.547674] ahci 0000:00:0d.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
[    0.549112] ahci 0000:00:0d.0: flags: 64bit ncq stag only ccc 
[    0.550340] scsi0 : ahci
[    0.551080] ata1: SATA max UDMA/133 abar m8192@0xf0806000 port 0xf0806100 irq 21
[    0.552528] Fixed MDIO Bus: probed
[    0.553275] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.554206]   alloc irq_desc for 19 on node -1
[    0.554207]   alloc kstat_irqs on node -1
[    0.554233] ehci_hcd 0000:00:0b.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[    0.555235] ehci_hcd 0000:00:0b.0: EHCI Host Controller
[    0.556101] ehci_hcd 0000:00:0b.0: new USB bus registered, assigned bus number 1
[    0.557749] ehci_hcd 0000:00:0b.0: irq 19, io mem 0xf0805000
[    0.575743] ehci_hcd 0000:00:0b.0: USB 2.0 started, EHCI 1.00
[    0.576807] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.577807] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.579198] usb usb1: Product: EHCI Host Controller
[    0.581031] usb usb1: Manufacturer: Linux 2.6.36-rc6.pnfs.1 ehci_hcd
[    0.581984] usb usb1: SerialNumber: 0000:00:0b.0
[    0.583257] hub 1-0:1.0: USB hub found
[    0.586446] hub 1-0:1.0: 8 ports detected
[    0.587771] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.590158]   alloc irq_desc for 22 on node -1
[    0.590161]   alloc kstat_irqs on node -1
[    0.590202] ohci_hcd 0000:00:06.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[    0.591598] ohci_hcd 0000:00:06.0: OHCI Host Controller
[    0.592525] ohci_hcd 0000:00:06.0: new USB bus registered, assigned bus number 2
[    0.594096] ohci_hcd 0000:00:06.0: irq 22, io mem 0xf0804000
[    0.656033] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[    0.656944] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.658322] usb usb2: Product: OHCI Host Controller
[    0.659144] usb usb2: Manufacturer: Linux 2.6.36-rc6.pnfs.1 ohci_hcd
[    0.660156] usb usb2: SerialNumber: 0000:00:06.0
[    0.661060] hub 2-0:1.0: USB hub found
[    0.661836] hub 2-0:1.0: 8 ports detected
[    0.662854] uhci_hcd: USB Universal Host Controller Interface driver
[    0.663792] Initializing USB Mass Storage driver...
[    0.664637] usbcore: registered new interface driver usb-storage
[    0.665538] USB Mass Storage support registered.
[    0.666356] usbcore: registered new interface driver libusual
[    0.667228] usbcore: registered new interface driver ums-alauda
[    0.668113] usbcore: registered new interface driver ums-cypress
[    0.669001] usbcore: registered new interface driver ums-datafab
[    0.669967] usbcore: registered new interface driver ums-freecom
[    0.671485] usbcore: registered new interface driver ums-isd200
[    0.672379] usbcore: registered new interface driver ums-jumpshot
[    0.673282] usbcore: registered new interface driver ums-karma
[    0.674169] usbcore: registered new interface driver ums-onetouch
[    0.675076] usbcore: registered new interface driver ums-sddr09
[    0.675964] usbcore: registered new interface driver ums-sddr55
[    0.676852] usbcore: registered new interface driver ums-usbat
[    0.677787] PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12
[    0.680009] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.680854] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.681745] mice: PS/2 mouse device common for all mice
[    0.682889] input: AT Translated Set 2 keyboard as /class/input/input0
[    0.684218] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
[    0.685239] rtc0: alarms up to one day, 114 bytes nvram
[    0.686104] cpuidle: using governor ladder
[    0.686876] cpuidle: using governor menu
[    0.691220] input: ImExPS/2 Generic Explorer Mouse as /class/input/input1
[    0.692358] usbcore: registered new interface driver hiddev
[    0.693251] usbcore: registered new interface driver usbhid
[    0.694189] usbhid: USB HID core driver
[    0.695102] TCP cubic registered
[    0.695828] lib80211: common routines for IEEE802.11 drivers
[    0.696680] lib80211_crypt: registered algorithm 'NULL'
[    0.696682] Registering the dns_resolver key type
[    0.697576] PM: Resume from disk failed.
[    0.697798]   Magic number: 10:711:587
[    0.698619] rtc_cmos rtc_cmos: setting system clock to 2010-09-29 14:33:56 UTC (1285770836)
[    0.904997] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    0.906547] ata1.00: ATA-6: VBOX HARDDISK, 1.0, max UDMA/133
[    0.907856] ata1.00: 35072000 sectors, multi 128: LBA48 NCQ (depth 31/32)
[    0.909418] ata1.00: configured for UDMA/133
[    0.910959] scsi 0:0:0:0: Direct-Access     ATA      VBOX HARDDISK    1.0  PQ: 0 ANSI: 5
[    0.913642] sd 0:0:0:0: [sda] 35072000 512-byte logical blocks: (17.9 GB/16.7 GiB)
[    0.915094] sd 0:0:0:0: [sda] Write Protect is off
[    0.915977] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    0.915993] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    0.918990]  sda: sda1
[    0.920179] sd 0:0:0:0: [sda] Attached SCSI disk
[    0.921217] Freeing unused kernel memory: 1424k freed
[    0.933849] nash-hotplug (28): /proc/28/oom_adj is deprecated, please use /proc/28/oom_score_adj instead.
[    1.212557] device-mapper: uevent: version 1.0.3
[    1.225904] device-mapper: ioctl: 4.18.0-ioctl (2010-06-29) initialised: dm-devel@redhat.com
[    1.299442] EXT3-fs: barriers not enabled
[    1.305176] kjournald starting.  Commit interval 5 seconds
[    1.306079] EXT3-fs (sda1): mounted filesystem with ordered data mode
[    5.361737] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k6-NAPI
[    5.361739] e1000: Copyright (c) 1999-2006 Intel Corporation.
[    5.361798] e1000 0000:00:03.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[    6.453116] parport_pc 00:04: reported by Plug and Play ACPI
[    6.918441] input: Power Button as /class/input/input2
[    6.918446] ACPI: Power Button [PWRF]
[    6.918533] input: Sleep Button as /class/input/input3
[    6.918535] ACPI: Sleep Button [SLPF]
[    6.924632] ACPI: acpi_idle registered with cpuidle
[    7.056580] usbcore: registered new interface driver usbserial
[    7.056587] USB Serial support registered for generic
[    7.056594] usbcore: registered new interface driver usbserial_generic
[    7.056595] usbserial: USB Serial Driver core
[    7.152849] USB Serial support registered for GSM modem (1-port)
[    7.152878] usbcore: registered new interface driver option
[    7.152879] option: v0.7.2:USB Driver for GSM modems
[    7.820006] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    8.062790] ACPI: AC Adapter [AC] (on-line)
[    8.137617] e1000 0000:00:03.0: eth0: (PCI:33MHz:32-bit) 08:00:27:16:5f:ab
[    8.137627] e1000 0000:00:03.0: eth0: Intel(R) PRO/1000 Network Connection
[    8.139680] piix4_smbus 0000:00:07.0: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr
[   12.310109] floppy0: no floppy controllers found
[   12.367203] lp: driver loaded but no devices found
[   12.864837] md: Autodetecting RAID arrays.
[   12.864840] md: Scanned 0 and added 0 devices.
[   12.864841] md: autorun ...
[   12.864842] md: ... autorun DONE.
[   13.024121] device-mapper: multipath: version 1.1.1 loaded
[   13.714358] EXT3-fs (sda1): using internal journal
[   16.129801] warning: process `kudzu' used the deprecated sysctl system call with 1.23.
[   19.783286] NET: Registered protocol family 17
[   20.870518] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[   23.415744] warning: `dbus-daemon' uses 32-bit capabilities (legacy support in use)
[   35.644116] NET: Registered protocol family 10
[   35.644422] lo: Disabled Privacy Extensions
[   38.704565] mtrr: your processor doesn't support write-combining
[   38.704661] mtrr: your processor doesn't support write-combining
[   45.740034] eth0: no IPv6 routers present
[  109.872865] RPC: Registered udp transport module.
[  109.872867] RPC: Registered tcp transport module.
[  109.872868] RPC: Registered tcp NFSv4.1 backchannel transport module.
[  109.928622] FS-Cache: Loaded
[  109.980197] FS-Cache: Netfs 'nfs' registered for caching
[  110.036272] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[  147.032840] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
[  147.032846] IP: [<ffffffffa006d416>] filelayout_get_stripesize+0x26/0x40 [nfs_layout_nfsv41_files]
[  147.032857] PGD 225af067 PUD 225ae067 PMD 0 
[  147.032861] Oops: 0000 [#1] SMP 
[  147.032864] last sysfs file: /sys/block/sda/sda1/stat
[  147.032865] CPU 0 
[  147.032867] Modules linked in: nfs_layout_nfsv41_files nfs lockd fscache nfs_acl auth_rpcgss sunrpc ipv6 af_packet binfmt_misc dm_mirror dm_multipath scsi_dh video output sbs sbshc pci_slot fan container battery lp ac sg option usb_wwan usbserial thermal button thermal_sys serio_raw parport_pc parport tpm_tis tpm tpm_bios i2c_piix4 e1000 pata_mpiix dm_region_hash dm_log dm_mod [last unloaded: mperf]
[  147.032892] 
[  147.032894] Pid: 2158, comm: visualvm Not tainted 2.6.36-rc6.pnfs.1 #1 /VirtualBox
[  147.032897] RIP: 0010:[<ffffffffa006d416>]  [<ffffffffa006d416>] filelayout_get_stripesize+0x26/0x40 [nfs_layout_nfsv41_files]
[  147.032902] RSP: 0018:ffff880022d2dcd8  EFLAGS: 00010292
[  147.032904] RAX: 0000000000000000 RBX: ffffffffa006fa00 RCX: 7fffffffffffffff
[  147.032906] RDX: 0000000000002b2a RSI: ffff880022d2dcd8 RDI: ffff880022cb4540
[  147.032909] RBP: ffff8800228542f0 R08: 00007fff84f8fc70 R09: ffff880022854408
[  147.032911] R10: 0000000000000001 R11: ffffffffa0228570 R12: ffff88002285439c
[  147.032913] R13: ffff880022d2dd60 R14: ffff880022854408 R15: ffff880022854110
[  147.032920] FS:  00007ff84d97b6e0(0000) GS:ffff880001800000(0000) knlGS:0000000000000000
[  147.032922] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  147.032924] CR2: 0000000000000040 CR3: 0000000022de6000 CR4: 00000000000006f0
[  147.032931] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  147.032934] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  147.032936] Process visualvm (pid: 2158, threadinfo ffff880022d2c000, task ffff88003f2c4c70)
[  147.032938] Stack:
[  147.032939]  ffff880000000001 0000000000000000 ffffffffffffffff 0000000000000000
[  147.032942] <0> ffffffffa006fa00 ffffffffa024a28e ffff880022d2dd88 ffff8800228542f0
[  147.032946] <0> ffff880022ccfc00 ffffffffa024b638 ffff880022d2de60 ffff8800228542f0
[  147.032950] Call Trace:
[  147.032982]  [<ffffffffa024a28e>] ? pnfs_getboundary+0x6e/0x80 [nfs]
[  147.032992]  [<ffffffffa024b638>] ? pnfs_pageio_init_write+0x78/0xa0 [nfs]
[  147.033001]  [<ffffffffa022725f>] ? nfs_pageio_init_write+0x3f/0x90 [nfs]
[  147.033010]  [<ffffffffa02285f0>] ? nfs_writepages+0x80/0x130 [nfs]
[  147.033015]  [<ffffffff810adb37>] ? handle_mm_fault+0x1b7/0x900
[  147.033019]  [<ffffffff810949d4>] ? __filemap_fdatawrite_range+0x54/0x60
[  147.033023]  [<ffffffff81094c35>] ? filemap_write_and_wait+0x35/0x50
[  147.033030]  [<ffffffffa021b904>] ? nfs_getattr+0xf4/0x100 [nfs]
[  147.033033]  [<ffffffff810d2897>] ? vfs_fstat+0x37/0x60
[  147.033036]  [<ffffffff810d28df>] ? sys_newfstat+0x1f/0x50
[  147.033039]  [<ffffffff81383c5f>] ? page_fault+0x1f/0x30
[  147.033043]  [<ffffffff81002c6b>] ? system_call_fastpath+0x16/0x1b
[  147.033044] Code: 80 00 00 00 00 53 48 83 ec 20 48 89 e6 c7 04 24 01 00 00 00 48 c7 44 24 08 00 00 00 00 48 c7 44 24 10 ff ff ff ff e8 9a d2 1d 00 <8b> 58 40 48 89 c7 e8 0f d6 1d 00 48 83 c4 20 48 89 d8 5b c3 66 
[  147.033069] RIP  [<ffffffffa006d416>] filelayout_get_stripesize+0x26/0x40 [nfs_layout_nfsv41_files]
[  147.033074]  RSP <ffff880022d2dcd8>
[  147.033075] CR2: 0000000000000040
[  147.033078] ---[ end trace 05c1332f3cd1e048 ]---

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-29 16:57             ` Tigran Mkrtchyan
@ 2010-09-29 18:35               ` Fred Isaman
  0 siblings, 0 replies; 58+ messages in thread
From: Fred Isaman @ 2010-09-29 18:35 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: Benny Halevy, NFS list

Tigran, are you sure you are running with Benny's suggested patch?
The two oopses you posted from before and after look suspiciously
similar.

Fred

On Wed, Sep 29, 2010 at 12:57 PM, Tigran Mkrtchyan
<tigran.mkrtchyan@desy.de> wrote:
>
>> Tigran, do you have a new trace maybe?
>> I cross referenced the dump you sent to the
>> disassembled code and it seems like it hit NULL dereference on
>> size = fl->stripe_unit;
>>
>> I'm going to commit this patch anyway but I want to
>> understand what else I missed...
>>
>> Benny
>>
>
> The stack attached.  Shall I compile the kernel with some debug options for
> better debugging?
>
> Tigran.
>>>>
>>>> git diff --stat -p -M
>>>>   fs/nfs/nfs4filelayout.c |    2 ++
>>>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
>>>> index 75e07c8..8fbb0db 100644
>>>> --- a/fs/nfs/nfs4filelayout.c
>>>> +++ b/fs/nfs/nfs4filelayout.c
>>>> @@ -636,6 +636,8 @@ filelayout_get_stripesize(struct pnfs_layout_hdr
>>>> *lo)
>>>>
>>>>        /* Horrible hack...ideally upper layer would send lseg */
>>>>        lseg = pnfs_has_layout(lo,&range);
>>>> +       if (!lseg)
>>>> +               return 0;
>>>>        fl = container_of(lseg, struct nfs4_filelayout_segment,
>>>> generic_hdr);
>>>>        size = fl->stripe_unit;
>>>>        put_lseg_locked(lseg);
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-29 15:25           ` Benny Halevy
  2010-09-29 16:57             ` Tigran Mkrtchyan
@ 2010-09-30  7:58             ` Tigran Mkrtchyan
  2010-09-30  8:29               ` Benny Halevy
  1 sibling, 1 reply; 58+ messages in thread
From: Tigran Mkrtchyan @ 2010-09-30  7:58 UTC (permalink / raw)
  To: Benny Halevy; +Cc: NFS list

  I recompiled kernel with debug symbols and problem is gone.
Crap!
Or, as Fred suspected, I did not apply you patch second time.

Regards,
    Tigran.

On 09/29/2010 05:25 PM, Benny Halevy wrote:
> On 2010-09-29 16:36, Tigran Mkrtchyan wrote:
>>    On 09/29/2010 04:22 PM, Benny Halevy wrote:
>>> On 2010-09-29 16:09, Tigran Mkrtchyan wrote:
>>>>     On 09/29/2010 04:07 PM, Tigran Mkrtchyan wrote:
>>>>> I am support to publish first kernel crash.....
>>>> sorry to publish....
>>>>
>>>>> this is
>>>>> pnfs-all-2.6.36-rc6-2010-09-29 git
>>>>> c2b3b75c6b1db1dfc3f236200de1763e14c514d8
>>>>>
>>>>> Regards,
>>>>>      Tigran.
>>>>>
>>>>>
>>> Thanks for testing!
>>> Does the following patch help?
>>>
>> No :(
>>
> Tigran, do you have a new trace maybe?
> I cross referenced the dump you sent to the
> disassembled code and it seems like it hit NULL dereference on
> size = fl->stripe_unit;
>
> I'm going to commit this patch anyway but I want to
> understand what else I missed...
>
> Benny
>
>>> git diff --stat -p -M
>>>    fs/nfs/nfs4filelayout.c |    2 ++
>>>    1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
>>> index 75e07c8..8fbb0db 100644
>>> --- a/fs/nfs/nfs4filelayout.c
>>> +++ b/fs/nfs/nfs4filelayout.c
>>> @@ -636,6 +636,8 @@ filelayout_get_stripesize(struct pnfs_layout_hdr *lo)
>>>
>>>    	/* Horrible hack...ideally upper layer would send lseg */
>>>    	lseg = pnfs_has_layout(lo,&range);
>>> +	if (!lseg)
>>> +		return 0;
>>>    	fl = container_of(lseg, struct nfs4_filelayout_segment, generic_hdr);
>>>    	size = fl->stripe_unit;
>>>    	put_lseg_locked(lseg);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
       [not found]   ` <4CA3C1E2.2050701@RedHat.com>
@ 2010-09-30  8:26     ` Benny Halevy
  0 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-30  8:26 UTC (permalink / raw)
  To: Steve Dickson; +Cc: NFS list

On 2010-09-30 00:46, Steve Dickson wrote:
> 
> 
> On 09/29/2010 07:06 AM, Benny Halevy wrote:
>> This version includes Fred's pnfs-submit RFC patches (v5).
>> and is rebased onto v2.6.36-rc6
>>
>> Cumulative patches can be generated from
>> git://linux-nfs.org/~bhalevy/linux-pnfs.git
>> using
>> git diff v2.6.36-rc6 pnfs-all-2.6.36-rc6-2010-09-29
>>
> So only the 2.6.36-rc kernels are being supported? 
> No 2.6.35 kernels?

Latest and greatest for 2.6.35 is at pnfs-all-2.6.35-2010-09-14

One patch merged since pnfs-all-2.6.35-2010-08-24:

	Benny Halevy be619de5 pnfs: mark commit data as PNFS_NO_RPC in pnfs_try_to_commit

> 
> steved.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-30  7:58             ` Tigran Mkrtchyan
@ 2010-09-30  8:29               ` Benny Halevy
  0 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-30  8:29 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: NFS list

On 2010-09-30 09:58, Tigran Mkrtchyan wrote:
>   I recompiled kernel with debug symbols and problem is gone.
> Crap!
> Or, as Fred suspected, I did not apply you patch second time.

Yeah, this was my inclination too...

Benny

> 
> Regards,
>     Tigran.
> 
> On 09/29/2010 05:25 PM, Benny Halevy wrote:
>> On 2010-09-29 16:36, Tigran Mkrtchyan wrote:
>>>    On 09/29/2010 04:22 PM, Benny Halevy wrote:
>>>> On 2010-09-29 16:09, Tigran Mkrtchyan wrote:
>>>>>     On 09/29/2010 04:07 PM, Tigran Mkrtchyan wrote:
>>>>>> I am support to publish first kernel crash.....
>>>>> sorry to publish....
>>>>>
>>>>>> this is
>>>>>> pnfs-all-2.6.36-rc6-2010-09-29 git
>>>>>> c2b3b75c6b1db1dfc3f236200de1763e14c514d8
>>>>>>
>>>>>> Regards,
>>>>>>      Tigran.
>>>>>>
>>>>>>
>>>> Thanks for testing!
>>>> Does the following patch help?
>>>>
>>> No :(
>>>
>> Tigran, do you have a new trace maybe?
>> I cross referenced the dump you sent to the
>> disassembled code and it seems like it hit NULL dereference on
>> size = fl->stripe_unit;
>>
>> I'm going to commit this patch anyway but I want to
>> understand what else I missed...
>>
>> Benny
>>
>>>> git diff --stat -p -M
>>>>    fs/nfs/nfs4filelayout.c |    2 ++
>>>>    1 files changed, 2 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
>>>> index 75e07c8..8fbb0db 100644
>>>> --- a/fs/nfs/nfs4filelayout.c
>>>> +++ b/fs/nfs/nfs4filelayout.c
>>>> @@ -636,6 +636,8 @@ filelayout_get_stripesize(struct pnfs_layout_hdr *lo)
>>>>
>>>>    	/* Horrible hack...ideally upper layer would send lseg */
>>>>    	lseg = pnfs_has_layout(lo,&range);
>>>> +	if (!lseg)
>>>> +		return 0;
>>>>    	fl = container_of(lseg, struct nfs4_filelayout_segment, generic_hdr);
>>>>    	size = fl->stripe_unit;
>>>>    	put_lseg_locked(lseg);
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-29 14:22       ` Benny Halevy
  2010-09-29 14:36         ` Tigran Mkrtchyan
@ 2010-09-30  8:30         ` Benny Halevy
  2010-09-30  9:12           ` Tigran Mkrtchyan
  1 sibling, 1 reply; 58+ messages in thread
From: Benny Halevy @ 2010-09-30  8:30 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: NFS list

On 2010-09-29 16:22, Benny Halevy wrote:
> On 2010-09-29 16:09, Tigran Mkrtchyan wrote:
>>   On 09/29/2010 04:07 PM, Tigran Mkrtchyan wrote:
>>>
>>> I am support to publish first kernel crash.....
>> sorry to publish....
>>
>>>
>>> this is
>>> pnfs-all-2.6.36-rc6-2010-09-29 git 
>>> c2b3b75c6b1db1dfc3f236200de1763e14c514d8
>>>
>>> Regards,
>>>    Tigran.
>>>
>>>
> 
> Thanks for testing!
> Does the following patch help?
> 

Applied.

Benny

> git diff --stat -p -M
>  fs/nfs/nfs4filelayout.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
> index 75e07c8..8fbb0db 100644
> --- a/fs/nfs/nfs4filelayout.c
> +++ b/fs/nfs/nfs4filelayout.c
> @@ -636,6 +636,8 @@ filelayout_get_stripesize(struct pnfs_layout_hdr *lo)
>  
>  	/* Horrible hack...ideally upper layer would send lseg */
>  	lseg = pnfs_has_layout(lo, &range);
> +	if (!lseg)
> +		return 0;
>  	fl = container_of(lseg, struct nfs4_filelayout_segment, generic_hdr);
>  	size = fl->stripe_unit;
>  	put_lseg_locked(lseg);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-30  8:30         ` Benny Halevy
@ 2010-09-30  9:12           ` Tigran Mkrtchyan
  2010-09-30  9:17             ` Benny Halevy
  0 siblings, 1 reply; 58+ messages in thread
From: Tigran Mkrtchyan @ 2010-09-30  9:12 UTC (permalink / raw)
  To: Benny Halevy; +Cc: NFS list

  On 09/30/2010 10:30 AM, Benny Halevy wrote:
> On 2010-09-29 16:22, Benny Halevy wrote:
>> On 2010-09-29 16:09, Tigran Mkrtchyan wrote:
>>>    On 09/29/2010 04:07 PM, Tigran Mkrtchyan wrote:
>>>> I am support to publish first kernel crash.....
>>> sorry to publish....
>>>
>>>> this is
>>>> pnfs-all-2.6.36-rc6-2010-09-29 git
>>>> c2b3b75c6b1db1dfc3f236200de1763e14c514d8
>>>>
>>>> Regards,
>>>>     Tigran.
>>>>
>>>>
>> Thanks for testing!
>> Does the following patch help?
>>
> Applied.
>
did you applied to pnfs-submit as well?
> Benny
>
>> git diff --stat -p -M
>>   fs/nfs/nfs4filelayout.c |    2 ++
>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
>> index 75e07c8..8fbb0db 100644
>> --- a/fs/nfs/nfs4filelayout.c
>> +++ b/fs/nfs/nfs4filelayout.c
>> @@ -636,6 +636,8 @@ filelayout_get_stripesize(struct pnfs_layout_hdr *lo)
>>
>>   	/* Horrible hack...ideally upper layer would send lseg */
>>   	lseg = pnfs_has_layout(lo,&range);
>> +	if (!lseg)
>> +		return 0;
>>   	fl = container_of(lseg, struct nfs4_filelayout_segment, generic_hdr);
>>   	size = fl->stripe_unit;
>>   	put_lseg_locked(lseg);
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-30  9:12           ` Tigran Mkrtchyan
@ 2010-09-30  9:17             ` Benny Halevy
  2010-09-30 21:37               ` pnfs-all-2.6.36-rc6-2010-09-30 Benny Halevy
                                 ` (2 more replies)
  0 siblings, 3 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-30  9:17 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: NFS list

On 2010-09-30 11:12, Tigran Mkrtchyan wrote:
>   On 09/30/2010 10:30 AM, Benny Halevy wrote:
>> On 2010-09-29 16:22, Benny Halevy wrote:
>>> On 2010-09-29 16:09, Tigran Mkrtchyan wrote:
>>>>    On 09/29/2010 04:07 PM, Tigran Mkrtchyan wrote:
>>>>> I am support to publish first kernel crash.....
>>>> sorry to publish....
>>>>
>>>>> this is
>>>>> pnfs-all-2.6.36-rc6-2010-09-29 git
>>>>> c2b3b75c6b1db1dfc3f236200de1763e14c514d8
>>>>>
>>>>> Regards,
>>>>>     Tigran.
>>>>>
>>>>>
>>> Thanks for testing!
>>> Does the following patch help?
>>>
>> Applied.
>>
> did you applied to pnfs-submit as well?

Not yet.  It's in pnfs-all-latest until the next rebase.
I planned to do it tomorrow before I leave for Boston in case more patches
are required, unless folks want to test pnfs-submit / pnfs-submit-all with
these fixes right now.

Benny

>> Benny
>>
>>> git diff --stat -p -M
>>>   fs/nfs/nfs4filelayout.c |    2 ++
>>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
>>> index 75e07c8..8fbb0db 100644
>>> --- a/fs/nfs/nfs4filelayout.c
>>> +++ b/fs/nfs/nfs4filelayout.c
>>> @@ -636,6 +636,8 @@ filelayout_get_stripesize(struct pnfs_layout_hdr *lo)
>>>
>>>   	/* Horrible hack...ideally upper layer would send lseg */
>>>   	lseg = pnfs_has_layout(lo,&range);
>>> +	if (!lseg)
>>> +		return 0;
>>>   	fl = container_of(lseg, struct nfs4_filelayout_segment, generic_hdr);
>>>   	size = fl->stripe_unit;
>>>   	put_lseg_locked(lseg);
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 58+ messages in thread

* pnfs-all-2.6.36-rc6-2010-09-30
  2010-09-30  9:17             ` Benny Halevy
@ 2010-09-30 21:37               ` Benny Halevy
  2010-09-30 22:23               ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Marc Eshel
  2010-10-01  4:17               ` pNFS DS session Marc Eshel
  2 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-09-30 21:37 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: NFS list

I've rebased the following fixes (since pnfs-all-2.6.36-rc6-2010-09-29)
and released pnfs-all-2.6.36-rc6-2010-09-30

nfsd-upstream:
  Benny Halevy     a7cd1d3 nfsd4: adjust buflen for encoded attrs bitmap based on actual bitmap length
  Benny Halevy     960a019 nfsd41: mask out unsupported pnfs attributes

pnfs-submit:
  Benny Halevy     24ed91a SQUASHME: pnfs-submit: handle NULL lseg in filelayout_get_stripesize
  Bian Naimeng     1691bd5 SQUASHME: pnfs-submit: specify the layout type before initialize mountpoint

pnfs-block:
  Steve Dickson    0d4e550 SQUASHME: pnfsblock: compile error in blocklayout code

pnfsd-files:
  Benny Halevy     435c888 pnfsd: mask out unsupported pnfs attributes only when !CONFIG_PNFSD

pnfsd:
  Benny Halevy     8abfd95 SQUASHME: pnfsd: FATTR4_WORD2_LAYOUT_BLKSIZE is supported only under CONFIG_PNFSD
  Benny Halevy     04b3521 SQUASHME: pnfsd: mask out FATTR4_WORD2_LAYOUT_BLKSIZE only when !CONFIG_PNFSD

spnfs:
  Benny Halevy     b6231c5 SQUASHME: pnfsd: factor out pnfsd check_export crap out of check_export

pnfsd-lexp:
  Benny Halevy     01cda7e SQUASHME: pnfsd: factor out pnfsd check_export crap out of check_export


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29
  2010-09-30  9:17             ` Benny Halevy
  2010-09-30 21:37               ` pnfs-all-2.6.36-rc6-2010-09-30 Benny Halevy
@ 2010-09-30 22:23               ` Marc Eshel
  2010-10-01  4:17               ` pNFS DS session Marc Eshel
  2 siblings, 0 replies; 58+ messages in thread
From: Marc Eshel @ 2010-09-30 22:23 UTC (permalink / raw)
  To: Benny Halevy; +Cc: NFS list, linux-nfs-owner

It been a while since I used pNFS, I see GETATTR requests going to the DS, 
did I configure something wrong or is the same old bug that keeps coming 
back.
Thanks, Marc.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* pNFS DS session
  2010-09-30  9:17             ` Benny Halevy
  2010-09-30 21:37               ` pnfs-all-2.6.36-rc6-2010-09-30 Benny Halevy
  2010-09-30 22:23               ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Marc Eshel
@ 2010-10-01  4:17               ` Marc Eshel
  2010-10-01  6:12                 ` Tigran Mkrtchyan
  2 siblings, 1 reply; 58+ messages in thread
From: Marc Eshel @ 2010-10-01  4:17 UTC (permalink / raw)
  To: Benny Halevy; +Cc: NFS list, linux-nfs-owner

Hi Benny,

Running connectathon I see that some times the clients decides to destroy 
the session with the DS. The test continue and the session is 
re-established. It looks like layout return reduces the hold on device 
info the reduces the hold on the client struct which decide to destroy the 
session. Is that a known problem?

Thanks, Marc.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pNFS DS session
  2010-10-01  4:17               ` pNFS DS session Marc Eshel
@ 2010-10-01  6:12                 ` Tigran Mkrtchyan
  2010-10-01  8:47                   ` Boaz Harrosh
  0 siblings, 1 reply; 58+ messages in thread
From: Tigran Mkrtchyan @ 2010-10-01  6:12 UTC (permalink / raw)
  To: Marc Eshel; +Cc: Benny Halevy, NFS list, linux-nfs-owner

  On 10/01/2010 06:17 AM, Marc Eshel wrote:
> Hi Benny,
>
> Running connectathon I see that some times the clients decides to destroy
> the session with the DS. The test continue and the session is
> re-established. It looks like layout return reduces the hold on device
> info the reduces the hold on the client struct which decide to destroy the
> session. Is that a known problem?
>
Just wan to confirm  that we see this as well (pnfs-submit and 
pnfs-all-latest).

Tigran.
> Thanks, Marc.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pNFS DS session
  2010-10-01  6:12                 ` Tigran Mkrtchyan
@ 2010-10-01  8:47                   ` Boaz Harrosh
  2010-10-01 12:33                     ` Benny Halevy
  0 siblings, 1 reply; 58+ messages in thread
From: Boaz Harrosh @ 2010-10-01  8:47 UTC (permalink / raw)
  To: Tigran Mkrtchyan
  Cc: Marc Eshel, Benny Halevy, NFS list, linux-nfs-owner, Fred Isaman

On 10/01/2010 08:12 AM, Tigran Mkrtchyan wrote:
>   On 10/01/2010 06:17 AM, Marc Eshel wrote:
>> Hi Benny,
>>
>> Running connectathon I see that some times the clients decides to destroy
>> the session with the DS. The test continue and the session is
>> re-established. It looks like layout return reduces the hold on device
>> info the reduces the hold on the client struct which decide to destroy the
>> session. Is that a known problem?
>>

Yes, I want to emphasize on Marks words: "a known *problem*"

I have objected strongly to this new "fixture" by Fred and backed up by Benny.
They decided to only hold a deviceid as long as a layout references it. And
not like before, until unmount. I think they are totally wrong with regard
to current servers and implementation and a setup that might enjoy what is
done now, will not exist for at least 3 years or more.

An argument was made that current code is more simple. But I have demonstrated
that all that is needed is a one-line get_ref at device add. And that iteration
on all devices at umount time that was there before and removed in latest code.

!!!
Boaz


> Just wan to confirm  that we see this as well (pnfs-submit and 
> pnfs-all-latest).
> 
> Tigran.
>> Thanks, Marc.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pNFS DS session
  2010-10-01  8:47                   ` Boaz Harrosh
@ 2010-10-01 12:33                     ` Benny Halevy
  2010-10-01 15:40                       ` Marc Eshel
  0 siblings, 1 reply; 58+ messages in thread
From: Benny Halevy @ 2010-10-01 12:33 UTC (permalink / raw)
  To: Marc Eshel
  Cc: Boaz Harrosh, Tigran Mkrtchyan, NFS list, linux-nfs-owner,
	Fred Isaman

On 2010-10-01 10:47, Boaz Harrosh wrote:
> On 10/01/2010 08:12 AM, Tigran Mkrtchyan wrote:
>>   On 10/01/2010 06:17 AM, Marc Eshel wrote:
>>> Hi Benny,
>>>
>>> Running connectathon I see that some times the clients decides to destroy
>>> the session with the DS. The test continue and the session is
>>> re-established. It looks like layout return reduces the hold on device
>>> info the reduces the hold on the client struct which decide to destroy the
>>> session. Is that a known problem?
>>>
> 
> Yes, I want to emphasize on Marks words: "a known *problem*"

Marc, assuming the code behaves as expected, does this cause any other badness
like the GETATTRs you see going out to the DS?

Benny

> 
> I have objected strongly to this new "fixture" by Fred and backed up by Benny.
> They decided to only hold a deviceid as long as a layout references it. And
> not like before, until unmount. I think they are totally wrong with regard
> to current servers and implementation and a setup that might enjoy what is
> done now, will not exist for at least 3 years or more.
> 
> An argument was made that current code is more simple. But I have demonstrated
> that all that is needed is a one-line get_ref at device add. And that iteration
> on all devices at umount time that was there before and removed in latest code.
> 
> !!!
> Boaz
> 
> 
>> Just wan to confirm  that we see this as well (pnfs-submit and 
>> pnfs-all-latest).
>>
>> Tigran.
>>> Thanks, Marc.
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pNFS DS session
  2010-10-01 12:33                     ` Benny Halevy
@ 2010-10-01 15:40                       ` Marc Eshel
  2010-10-01 17:10                         ` J. Bruce Fields
  0 siblings, 1 reply; 58+ messages in thread
From: Marc Eshel @ 2010-10-01 15:40 UTC (permalink / raw)
  To: Benny Halevy
  Cc: Boaz Harrosh, Tigran Mkrtchyan, NFS list, linux-nfs-owner,
	Fred Isaman

  On 10/1/2010 5:33 AM, Benny Halevy wrote:
> On 2010-10-01 10:47, Boaz Harrosh wrote:
>> On 10/01/2010 08:12 AM, Tigran Mkrtchyan wrote:
>>>    On 10/01/2010 06:17 AM, Marc Eshel wrote:
>>>> Hi Benny,
>>>>
>>>> Running connectathon I see that some times the clients decides to destroy
>>>> the session with the DS. The test continue and the session is
>>>> re-established. It looks like layout return reduces the hold on device
>>>> info the reduces the hold on the client struct which decide to destroy the
>>>> session. Is that a known problem?
>>>>
>> Yes, I want to emphasize on Marks words: "a known *problem*"
> Marc, assuming the code behaves as expected, does this cause any other badness
> like the GETATTRs you see going out to the DS?
>
> Benny
>

No i don't see any "badness" the test continues without errors and this 
problem is not related to the GETATTRs I see on the DS but I would 
consider destroying the session in short run of couple of minutes some 
times more than one time as something bad.
Marc.



>> I have objected strongly to this new "fixture" by Fred and backed up by Benny.
>> They decided to only hold a deviceid as long as a layout references it. And
>> not like before, until unmount. I think they are totally wrong with regard
>> to current servers and implementation and a setup that might enjoy what is
>> done now, will not exist for at least 3 years or more.
>>
>> An argument was made that current code is more simple. But I have demonstrated
>> that all that is needed is a one-line get_ref at device add. And that iteration
>> on all devices at umount time that was there before and removed in latest code.
>>
>> !!!
>> Boaz
>>
>>
>>> Just wan to confirm  that we see this as well (pnfs-submit and
>>> pnfs-all-latest).
>>>
>>> Tigran.
>>>> Thanks, Marc.
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>



^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pNFS DS session
  2010-10-01 15:40                       ` Marc Eshel
@ 2010-10-01 17:10                         ` J. Bruce Fields
  2010-10-01 18:00                           ` Marc Eshel
  0 siblings, 1 reply; 58+ messages in thread
From: J. Bruce Fields @ 2010-10-01 17:10 UTC (permalink / raw)
  To: Marc Eshel
  Cc: Benny Halevy, Boaz Harrosh, Tigran Mkrtchyan, NFS list,
	linux-nfs-owner, Fred Isaman

On Fri, Oct 01, 2010 at 08:40:36AM -0700, Marc Eshel wrote:
>  On 10/1/2010 5:33 AM, Benny Halevy wrote:
> >On 2010-10-01 10:47, Boaz Harrosh wrote:
> >>On 10/01/2010 08:12 AM, Tigran Mkrtchyan wrote:
> >>>   On 10/01/2010 06:17 AM, Marc Eshel wrote:
> >>>>Hi Benny,
> >>>>
> >>>>Running connectathon I see that some times the clients decides to destroy
> >>>>the session with the DS. The test continue and the session is
> >>>>re-established. It looks like layout return reduces the hold on device
> >>>>info the reduces the hold on the client struct which decide to destroy the
> >>>>session. Is that a known problem?
> >>>>
> >>Yes, I want to emphasize on Marks words: "a known *problem*"
> >Marc, assuming the code behaves as expected, does this cause any other badness
> >like the GETATTRs you see going out to the DS?
> >
> >Benny
> >
> 
> No i don't see any "badness" the test continues without errors and
> this problem is not related to the GETATTRs I see on the DS but I
> would consider destroying the session in short run of couple of
> minutes some times more than one time as something bad.

Why?

I wouldn't expect session destruction/creation to be *that* expensive.

--b.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pNFS DS session
  2010-10-01 17:10                         ` J. Bruce Fields
@ 2010-10-01 18:00                           ` Marc Eshel
  2010-10-01 18:14                             ` J. Bruce Fields
  0 siblings, 1 reply; 58+ messages in thread
From: Marc Eshel @ 2010-10-01 18:00 UTC (permalink / raw)
  To: J. Bruce Fields
  Cc: Benny Halevy, Boaz Harrosh, Tigran Mkrtchyan, NFS list,
	linux-nfs-owner, Fred Isaman

  On 10/1/2010 10:10 AM, J. Bruce Fields wrote:
> On Fri, Oct 01, 2010 at 08:40:36AM -0700, Marc Eshel wrote:
>>   On 10/1/2010 5:33 AM, Benny Halevy wrote:
>>> On 2010-10-01 10:47, Boaz Harrosh wrote:
>>>> On 10/01/2010 08:12 AM, Tigran Mkrtchyan wrote:
>>>>>    On 10/01/2010 06:17 AM, Marc Eshel wrote:
>>>>>> Hi Benny,
>>>>>>
>>>>>> Running connectathon I see that some times the clients decides to destroy
>>>>>> the session with the DS. The test continue and the session is
>>>>>> re-established. It looks like layout return reduces the hold on device
>>>>>> info the reduces the hold on the client struct which decide to destroy the
>>>>>> session. Is that a known problem?
>>>>>>
>>>> Yes, I want to emphasize on Marks words: "a known *problem*"
>>> Marc, assuming the code behaves as expected, does this cause any other badness
>>> like the GETATTRs you see going out to the DS?
>>>
>>> Benny
>>>
>> No i don't see any "badness" the test continues without errors and
>> this problem is not related to the GETATTRs I see on the DS but I
>> would consider destroying the session in short run of couple of
>> minutes some times more than one time as something bad.
> Why?
>
> I wouldn't expect session destruction/creation to be *that* expensive.

I assumed that it is inexpensive. We are talking about potential 
destruction/creation of session from every DS for each file IO if there 
is no overlap in holding layouts, right ?

> --b.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>



^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pNFS DS session
  2010-10-01 18:00                           ` Marc Eshel
@ 2010-10-01 18:14                             ` J. Bruce Fields
  2010-10-01 18:29                               ` Andy Adamson
  0 siblings, 1 reply; 58+ messages in thread
From: J. Bruce Fields @ 2010-10-01 18:14 UTC (permalink / raw)
  To: Marc Eshel
  Cc: Benny Halevy, Boaz Harrosh, Tigran Mkrtchyan, NFS list,
	linux-nfs-owner, Fred Isaman

On Fri, Oct 01, 2010 at 11:00:04AM -0700, Marc Eshel wrote:
>  On 10/1/2010 10:10 AM, J. Bruce Fields wrote:
> >On Fri, Oct 01, 2010 at 08:40:36AM -0700, Marc Eshel wrote:
> >>  On 10/1/2010 5:33 AM, Benny Halevy wrote:
> >>>On 2010-10-01 10:47, Boaz Harrosh wrote:
> >>>>On 10/01/2010 08:12 AM, Tigran Mkrtchyan wrote:
> >>>>>   On 10/01/2010 06:17 AM, Marc Eshel wrote:
> >>>>>>Hi Benny,
> >>>>>>
> >>>>>>Running connectathon I see that some times the clients decides to destroy
> >>>>>>the session with the DS. The test continue and the session is
> >>>>>>re-established. It looks like layout return reduces the hold on device
> >>>>>>info the reduces the hold on the client struct which decide to destroy the
> >>>>>>session. Is that a known problem?
> >>>>>>
> >>>>Yes, I want to emphasize on Marks words: "a known *problem*"
> >>>Marc, assuming the code behaves as expected, does this cause any other badness
> >>>like the GETATTRs you see going out to the DS?
> >>>
> >>>Benny
> >>>
> >>No i don't see any "badness" the test continues without errors and
> >>this problem is not related to the GETATTRs I see on the DS but I
> >>would consider destroying the session in short run of couple of
> >>minutes some times more than one time as something bad.
> >Why?
> >
> >I wouldn't expect session destruction/creation to be *that* expensive.
> 
> I assumed that it is inexpensive. We are talking about potential
> destruction/creation of session from every DS for each file IO if
> there is no overlap in holding layouts, right ?

Well, I guess the tradeoffs aren't obvious to me: if you end up having
to set up an enormous number of sessions (and tcp connections, etc.) all
at once, then I can see why it might be a problem.  It would also seem
inefficient to keep around an enormous number of those when they aren't
being used for a while.

--b.

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pNFS DS session
  2010-10-01 18:14                             ` J. Bruce Fields
@ 2010-10-01 18:29                               ` Andy Adamson
  2010-10-03 14:55                                 ` Boaz Harrosh
  0 siblings, 1 reply; 58+ messages in thread
From: Andy Adamson @ 2010-10-01 18:29 UTC (permalink / raw)
  To: J. Bruce Fields
  Cc: Marc Eshel, Benny Halevy, Boaz Harrosh, Tigran Mkrtchyan,
	NFS list, linux-nfs-owner, Fred Isaman


On Oct 1, 2010, at 2:14 PM, J. Bruce Fields wrote:

> On Fri, Oct 01, 2010 at 11:00:04AM -0700, Marc Eshel wrote:
>> On 10/1/2010 10:10 AM, J. Bruce Fields wrote:
>>> On Fri, Oct 01, 2010 at 08:40:36AM -0700, Marc Eshel wrote:
>>>> On 10/1/2010 5:33 AM, Benny Halevy wrote:
>>>>> On 2010-10-01 10:47, Boaz Harrosh wrote:
>>>>>> On 10/01/2010 08:12 AM, Tigran Mkrtchyan wrote:
>>>>>>>  On 10/01/2010 06:17 AM, Marc Eshel wrote:
>>>>>>>> Hi Benny,
>>>>>>>> 
>>>>>>>> Running connectathon I see that some times the clients decides to destroy
>>>>>>>> the session with the DS. The test continue and the session is
>>>>>>>> re-established. It looks like layout return reduces the hold on device
>>>>>>>> info the reduces the hold on the client struct which decide to destroy the
>>>>>>>> session. Is that a known problem?
>>>>>>>> 
>>>>>> Yes, I want to emphasize on Marks words: "a known *problem*"
>>>>> Marc, assuming the code behaves as expected, does this cause any other badness
>>>>> like the GETATTRs you see going out to the DS?
>>>>> 
>>>>> Benny
>>>>> 
>>>> No i don't see any "badness" the test continues without errors and
>>>> this problem is not related to the GETATTRs I see on the DS but I
>>>> would consider destroying the session in short run of couple of
>>>> minutes some times more than one time as something bad.
>>> Why?
>>> 
>>> I wouldn't expect session destruction/creation to be *that* expensive.
>> 
>> I assumed that it is inexpensive. We are talking about potential
>> destruction/creation of session from every DS for each file IO if
>> there is no overlap in holding layouts, right ?
> 
> Well, I guess the tradeoffs aren't obvious to me: if you end up having
> to set up an enormous number of sessions (and tcp connections, etc.) all
> at once, then I can see why it might be a problem.  It would also seem
> inefficient to keep around an enormous number of those when they aren't
> being used for a while.

The plan is to add some code that waits a lease time before destroying an un-referenced deviceid. The next submission patch set will include layoutreturn and the return-on-close code, so it will probably be added then.

-->Andy

> 
> --b.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: pNFS DS session
  2010-10-01 18:29                               ` Andy Adamson
@ 2010-10-03 14:55                                 ` Boaz Harrosh
  0 siblings, 0 replies; 58+ messages in thread
From: Boaz Harrosh @ 2010-10-03 14:55 UTC (permalink / raw)
  To: Andy Adamson
  Cc: J. Bruce Fields, Marc Eshel, Benny Halevy, Tigran Mkrtchyan,
	NFS list, linux-nfs-owner, Fred Isaman

On 10/01/2010 02:29 PM, Andy Adamson wrote:
> 
> On Oct 1, 2010, at 2:14 PM, J. Bruce Fields wrote:
> 
>> On Fri, Oct 01, 2010 at 11:00:04AM -0700, Marc Eshel wrote:
>>> On 10/1/2010 10:10 AM, J. Bruce Fields wrote:
>>>> On Fri, Oct 01, 2010 at 08:40:36AM -0700, Marc Eshel wrote:
>>>>> On 10/1/2010 5:33 AM, Benny Halevy wrote:
>>>>>> On 2010-10-01 10:47, Boaz Harrosh wrote:
>>>>>>> On 10/01/2010 08:12 AM, Tigran Mkrtchyan wrote:
>>>>>>>>  On 10/01/2010 06:17 AM, Marc Eshel wrote:
>>>>>>>>> Hi Benny,
>>>>>>>>>
>>>>>>>>> Running connectathon I see that some times the clients decides to destroy
>>>>>>>>> the session with the DS. The test continue and the session is
>>>>>>>>> re-established. It looks like layout return reduces the hold on device
>>>>>>>>> info the reduces the hold on the client struct which decide to destroy the
>>>>>>>>> session. Is that a known problem?
>>>>>>>>>
>>>>>>> Yes, I want to emphasize on Marks words: "a known *problem*"
>>>>>> Marc, assuming the code behaves as expected, does this cause any other badness
>>>>>> like the GETATTRs you see going out to the DS?
>>>>>>
>>>>>> Benny
>>>>>>
>>>>> No i don't see any "badness" the test continues without errors and
>>>>> this problem is not related to the GETATTRs I see on the DS but I
>>>>> would consider destroying the session in short run of couple of
>>>>> minutes some times more than one time as something bad.
>>>> Why?
>>>>
>>>> I wouldn't expect session destruction/creation to be *that* expensive.
>>>
>>> I assumed that it is inexpensive. We are talking about potential
>>> destruction/creation of session from every DS for each file IO if
>>> there is no overlap in holding layouts, right ?
>>
>> Well, I guess the tradeoffs aren't obvious to me: if you end up having
>> to set up an enormous number of sessions (and tcp connections, etc.) all
>> at once, then I can see why it might be a problem.  It would also seem
>> inefficient to keep around an enormous number of those when they aren't
>> being used for a while.
> 
> The plan is to add some code that waits a lease time before destroying an un-referenced deviceid.
> The next submission patch set will include layoutreturn and the return-on-close code, so it will
> probably be added then.

Rrr No! That's not what I wont. I want a cap on resources. That is say 17 servers I'll keep
for ever, anything over I can drop when done on a: least used basis.

I don't get this Gerrila programming, all of a sudden. Why do you guys go to grate length to shoot
yourself in the foot. We all have a limited and constant number of servers in our clusters. It
is counter performance, counter memory efficient, and a call for grate instability. Why deallocate
what I know for sure that I'll need on every future IO.

Time is not an issue here. Resources is, and speed. I'm idle for a while. Then on next IO I'm
slowed to an halt. It's not like I'm not sure the same servers will be used again.

The system Bruce describes above "It would also seem inefficient to keep around an enormous
number of those" does not yet exist. You are all talking about a future, not existent system.
Mean while sacrificing stability and performance. For no gain.

I can't see why you are picking on this simple matter.

You need memory problems on your head. Clone a Linux git tree on a system with less then
128Mg over pnfs. There you have a problem! it dead locks on network out of memory.

Boaz
> 
> -->Andy
> 

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 5/5] NFS: clear fsinfo before sendign rpc
  2010-09-29 11:10   ` [PATCH 5/5] NFS: clear fsinfo before sendign rpc Benny Halevy
@ 2010-10-13 18:03     ` Fred Isaman
  2010-10-13 20:34       ` Benny Halevy
  0 siblings, 1 reply; 58+ messages in thread
From: Fred Isaman @ 2010-10-13 18:03 UTC (permalink / raw)
  To: Benny Halevy; +Cc: linux-nfs

On Wed, Sep 29, 2010 at 7:10 AM, Benny Halevy <bhalevy@panasas.com> wrote:
> To initialize all values to zero, in case the server or protocol version
> do no support particular attributes.

Sorry for the delayed response, but...

Zero is not an appropriate default for many of the values.  Further,
decode_fsinfo sets a default for each value, even in cases where the
server or protocol version do not support particular attributes.  So
this patch seems to server no purpose.

Fred

>
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> ---
>  fs/nfs/client.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index 23d740c..beb206e 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -942,6 +942,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str
>                        goto out_error;
>        }
>
> +       memset(&fsinfo, 0, sizeof(fsinfo));
>        fsinfo.fattr = fattr;
>        error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo);
>        if (error < 0)
> --
> 1.7.2.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 5/5] NFS: clear fsinfo before sendign rpc
  2010-10-13 18:03     ` Fred Isaman
@ 2010-10-13 20:34       ` Benny Halevy
  2010-10-13 20:54         ` Trond Myklebust
  0 siblings, 1 reply; 58+ messages in thread
From: Benny Halevy @ 2010-10-13 20:34 UTC (permalink / raw)
  To: Fred Isaman; +Cc: linux-nfs

On 2010-10-13 14:03, Fred Isaman wrote:
> On Wed, Sep 29, 2010 at 7:10 AM, Benny Halevy <bhalevy@panasas.com> wrote:
>> To initialize all values to zero, in case the server or protocol version
>> do no support particular attributes.
> 
> Sorry for the delayed response, but...
> 
> Zero is not an appropriate default for many of the values.  Further,
> decode_fsinfo sets a default for each value, even in cases where the
> server or protocol version do not support particular attributes.  So
> this patch seems to server no purpose.

Note that nfs_probe_fsinfo is called also for nfs version 2 and 3
and these don't know anything about nfsv4.1 attributes so they can't
cannot explicitly set them to any default value.

Benny


> 
> Fred
> 
>>
>> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
>> ---
>>  fs/nfs/client.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
>> index 23d740c..beb206e 100644
>> --- a/fs/nfs/client.c
>> +++ b/fs/nfs/client.c
>> @@ -942,6 +942,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str
>>                        goto out_error;
>>        }
>>
>> +       memset(&fsinfo, 0, sizeof(fsinfo));
>>        fsinfo.fattr = fattr;
>>        error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo);
>>        if (error < 0)
>> --
>> 1.7.2.3
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 5/5] NFS: clear fsinfo before sendign rpc
  2010-10-13 20:34       ` Benny Halevy
@ 2010-10-13 20:54         ` Trond Myklebust
  2010-10-13 21:13           ` Benny Halevy
  0 siblings, 1 reply; 58+ messages in thread
From: Trond Myklebust @ 2010-10-13 20:54 UTC (permalink / raw)
  To: Benny Halevy; +Cc: Fred Isaman, linux-nfs

On Wed, 2010-10-13 at 16:34 -0400, Benny Halevy wrote:
> On 2010-10-13 14:03, Fred Isaman wrote:
> > On Wed, Sep 29, 2010 at 7:10 AM, Benny Halevy <bhalevy@panasas.com> wrote:
> >> To initialize all values to zero, in case the server or protocol version
> >> do no support particular attributes.
> > 
> > Sorry for the delayed response, but...
> > 
> > Zero is not an appropriate default for many of the values.  Further,
> > decode_fsinfo sets a default for each value, even in cases where the
> > server or protocol version do not support particular attributes.  So
> > this patch seems to server no purpose.
> 
> Note that nfs_probe_fsinfo is called also for nfs version 2 and 3
> and these don't know anything about nfsv4.1 attributes so they can't
> cannot explicitly set them to any default value.

Err... Why would we care? Under exactly what circumstances would we want
generic code to be processing fsinfo attributes that are specific only
to NFSv4.1?

Trond

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 5/5] NFS: clear fsinfo before sendign rpc
  2010-10-13 20:54         ` Trond Myklebust
@ 2010-10-13 21:13           ` Benny Halevy
  2010-10-13 21:20             ` Trond Myklebust
  0 siblings, 1 reply; 58+ messages in thread
From: Benny Halevy @ 2010-10-13 21:13 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Fred Isaman, linux-nfs

On 2010-10-13 16:54, Trond Myklebust wrote:
> On Wed, 2010-10-13 at 16:34 -0400, Benny Halevy wrote:
>> On 2010-10-13 14:03, Fred Isaman wrote:
>>> On Wed, Sep 29, 2010 at 7:10 AM, Benny Halevy <bhalevy@panasas.com> wrote:
>>>> To initialize all values to zero, in case the server or protocol version
>>>> do no support particular attributes.
>>>
>>> Sorry for the delayed response, but...
>>>
>>> Zero is not an appropriate default for many of the values.  Further,
>>> decode_fsinfo sets a default for each value, even in cases where the
>>> server or protocol version do not support particular attributes.  So
>>> this patch seems to server no purpose.
>>
>> Note that nfs_probe_fsinfo is called also for nfs version 2 and 3
>> and these don't know anything about nfsv4.1 attributes so they can't
>> cannot explicitly set them to any default value.
> 
> Err... Why would we care? Under exactly what circumstances would we want
> generic code to be processing fsinfo attributes that are specific only
> to NFSv4.1?
> 
> Trond

Originally, set_pnfs_layoutdriver, was called only for nfsv4.1
but we changed it to always be called in nfs_server_set_fsinfo()

Benny

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 5/5] NFS: clear fsinfo before sendign rpc
  2010-10-13 21:13           ` Benny Halevy
@ 2010-10-13 21:20             ` Trond Myklebust
       [not found]               ` <1287004813.3015.212.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
  0 siblings, 1 reply; 58+ messages in thread
From: Trond Myklebust @ 2010-10-13 21:20 UTC (permalink / raw)
  To: Benny Halevy; +Cc: Fred Isaman, linux-nfs

On Wed, 2010-10-13 at 17:13 -0400, Benny Halevy wrote:
> On 2010-10-13 16:54, Trond Myklebust wrote:
> > On Wed, 2010-10-13 at 16:34 -0400, Benny Halevy wrote:
> >> On 2010-10-13 14:03, Fred Isaman wrote:
> >>> On Wed, Sep 29, 2010 at 7:10 AM, Benny Halevy <bhalevy@panasas.com> wrote:
> >>>> To initialize all values to zero, in case the server or protocol version
> >>>> do no support particular attributes.
> >>>
> >>> Sorry for the delayed response, but...
> >>>
> >>> Zero is not an appropriate default for many of the values.  Further,
> >>> decode_fsinfo sets a default for each value, even in cases where the
> >>> server or protocol version do not support particular attributes.  So
> >>> this patch seems to server no purpose.
> >>
> >> Note that nfs_probe_fsinfo is called also for nfs version 2 and 3
> >> and these don't know anything about nfsv4.1 attributes so they can't
> >> cannot explicitly set them to any default value.
> > 
> > Err... Why would we care? Under exactly what circumstances would we want
> > generic code to be processing fsinfo attributes that are specific only
> > to NFSv4.1?
> > 
> > Trond
> 
> Originally, set_pnfs_layoutdriver, was called only for nfsv4.1
> but we changed it to always be called in nfs_server_set_fsinfo()

So it relies on a flag in the fsinfo structure to tell it that this is a
pNFS-capable server? That's fine, but in that case, you should perhaps
explicitly initialise that flag to the non-pNFS capable value in the
generic code.
We shouldn't need to zero out the entire structure.

Cheers
  Trond

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 5/5] NFS: clear fsinfo before sendign rpc
       [not found]               ` <1287004813.3015.212.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
@ 2010-10-13 21:27                 ` Benny Halevy
  0 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-10-13 21:27 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Fred Isaman, linux-nfs

On 2010-10-13 17:20, Trond Myklebust wrote:
> On Wed, 2010-10-13 at 17:13 -0400, Benny Halevy wrote:
>> On 2010-10-13 16:54, Trond Myklebust wrote:
>>> On Wed, 2010-10-13 at 16:34 -0400, Benny Halevy wrote:
>>>> On 2010-10-13 14:03, Fred Isaman wrote:
>>>>> On Wed, Sep 29, 2010 at 7:10 AM, Benny Halevy <bhalevy@panasas.com> wrote:
>>>>>> To initialize all values to zero, in case the server or protocol version
>>>>>> do no support particular attributes.
>>>>>
>>>>> Sorry for the delayed response, but...
>>>>>
>>>>> Zero is not an appropriate default for many of the values.  Further,
>>>>> decode_fsinfo sets a default for each value, even in cases where the
>>>>> server or protocol version do not support particular attributes.  So
>>>>> this patch seems to server no purpose.
>>>>
>>>> Note that nfs_probe_fsinfo is called also for nfs version 2 and 3
>>>> and these don't know anything about nfsv4.1 attributes so they can't
>>>> cannot explicitly set them to any default value.
>>>
>>> Err... Why would we care? Under exactly what circumstances would we want
>>> generic code to be processing fsinfo attributes that are specific only
>>> to NFSv4.1?
>>>
>>> Trond
>>
>> Originally, set_pnfs_layoutdriver, was called only for nfsv4.1
>> but we changed it to always be called in nfs_server_set_fsinfo()
> 
> So it relies on a flag in the fsinfo structure to tell it that this is a
> pNFS-capable server? That's fine, but in that case, you should perhaps
> explicitly initialise that flag to the non-pNFS capable value in the
> generic code.
> We shouldn't need to zero out the entire structure.

OK. That's possible.

Benny

> 
> Cheers
>   Trond

^ permalink raw reply	[flat|nested] 58+ messages in thread

* pnfs git tree status pnfs-all-2.6.36-2010-10-28
  2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
                     ` (21 preceding siblings ...)
       [not found]   ` <4CA3C1E2.2050701@RedHat.com>
@ 2010-10-28 13:36   ` Benny Halevy
  22 siblings, 0 replies; 58+ messages in thread
From: Benny Halevy @ 2010-10-28 13:36 UTC (permalink / raw)
  To: NFS list

This version is based on v2.6.36

Cumulative patches can be generated from
git://linux-nfs.org/~bhalevy/linux-pnfs.git
using
git diff v2.6.36-rc6 pnfs-all-2.6.36-2010-10-28

Or, they can be downloaded from the wiki at:
http://wiki.linux-nfs.org/wiki/index.php/PNFS_Development_Git_tree

Note that I'm in the process of rebasing the whole tree onto linux-2.6/master
(to be v2.6.37-rc1) and it's taking some time due to conflicts and significant
changes both on the client and on the server side.
I'll send an announcement when the 2.6.37 tree is ready to go.

In the meanwhile pnfs-all-latest == pnfs-all-2.6.36 but the rest of the branches
were not updated.

Latest patches that went in since pnfs-all-2.6.36-rc6-2010-09-29:

upstream:
  Jan Kara         db02183 bdi: Initialize inode->i_mapping.backing_dev_info to sb->s_bdi

nfsd-upstream:
  Benny Halevy     8dcd082 nfsd4: adjust buflen for encoded attrs bitmap based on actual bitmap length

pnfsd-files:
  Benny Halevy     c5a841c SQUASHME: pnfsd-files: update layout stateid properly

pnfsd:
  Benny Halevy     12e7883 SQUASHME: pnfsd: FATTR4_WORD2_LAYOUT_BLKSIZE is supported only under CONFIG_PNFSD

spnfs:
  Benny Halevy     e129405 SQUASHME: pnfsd: factor out pnfsd check_export crap out of check_export

pnfs-submit-layoutget:
  Bian Naimeng     2e16f9a SQUASHME: pnfs-submit: specify the layout type before initialize mountpoint
  Fred Isaman      8781381 SQUASHME: pnfs-devinfo-submit: misc small fixes
  Fred Isaman      07c9c9a SQUASHME: pnfs-devinfo-submit: Use only asynch error handler for LAYOUTGET
  Fred Isaman      c17dfaa SQUASHME: pnfs-submit: Don't check exchange flags unless using v4.1 try 2

pnfs-submit:
  Fred Isaman      43db3d4 SQUASHME: pnfs-devinfo-submit: fix comments in pnfs_layout*_release
  Benny Halevy     57a08c9 SQUASHME: pnfs-submit: handle NULL lseg in filelayout_get_stripesize
  Fred Isaman      2a90270 SQUASHME: pnfs-submit: misc small rebase fixes
  Fred Isaman      e141824 SQUASHME: pnfs_submit: remove inlines from *.c files
  Fred Isaman      f60c230 nfs: change end of line commas to semicolons
  Fred Isaman      625834c SQUASHME: pnfs_submit: Only use asynch error handler for LAYOUTCOMMIT
  Fred Isaman      9bc5857 SQUASHME: pnfs_submit: only use asynch error handler for LAYOUTRETURN
  Benny Halevy     67f8ba9 SQUASHME: pnfs-submit: init pg_lseg to NULL when !CONFIG_NFS_V4_1
  Fred Isaman      a262d18 pnfs_submit: Remove nonsensical check
  Fred Isaman      0561b05 pnfs_submit: Only update stateid if it is more recent than current
  Fred Isaman      48f0c0f pnfs_submit: simplify nfs4_callback_layoutrecall
  Fred Isaman      dc08d69 pnfs_submit: Fix clp refcounting in layout recalls
  Fred Isaman      df7c832 pnfs_submit: Remove the get_stripesize function
  Andy Adamson     4e97d26 pnfs_submit: move layout segment valid test
  Andy Adamson     a40a6ae pnfs_submit: fix deadlock in pnfs_clear_lseg_list
  Andy Adamson     5155659 pnfs_submit: enforce requested DS only pNFS role
  Benny Halevy     1664201 SQUASHME: pnfs-submit: fail init_clientid if a DS is not really a DS
  Benny Halevy     424dea1 SQUASHME: pnfs-submit: do not get_lseg in pnfs_has_layout
  Benny Halevy     86dc18d SQUASHME: pnfs: get_lseg in nfs4_layoutget_prepare rather than in pnfs_has_layout
  Fred Isaman      ba39b5a pnfs_submit: Restore forgetful mode io draining
  Andy Adamson     6328fa0 pnfs_submit: fix layoutreturn layout stateid processing
  Andy Adamson     767d1da pnfs_submit: replace pnfs_layoutget_release with put_layout_hdr
  Benny Halevy     0c407c7 pnfs: do not change layout stateid when dropping layouts.

pnfs:
  Benny Halevy     c249cff SQUASHME: pnfs: loga_minlength must not be greater than loga_length
  Benny Halevy     2ec6978 pnfs: mark page with error in readpage_async_filler when crossing lsegs
  Fred Isaman      23b3e65 SQUASHME: pnfs: filelayout: call print_ds under ifdebug(FACILITY)

pnfs-obj:
  Benny Halevy     456ac6e SQUASHME: pnfs-obj: deprecate get_stripesize

pnfs-block:
  Steve Dickson    97127f0 SQUASHME: pnfsblock: compile error in blocklayout code
  Benny Halevy     81197a6 SQUASHME: pnfs-block: deprecate get_stripesize
  Jim Rees         3bf1cd1 move include lines out of include file


^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2010-10-28 13:36 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-30 16:34 pnfs git tree status pnfs-all-2.6.36-rc3-2010-08-30 Benny Halevy
2010-08-30 16:43 ` [PATCH 1/2] SQUASHME: pnfs-submit: do not use NIPQUAD in nfs4_callback_layoutrecall dprintk Benny Halevy
2010-08-30 16:43 ` [PATCH 2/2] SQUASHME: pnfs-submit: get machince creds for getdeviceinfo Benny Halevy
2010-08-30 16:44 ` [PATCH 3/3] SQUASHME: pnfs: get machince creds for getdevicelist Benny Halevy
2010-08-30 16:44 ` [PATCH 4/4] SQUASHME: pnfs-obj use REQ flags rather than BIO flags Benny Halevy
2010-09-29 11:06 ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
2010-09-29 11:09   ` [PATCH 1/5] SQUASHME: pnfs-submit: add missing include file in nfs4filelayoutdev.c Benny Halevy
2010-09-29 11:09   ` [PATCH 2/5] SQUASHME: move nfs4_deviceid definitions to include/linux/nfs4.h Benny Halevy
2010-09-29 11:09   ` [PATCH 3/5] SQUASHME: pnfs-submit: handle non-pnfs case in set_pnfs_layoutdriver Benny Halevy
2010-09-29 11:10   ` [PATCH 4/5] pnfs-submit: file needs layout commit, server attributes may be stale Benny Halevy
2010-09-29 11:10   ` [PATCH 5/5] NFS: clear fsinfo before sendign rpc Benny Halevy
2010-10-13 18:03     ` Fred Isaman
2010-10-13 20:34       ` Benny Halevy
2010-10-13 20:54         ` Trond Myklebust
2010-10-13 21:13           ` Benny Halevy
2010-10-13 21:20             ` Trond Myklebust
     [not found]               ` <1287004813.3015.212.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-10-13 21:27                 ` Benny Halevy
2010-09-29 11:10   ` [PATCH 6/9] pnfs: alloc and free layout_hdr layoutdriver methods Benny Halevy
2010-09-29 11:10   ` [PATCH 7/9] pnfs: allow nfs4_proc_layoutget to sleep on invalid lsegs Benny Halevy
2010-09-29 11:10   ` [PATCH 8/9] SQUASHME: pnfs: refactor put_lseg{_locked} Benny Halevy
2010-09-29 11:11   ` [PATCH 9/9] SQUASHME: pnfs: get rid of lo_waitq Benny Halevy
2010-09-29 11:11   ` [PATCH 10/15] SQUASHME: pnfsblock: remove obsolete include file from blocklayout.h Benny Halevy
2010-09-29 11:11   ` [PATCH 11/15] SQUASHME: pnfsblock: use nfs4_deviceid Benny Halevy
2010-09-29 11:11   ` [PATCH 12/15] SQUASHME: pnfsblock: no callback ops Benny Halevy
2010-09-29 11:11   ` [PATCH 13/15] SQAUSHME: pnfsblock: no PNFS_NFS_SERVER Benny Halevy
2010-09-29 11:12   ` [PATCH 14/15] SQUASHME: pnfsblock: no dev_notify_types Benny Halevy
2010-09-29 11:12   ` [PATCH 15/15] SQUASHME: pnfsblock: use new struct pnfs_layout_hdr Benny Halevy
2010-09-29 11:12   ` [PATCH 16/17] SQUASHME: pnfs-obj: fix REQ flags usage Benny Halevy
2010-09-29 11:12   ` [PATCH 17/17] SQUASHME: pnfs-obj: convert to new pnfs-submit changes Benny Halevy
2010-09-29 11:12   ` [PATCH 18/18] SQUASHME: pnfsd-exofs: " Benny Halevy
2010-09-29 11:17   ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
2010-09-29 11:18   ` [PATCH] pnfs: get layout in proper segments Benny Halevy
2010-09-29 14:07   ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Tigran Mkrtchyan
2010-09-29 14:09     ` Tigran Mkrtchyan
2010-09-29 14:22       ` Benny Halevy
2010-09-29 14:36         ` Tigran Mkrtchyan
2010-09-29 15:25           ` Benny Halevy
2010-09-29 16:57             ` Tigran Mkrtchyan
2010-09-29 18:35               ` Fred Isaman
2010-09-30  7:58             ` Tigran Mkrtchyan
2010-09-30  8:29               ` Benny Halevy
2010-09-30  8:30         ` Benny Halevy
2010-09-30  9:12           ` Tigran Mkrtchyan
2010-09-30  9:17             ` Benny Halevy
2010-09-30 21:37               ` pnfs-all-2.6.36-rc6-2010-09-30 Benny Halevy
2010-09-30 22:23               ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Marc Eshel
2010-10-01  4:17               ` pNFS DS session Marc Eshel
2010-10-01  6:12                 ` Tigran Mkrtchyan
2010-10-01  8:47                   ` Boaz Harrosh
2010-10-01 12:33                     ` Benny Halevy
2010-10-01 15:40                       ` Marc Eshel
2010-10-01 17:10                         ` J. Bruce Fields
2010-10-01 18:00                           ` Marc Eshel
2010-10-01 18:14                             ` J. Bruce Fields
2010-10-01 18:29                               ` Andy Adamson
2010-10-03 14:55                                 ` Boaz Harrosh
     [not found]   ` <4CA3C1E2.2050701@RedHat.com>
2010-09-30  8:26     ` pnfs git tree status pnfs-all-2.6.36-rc6-2010-09-29 Benny Halevy
2010-10-28 13:36   ` pnfs git tree status pnfs-all-2.6.36-2010-10-28 Benny Halevy

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).