From: Benny Halevy <bhalevy@panasas.com>
To: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] pnfs-submit: Dynamically load the nfslayoutdriver
Date: Tue, 25 May 2010 09:55:15 +0300 [thread overview]
Message-ID: <4BFB7453.4080605@panasas.com> (raw)
In-Reply-To: <1274722623-11078-2-git-send-email-Ricardo.Labiaga@netapp.com>
On May. 24, 2010, 20:37 +0300, Ricardo Labiaga <Ricardo.Labiaga@netapp.com> wrote:
> Load the files layout driver if the server indicates that it supports
> LAYOUT4_NFSV4_1_FILES. Other layouts can be loaded in a similar fashion.
> The module can be blacklisted to disable pNFS support for the corresponding
> layout type.
>
> Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Committed at pnfs-all-2.6.34-2010-05-25
Thanks!
Benny
> ---
> fs/nfs/pnfs.c | 17 +++++++++++++++--
> fs/nfs/pnfs.h | 2 ++
> 2 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index 57d3ff0..6a89279 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -205,12 +205,24 @@ unmount_pnfs_layoutdriver(struct nfs_server *nfss)
> void
> set_pnfs_layoutdriver(struct nfs_server *server, u32 id)
> {
> - struct pnfs_module *mod;
> + struct pnfs_module *mod = NULL;
>
> if (server->pnfs_curr_ld)
> return;
>
> - if (id > 0 && find_pnfs(id, &mod)) {
> + if (!find_pnfs(id, &mod)) {
> + switch (id) {
> + case LAYOUT_NFSV4_1_FILES:
> + request_module(LAYOUT_NFSV4_1_FILES_MODULE);
> + break;
> + default:
> + goto out_not_found;
> + };
> +
> + find_pnfs(id, &mod);
> + }
> +
> + if (mod) {
> if (mod->pnfs_ld_type->ld_io_ops->initialize_mountpoint(
> server->nfs_client)) {
> printk(KERN_ERR "%s: Error initializing mount point "
> @@ -227,6 +239,7 @@ set_pnfs_layoutdriver(struct nfs_server *server, u32 id)
> return;
> }
>
> +out_not_found:
> dprintk("%s: No pNFS module found for %u. ", __func__, id);
> out_err:
> dprintk("Using NFSv4 I/O\n");
> diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
> index b80157b..dac955e 100644
> --- a/fs/nfs/pnfs.h
> +++ b/fs/nfs/pnfs.h
> @@ -80,6 +80,8 @@ void _pnfs_direct_init_io(struct inode *inode, struct nfs_open_context *ctx,
> (srv)->pnfs_curr_ld->ld_policy_ops && \
> (srv)->pnfs_curr_ld->ld_policy_ops->opname)
>
> +#define LAYOUT_NFSV4_1_FILES_MODULE "nfslayoutdriver"
> +
> static inline int lo_fail_bit(u32 iomode)
> {
> return iomode == IOMODE_RW ?
next prev parent reply other threads:[~2010-05-25 6:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-24 17:37 [PATCH 1/2] SQUASHME: pnfs-submit: Use LAYOUT_NFSV4_1_FILES instead of LAYOUT_NFSV4_FILES Ricardo Labiaga
2010-05-24 17:37 ` [PATCH 2/2] pnfs-submit: Dynamically load the nfslayoutdriver Ricardo Labiaga
2010-05-25 6:55 ` Benny Halevy [this message]
2010-05-25 5:56 ` [PATCH 1/3] SQUASHME: pnfsd: dlm: fixup LAYOUT_NFSV4_1_FILES Benny Halevy
2010-05-25 5:56 ` [PATCH 2/3] SQUASHME: pnfsd-lexp: " Benny Halevy
2010-05-25 5:56 ` [PATCH 3/3] SQUASHME: spnfs: " Benny Halevy
2010-05-25 11:20 ` Boaz Harrosh
2010-05-25 14:44 ` Benny Halevy
2010-05-25 6:55 ` [PATCH 1/2] SQUASHME: pnfs-submit: Use LAYOUT_NFSV4_1_FILES instead of LAYOUT_NFSV4_FILES 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=4BFB7453.4080605@panasas.com \
--to=bhalevy@panasas.com \
--cc=Ricardo.Labiaga@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.