linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] pnfs: additional wave2 patches
@ 2010-12-14 22:02 Fred Isaman
  2010-12-14 22:02 ` [PATCH 1/3] pnfs-submit: wave2: remove forgotten layoutreturn struct definitions Fred Isaman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fred Isaman @ 2010-12-14 22:02 UTC (permalink / raw)
  To: linux-nfs

These are on top of the previous 22 patches, and fix a few more issues from review.

Fred


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

* [PATCH 1/3] pnfs-submit: wave2: remove forgotten layoutreturn struct definitions
  2010-12-14 22:02 [PATCH 0/3] pnfs: additional wave2 patches Fred Isaman
@ 2010-12-14 22:02 ` Fred Isaman
  2010-12-14 22:02 ` [PATCH 2/3] pnfs-submit: wave2: Remove smp barrier in get_layout_hdr Fred Isaman
  2010-12-14 22:03 ` [PATCH 3/3] pnfs-submit: wave2: make put_layout_hdr have args consistent with related functions Fred Isaman
  2 siblings, 0 replies; 4+ messages in thread
From: Fred Isaman @ 2010-12-14 22:02 UTC (permalink / raw)
  To: linux-nfs

Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
 include/linux/nfs4.h    |    1 -
 include/linux/nfs_xdr.h |   23 -----------------------
 2 files changed, 0 insertions(+), 24 deletions(-)

diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index 55511e8..8ca7700 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -557,7 +557,6 @@ enum {
 	NFSPROC4_CLNT_RECLAIM_COMPLETE,
 	NFSPROC4_CLNT_LAYOUTGET,
 	NFSPROC4_CLNT_LAYOUTCOMMIT,
-	NFSPROC4_CLNT_LAYOUTRETURN,
 	NFSPROC4_CLNT_GETDEVICEINFO,
 	NFSPROC4_CLNT_PNFS_WRITE,
 	NFSPROC4_CLNT_PNFS_COMMIT,
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index a651574..9d847ac 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -258,29 +258,6 @@ struct nfs4_layoutcommit_data {
 	int status;
 };
 
-struct nfs4_layoutreturn_args {
-	__u32   reclaim;
-	__u32   layout_type;
-	__u32   return_type;
-	struct pnfs_layout_range range;
-	struct inode *inode;
-	struct nfs4_sequence_args seq_args;
-};
-
-struct nfs4_layoutreturn_res {
-	struct nfs4_sequence_res seq_res;
-	u32 lrs_present;
-	nfs4_stateid stateid;
-};
-
-struct nfs4_layoutreturn {
-	struct nfs4_layoutreturn_args args;
-	struct nfs4_layoutreturn_res res;
-	struct rpc_cred *cred;
-	struct nfs_client *clp;
-	int rpc_status;
-};
-
 struct nfs4_getdeviceinfo_args {
 	struct pnfs_device *pdev;
 	struct nfs4_sequence_args seq_args;
-- 
1.7.2.1


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

* [PATCH 2/3] pnfs-submit: wave2: Remove smp barrier in get_layout_hdr
  2010-12-14 22:02 [PATCH 0/3] pnfs: additional wave2 patches Fred Isaman
  2010-12-14 22:02 ` [PATCH 1/3] pnfs-submit: wave2: remove forgotten layoutreturn struct definitions Fred Isaman
@ 2010-12-14 22:02 ` Fred Isaman
  2010-12-14 22:03 ` [PATCH 3/3] pnfs-submit: wave2: make put_layout_hdr have args consistent with related functions Fred Isaman
  2 siblings, 0 replies; 4+ messages in thread
From: Fred Isaman @ 2010-12-14 22:02 UTC (permalink / raw)
  To: linux-nfs

Trond points out that, since this is always called inside some
spinlock, the barrier is not necessay.

Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
 fs/nfs/pnfs.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index c22e439..b815e3e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -237,7 +237,6 @@ void
 get_layout_hdr(struct pnfs_layout_hdr *lo)
 {
 	atomic_inc(&lo->plh_refcount);
-	smp_mb__after_atomic_inc();
 }
 
 static void
-- 
1.7.2.1


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

* [PATCH 3/3] pnfs-submit: wave2: make put_layout_hdr have args consistent with related functions
  2010-12-14 22:02 [PATCH 0/3] pnfs: additional wave2 patches Fred Isaman
  2010-12-14 22:02 ` [PATCH 1/3] pnfs-submit: wave2: remove forgotten layoutreturn struct definitions Fred Isaman
  2010-12-14 22:02 ` [PATCH 2/3] pnfs-submit: wave2: Remove smp barrier in get_layout_hdr Fred Isaman
@ 2010-12-14 22:03 ` Fred Isaman
  2 siblings, 0 replies; 4+ messages in thread
From: Fred Isaman @ 2010-12-14 22:03 UTC (permalink / raw)
  To: linux-nfs

put_layout_hdr_locked() and get_layout_hdr() take lo, not inode,
as argument.  So make put_layout_hdr do likewise.

Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
 fs/nfs/callback_proc.c |    4 ++--
 fs/nfs/nfs4proc.c      |    2 +-
 fs/nfs/pnfs.c          |   12 ++++++------
 fs/nfs/pnfs.h          |    2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index cbde28e..38d8a23 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -198,7 +198,7 @@ static int initiate_layout_draining(struct nfs_client *clp,
 			list_del_init(&lo->plh_bulk_recall);
 			spin_unlock(&lo->inode->i_lock);
 			trigger_flush(lo->inode);
-			put_layout_hdr(lo->inode);
+			put_layout_hdr(lo);
 			rv = NFS4_OK;
 		}
 		pnfs_free_lseg_list(&free_me_list);
@@ -229,7 +229,7 @@ static u32 do_callback_layoutrecall(struct nfs_client *clp,
 		spin_lock(&lo->inode->i_lock);
 		lo->plh_block_lgets--;
 		spin_unlock(&lo->inode->i_lock);
-		put_layout_hdr(args->cbl_inode);
+		put_layout_hdr(lo);
 	}
 	clear_bit(NFS4CLNT_LAYOUTRECALL, &clp->cl_state);
 out:
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 224bdfe..ad9c018 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5498,7 +5498,7 @@ static void nfs4_layoutcommit_release(void *lcdata)
 		(struct nfs4_layoutcommit_data *)lcdata;
 
 	/* Matched by get_layout in pnfs_layoutcommit_inode */
-	put_layout_hdr(data->args.inode);
+	put_layout_hdr(NFS_I(data->args.inode)->layout);
 	put_rpccred(data->cred);
 	kfree(lcdata);
 }
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index b815e3e..5c6b4fb 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -258,9 +258,9 @@ put_layout_hdr_locked(struct pnfs_layout_hdr *lo)
 }
 
 void
