linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Tom Haynes <thomas.haynes@primarydata.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
	Linux NFS Mailing list <linux-nfs@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [V2 2/2] nfsd: Add a super simple flex file server
Date: Thu, 26 May 2016 09:35:15 +0200	[thread overview]
Message-ID: <20160526073515.GA22814@lst.de> (raw)
In-Reply-To: <1464209035-84591-3-git-send-email-loghyr@primarydata.com>

>  void nfsd4_setup_layout_type(struct svc_export *exp)
>  {
> +#if defined(CONFIG_NFSD_BLOCKLAYOUT) || defined(CONFIG_NFSD_SCSILAYOUT)
>  	struct super_block *sb = exp->ex_path.mnt->mnt_sb;
> +#endif
>  
>  	if (!(exp->ex_flags & NFSEXP_PNFS))
>  		return;
>  
>  	/*
> -	 * Check if the file system supports exporting a block-like layout.
> +	 * If flex file is configured, use it by default. Otherwise
> +	 * check if the file system supports exporting a block-like layout.
>  	 * If the block device supports reservations prefer the SCSI layout,
>  	 * otherwise advertise the block layout.
>  	 */
> +#ifdef CONFIG_NFSD_FLEXFILELAYOUT
> +	exp->ex_layout_type = LAYOUT_FLEX_FILES;
> +#endif
>  #ifdef CONFIG_NFSD_BLOCKLAYOUT
> +	/* overwrite flex file layout selection if needed */

So my evil attempt to let you take on the multi-layout support didn't
pan out :)

But given that we don't enable pnfs by defaul this should still be ok,
so:

Reviewed-by: Christoph Hellwig <hch@lst.de>

      parent reply	other threads:[~2016-05-26  7:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 20:43 [V2 0/2] Super simple flex file server Tom Haynes
2016-05-25 20:43 ` [V2 1/2] nfsd: flex file device id encoding will need the server address Tom Haynes
2016-05-25 20:43 ` [V2 2/2] nfsd: Add a super simple flex file server Tom Haynes
2016-05-25 20:45   ` The Loghyr
2016-05-26  7:35   ` Christoph Hellwig [this message]

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=20160526073515.GA22814@lst.de \
    --to=hch@lst.de \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=thomas.haynes@primarydata.com \
    /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 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).