From: Benny Halevy <bhalevy@panasas.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/6] SQUASHME: remove wait parameter from the layoutreturn path.
Date: Fri, 22 Apr 2011 11:31:45 +0300 [thread overview]
Message-ID: <4DB13CF1.8070300@panasas.com> (raw)
In-Reply-To: <1303459491-16357-1-git-send-email-bhalevy@panasas.com>
On 2011-04-22 11:04, Benny Halevy wrote:
> all call sites are sync now
> squash into "pnfs: layoutreturn"
>
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> ---
> fs/nfs/nfs4proc.c | 11 ++++-------
> fs/nfs/pnfs.c | 10 +++++-----
> fs/nfs/pnfs.h | 12 +++++-------
> 3 files changed, 14 insertions(+), 19 deletions(-)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 3e1843d..4f637e9 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -2333,7 +2333,7 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
> int status;
>
> if (pnfs_ld_layoutret_on_setattr(inode))
> - pnfs_return_layout(inode, NULL, true);
> + pnfs_return_layout(inode, NULL);
>
> nfs_fattr_init(fattr);
>
> @@ -5739,7 +5739,7 @@ static const struct rpc_call_ops nfs4_layoutreturn_call_ops = {
> .rpc_release = nfs4_layoutreturn_release,
> };
>
> -int nfs4_proc_layoutreturn(struct nfs4_layoutreturn *lrp, bool issync)
> +int nfs4_proc_layoutreturn(struct nfs4_layoutreturn *lrp)
> {
> struct rpc_task *task;
> struct rpc_message msg = {
> @@ -5752,22 +5752,19 @@ int nfs4_proc_layoutreturn(struct nfs4_layoutreturn *lrp, bool issync)
> .rpc_message = &msg,
> .callback_ops = &nfs4_layoutreturn_call_ops,
> .callback_data = lrp,
> - .flags = RPC_TASK_ASYNC,
> };
> - int status = 0;
> + int status;
>
> dprintk("--> %s\n", __func__);
> task = rpc_run_task(&task_setup_data);
> if (IS_ERR(task))
> return PTR_ERR(task);
> - if (!issync)
> - goto out;
> status = nfs4_wait_for_completion_rpc_task(task);
sorry, no need to wait if the task isn't ASYNC.
Benny
> if (status != 0)
> goto out;
> status = task->tk_status;
> out:
> - dprintk("<-- %s\n", __func__);
> + dprintk("<-- %s status=%d\n", __func__, status);
> rpc_put_task(task);
> return status;
> }
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index bacde63..1ec5bb8 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -667,7 +667,7 @@ out_err_free:
> }
>
> static int
> -return_layout(struct inode *ino, struct pnfs_layout_range *range, bool wait)
> +return_layout(struct inode *ino, struct pnfs_layout_range *range)
> {
> struct nfs4_layoutreturn *lrp;
> struct nfs_server *server = NFS_SERVER(ino);
> @@ -687,7 +687,7 @@ return_layout(struct inode *ino, struct pnfs_layout_range *range, bool wait)
> lrp->args.inode = ino;
> lrp->clp = server->nfs_client;
>
> - status = nfs4_proc_layoutreturn(lrp, wait);
> + status = nfs4_proc_layoutreturn(lrp);
> out:
> dprintk("<-- %s status: %d\n", __func__, status);
> return status;
> @@ -695,7 +695,7 @@ out:
>
> /* Initiates a LAYOUTRETURN(FILE) */
> int
> -_pnfs_return_layout(struct inode *ino, struct pnfs_layout_range *range, bool wait)
> +_pnfs_return_layout(struct inode *ino, struct pnfs_layout_range *range)
> {
> struct pnfs_layout_hdr *lo = NULL;
> struct nfs_inode *nfsi = NFS_I(ino);
> @@ -722,11 +722,11 @@ _pnfs_return_layout(struct inode *ino, struct pnfs_layout_range *range, bool wai
> pnfs_free_lseg_list(&tmp_list);
>
> /* Return layout even if layoutcommit fails */
> - status = pnfs_layoutcommit_inode(ino, wait);
> + status = pnfs_layoutcommit_inode(ino, true);
> if (status)
> dprintk("%s: layoutcommit failed, status=%d. Returning layout anyway\n",
> __func__, status);
> - status = return_layout(ino, &arg, wait);
> + status = return_layout(ino, &arg);
> out:
> dprintk("<-- %s status: %d\n", __func__, status);
> return status;
> diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
> index b0f9b79..b5d1d22 100644
> --- a/fs/nfs/pnfs.h
> +++ b/fs/nfs/pnfs.h
> @@ -164,7 +164,7 @@ extern int nfs4_proc_getdevicelist(struct nfs_server *server,
> extern int nfs4_proc_getdeviceinfo(struct nfs_server *server,
> struct pnfs_device *dev);
> extern int nfs4_proc_layoutget(struct nfs4_layoutget *lgp);
> -extern int nfs4_proc_layoutreturn(struct nfs4_layoutreturn *lrp, bool wait);
> +extern int nfs4_proc_layoutreturn(struct nfs4_layoutreturn *lrp);
>
> /* pnfs.c */
> void get_layout_hdr(struct pnfs_layout_hdr *lo);
> @@ -202,7 +202,7 @@ void pnfs_roc_set_barrier(struct inode *ino, u32 barrier);
> bool pnfs_roc_drain(struct inode *ino, u32 *barrier);
> void pnfs_set_layoutcommit(struct nfs_write_data *wdata);
> int pnfs_layoutcommit_inode(struct inode *inode, bool sync);
> -int _pnfs_return_layout(struct inode *, struct pnfs_layout_range *, bool wait);
> +int _pnfs_return_layout(struct inode *, struct pnfs_layout_range *);
> int pnfs_write_done(struct nfs_write_data *);
> int pnfs_read_done(struct nfs_read_data *);
>
> @@ -284,14 +284,13 @@ pnfs_ld_layoutret_on_setattr(struct inode *inode)
> }
>
> static inline int pnfs_return_layout(struct inode *ino,
> - struct pnfs_layout_range *range,
> - bool wait)
> + struct pnfs_layout_range *range)
> {
> struct nfs_inode *nfsi = NFS_I(ino);
> struct nfs_server *nfss = NFS_SERVER(ino);
>
> if (pnfs_enabled_sb(nfss) && nfsi->layout)
> - return _pnfs_return_layout(ino, range, wait);
> + return _pnfs_return_layout(ino, range);
>
> return 0;
> }
> @@ -338,8 +337,7 @@ pnfs_try_to_write_data(struct nfs_write_data *data,
> }
>
> static inline int pnfs_return_layout(struct inode *ino,
> - struct pnfs_layout_range *range,
> - bool wait)
> + struct pnfs_layout_range *range)
> {
> return 0;
> }
next prev parent reply other threads:[~2011-04-22 8:31 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 16:46 [RFC 0/27] pnfs-submit for 2.6.40 Benny Halevy
2011-04-20 17:26 ` [RFC 01/27] pnfs: CB_NOTIFY_DEVICEID Benny Halevy
2011-04-20 19:41 ` Trond Myklebust
2011-04-22 6:22 ` Benny Halevy
2011-04-20 17:26 ` [RFC 02/27] pnfs: direct i/o Benny Halevy
2011-04-20 17:26 ` [RFC 03/27] pnfs: layoutreturn Benny Halevy
2011-04-20 19:53 ` Trond Myklebust
2011-04-22 6:52 ` Benny Halevy
2011-04-22 8:04 ` [PATCH 1/6] SQUASHME: call pnfs_return_layout right before pnfs_destroy_layout Benny Halevy
2011-04-22 8:04 ` [PATCH 2/6] SQUASHME: remove assert_spin_locked from pnfs_clear_lseg_list Benny Halevy
2011-04-22 8:04 ` [PATCH 3/6] SQUASHME: remove wait parameter from the layoutreturn path Benny Halevy
2011-04-22 8:31 ` Benny Halevy [this message]
2011-04-22 8:05 ` [PATCH 4/6] SQUASHME: remove return_type field from nfs4_layoutreturn_args Benny Halevy
2011-04-22 8:05 ` [PATCH 5/6] SQUASHME: remove range " Benny Halevy
2011-04-22 8:05 ` [PATCH 6/6] SQUASHME: no need to send layoutcommit from _pnfs_return_layout Benny Halevy
2011-04-20 17:26 ` [RFC 04/27] pnfs: layoutret_on_setattr Benny Halevy
2011-04-20 20:03 ` Trond Myklebust
2011-04-22 8:23 ` Benny Halevy
2011-04-20 17:26 ` [RFC 05/27] pnfs: Use byte-range layout segments Benny Halevy
2011-04-20 17:26 ` [RFC 06/27] pnfs: encode_layoutreturn Benny Halevy
2011-04-20 20:16 ` Trond Myklebust
2011-04-22 8:26 ` Benny Halevy
2011-04-20 17:27 ` [RFC 07/27] pnfs: encode_layoutcommit Benny Halevy
2011-04-20 20:18 ` Trond Myklebust
2011-04-22 8:48 ` Benny Halevy
2011-04-20 17:27 ` [RFC 08/27] pnfs: {setup,cleanup}_layoutcommit Benny Halevy
2011-04-20 20:22 ` Trond Myklebust
2011-04-20 17:27 ` [RFC 09/27] pnfs: support for non-rpc layout drivers Benny Halevy
2011-04-20 20:34 ` Trond Myklebust
2011-04-22 9:03 ` Benny Halevy
2011-04-20 17:27 ` [RFC 10/27] pnfs: {,un}set_layoutdriver methods Benny Halevy
2011-04-20 17:27 ` [RFC 11/27] pnfs: per mount layout driver private data Benny Halevy
2011-04-20 20:36 ` Trond Myklebust
2011-04-22 9:05 ` Benny Halevy
2011-04-20 17:27 ` [RFC 12/27] pnfs: alloc and free layout_hdr layoutdriver methods Benny Halevy
2011-04-20 20:43 ` Trond Myklebust
2011-04-22 9:09 ` Benny Halevy
2011-04-20 17:27 ` [RFC 13/27] pnfs: client stats Benny Halevy
2011-04-20 17:28 ` [RFC 14/27] pnfsd: introduce exp_xdr.h Benny Halevy
2011-04-20 17:28 ` [RFC 15/27] pnfs-obj: pnfs_osd XDR definitions Benny Halevy
2011-04-20 20:49 ` Trond Myklebust
2011-04-22 9:11 ` Benny Halevy
2011-04-20 17:28 ` [RFC 16/27] pnfs-obj: pnfs_osd XDR client implementations Benny Halevy
2011-04-20 17:28 ` [RFC 17/27] exofs: pnfs-tree: Remove pnfs-osd private definitions Benny Halevy
2011-04-20 17:28 ` [RFC 18/27] pnfs-obj: Define PNFS_OBJLAYOUT Kconfig option Benny Halevy
2011-04-20 17:28 ` [RFC 19/27] pnfs-obj: objlayout driver skeleton Benny Halevy
2011-04-20 17:28 ` [RFC 20/27] pnfs-obj: objio_osd device information retrieval and caching Benny Halevy
2011-04-20 17:28 ` [RFC 21/27] pnfs-obj: objio_osd real IO implementation Benny Halevy
2011-04-20 17:29 ` [RFC 22/27] sunrpc: New xdr_rewind_stream() Benny Halevy
2011-04-20 17:29 ` [RFC 23/27] pnfs-obj: objlayout_encode_layoutreturn Implementation Benny Halevy
2011-04-20 17:29 ` [RFC 24/27] pnfs-obj: objio_osd report osd_errors for layoutreturn Benny Halevy
2011-04-20 17:29 ` [RFC 25/27] pnfs-obj: objlayout_encode_layoutcommit implementation Benny Halevy
2011-04-20 17:29 ` [RFC 26/27] pnfs-obj: objio_osd: RAID0 support Benny Halevy
2011-04-20 17:29 ` [RFC 27/27] pnfs-obj: objio_osd: groups support Benny Halevy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DB13CF1.8070300@panasas.com \
--to=bhalevy@panasas.com \
--cc=Trond.Myklebust@netapp.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.