-put_layout_hdr(struct inode *inode)
+put_layout_hdr(struct pnfs_layout_hdr *lo)
 {
-	struct pnfs_layout_hdr *lo = NFS_I(inode)->layout;
+	struct inode *inode = lo->inode;
 
 	BUG_ON(atomic_read(&lo->plh_refcount) == 0);
 	if (atomic_dec_and_lock(&lo->plh_refcount, &inode->i_lock)) {
@@ -336,7 +336,7 @@ put_lseg(struct pnfs_layout_segment *lseg)
 		NFS_SERVER(ino)->pnfs_curr_ld->free_lseg(lseg);
 		notify_drained(NFS_SERVER(ino)->nfs_client, count);
 		/* Matched by get_layout_hdr_locked in pnfs_insert_layout */
-		put_layout_hdr(ino);
+		put_layout_hdr(NFS_I(ino)->layout);
 	}
 }
 EXPORT_SYMBOL_GPL(put_lseg);
@@ -412,7 +412,7 @@ pnfs_free_lseg_list(struct list_head *free_me)
 		NFS_SERVER(ino)->pnfs_curr_ld->free_lseg(lseg);
 		notify_drained(NFS_SERVER(ino)->nfs_client, count);
 		/* Matched by get_layout_hdr_locked in pnfs_insert_layout */
-		put_layout_hdr(ino);
+		put_layout_hdr(NFS_I(ino)->layout);
 	}
 	INIT_LIST_HEAD(free_me);
 }
@@ -924,7 +924,7 @@ pnfs_update_layout(struct inode *ino,
 		spin_unlock(&ino->i_lock);
 	}
 	atomic_dec(&lo->plh_outstanding);
-	put_layout_hdr(ino);
+	put_layout_hdr(lo);
 out:
 	dprintk("%s end, state 0x%lx lseg %p\n", __func__,
 		nfsi->layout->plh_flags, lseg);
@@ -1259,7 +1259,7 @@ pnfs_layoutcommit_inode(struct inode *inode, int sync)
 	if (status) {
 		/* The layout driver failed to setup the layoutcommit */
 		put_rpccred(data->cred);
-		put_layout_hdr(inode);
+		put_layout_hdr(NFS_I(inode)->layout);
 		goto out_free;
 	}
 	status = nfs4_proc_layoutcommit(data, sync);
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 0ddab0d..c413954 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -212,7 +212,7 @@ int pnfs_layout_process(struct nfs4_layoutget *lgp);
 void pnfs_free_lseg_list(struct list_head *tmp_list);
 void pnfs_destroy_layout(struct nfs_inode *);
 void pnfs_destroy_all_layouts(struct nfs_client *);
-void put_layout_hdr(struct inode *inode);
+void put_layout_hdr(struct pnfs_layout_hdr *lo);
 void pnfs_set_layout_stateid(struct pnfs_layout_hdr *lo,
 			     const nfs4_stateid *new,
 			     bool update_barrier);
-- 
1.7.2.1


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

end of thread, other threads:[~2010-12-14 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14 22:02 [PATCH 0/3] pnfs: additional wave2 patches Fred Isaman
2010-12-14 22:02 ` [PATCH 1/3] pnfs-submit: wave2: remove forgotten layoutreturn struct definitions Fred Isaman
2010-12-14 22:02 ` [PATCH 2/3] pnfs-submit: wave2: Remove smp barrier in get_layout_hdr Fred Isaman
2010-12-14 22:03 ` [PATCH 3/3] pnfs-submit: wave2: make put_layout_hdr have args consistent with related functions Fred Isaman

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