From: Boaz Harrosh <bharrosh@panasas.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 4/5] NFSv4.1: Add an initialisation callback for pNFS
Date: Thu, 09 Jun 2011 19:53:16 -0700 [thread overview]
Message-ID: <4DF1871C.1070001@panasas.com> (raw)
In-Reply-To: <1307669462-15764-4-git-send-email-Trond.Myklebust@netapp.com>
On 06/09/2011 06:31 PM, Trond Myklebust wrote:
<snip>
> +void
> +pnfs_generic_pg_init_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *req)
> +{
> + BUG_ON(pgio->pg_lseg != NULL);
> +
> + pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode,
> + req->wb_context,
> + req_offset(req),
> + req->wb_bytes,
> + IOMODE_READ,
> + GFP_KERNEL);
> +}
> +EXPORT_SYMBOL_GPL(pnfs_generic_pg_init_read);
> +
> +void
> +pnfs_generic_pg_init_write(struct nfs_pageio_descriptor *pgio, struct nfs_page *req)
> +{
> + BUG_ON(pgio->pg_lseg != NULL);
> +
> + pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode,
> + req->wb_context,
> + req_offset(req),
> + req->wb_bytes,
> + IOMODE_RW,
> + GFP_NOFS);
> +}
> +EXPORT_SYMBOL_GPL(pnfs_generic_pg_init_write);
> +
These two above are identical except the IOMODE_{READ,RW} variable.
Why don't you just have one and let the caller pass the IOMODE_ as a
3rd parameter. Do you expect more code to be added here?
Boaz
next prev parent reply other threads:[~2011-06-10 2:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 1:30 [PATCH 1/5] NFSv4.1: Fix some issues with pnfs_generic_pg_test Trond Myklebust
2011-06-10 1:30 ` [PATCH 2/5] NFSv4.1: Fix an off-by-one error in pnfs_generic_pg_test Trond Myklebust
2011-06-10 1:31 ` [PATCH 3/5] NFS: Cleanup of the nfs_pageio code in preparation for a pnfs bugfix Trond Myklebust
2011-06-10 1:31 ` [PATCH 4/5] NFSv4.1: Add an initialisation callback for pNFS Trond Myklebust
2011-06-10 1:31 ` [PATCH 5/5] NFSv4.1: Fall back to ordinary i/o through the mds if we have no layout segment Trond Myklebust
2011-06-10 2:53 ` Boaz Harrosh [this message]
2011-06-10 4:06 ` [PATCH 4/5] NFSv4.1: Add an initialisation callback for pNFS Benny Halevy
2011-06-10 4:28 ` Boaz Harrosh
2011-06-10 4:43 ` Benny Halevy
2011-06-10 16:14 ` Boaz Harrosh
2011-06-10 16:28 ` Trond Myklebust
2011-06-10 16:57 ` Boaz Harrosh
2011-06-10 17:32 ` Trond Myklebust
2011-06-10 19:29 ` 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=4DF1871C.1070001@panasas.com \
--to=bharrosh@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.