linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfsd: allow SCSI layout support without Block layout
@ 2016-07-06  1:48 Benjamin Coddington
  2016-07-06  9:19 ` Dave Chinner
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Coddington @ 2016-07-06  1:48 UTC (permalink / raw)
  To: xfs; +Cc: bfields, Christoph Hellwig

We shouldn't have to configure both NFSD_BLOCKLAYOUT and NFSD_SCSILAYOUT if
all we want are SCSI layouts on the server, so define the xfs export
operations for either configuration.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
---
 fs/xfs/xfs_export.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_export.c b/fs/xfs/xfs_export.c
index a1b2dd828b9d..b08a5541f292 100644
--- a/fs/xfs/xfs_export.c
+++ b/fs/xfs/xfs_export.c
@@ -246,7 +246,7 @@ const struct export_operations xfs_export_operations = {
 	.fh_to_parent		= xfs_fs_fh_to_parent,
 	.get_parent		= xfs_fs_get_parent,
 	.commit_metadata	= xfs_fs_nfs_commit_metadata,
-#ifdef CONFIG_NFSD_BLOCKLAYOUT
+#if defined(CONFIG_NFSD_BLOCKLAYOUT) || defined(CONFIG_NFSD_SCSILAYOUT)
 	.get_uuid		= xfs_fs_get_uuid,
 	.map_blocks		= xfs_fs_map_blocks,
 	.commit_blocks		= xfs_fs_commit_blocks,
-- 
2.5.5

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] nfsd: allow SCSI layout support without Block layout
  2016-07-06  1:48 [PATCH] nfsd: allow SCSI layout support without Block layout Benjamin Coddington
@ 2016-07-06  9:19 ` Dave Chinner
  2016-07-06  9:58   ` Benjamin Coddington
  0 siblings, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2016-07-06  9:19 UTC (permalink / raw)
  To: Benjamin Coddington; +Cc: bfields, Christoph Hellwig, xfs

On Tue, Jul 05, 2016 at 09:48:47PM -0400, Benjamin Coddington wrote:
> We shouldn't have to configure both NFSD_BLOCKLAYOUT and NFSD_SCSILAYOUT if
> all we want are SCSI layouts on the server, so define the xfs export
> operations for either configuration.
> 
> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>

I don't really like exploding config option dependencies into
subsystems that aren't actually related to the config options.
It's confusing enough laready that we've got XFS code dependent on
PNFSD config options without adding more to it. Instead, I'd
suggest this should be resolved in the kconfig files. i.e. make
CONFIG_NFSD_SCSILAYOUT=y select CONFIG_NFSD_BLOCKLAYOUT to resolve
the config dependency at config time.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] nfsd: allow SCSI layout support without Block layout
  2016-07-06  9:19 ` Dave Chinner
@ 2016-07-06  9:58   ` Benjamin Coddington
  2016-07-06 12:43     ` J. Bruce Fields
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Coddington @ 2016-07-06  9:58 UTC (permalink / raw)
  To: Dave Chinner; +Cc: bfields, Christoph Hellwig, xfs

On 6 Jul 2016, at 5:19, Dave Chinner wrote:

> On Tue, Jul 05, 2016 at 09:48:47PM -0400, Benjamin Coddington wrote:
>> We shouldn't have to configure both NFSD_BLOCKLAYOUT and 
>> NFSD_SCSILAYOUT if
>> all we want are SCSI layouts on the server, so define the xfs export
>> operations for either configuration.
>>
>> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
>
> I don't really like exploding config option dependencies into
> subsystems that aren't actually related to the config options.
> It's confusing enough laready that we've got XFS code dependent on
> PNFSD config options without adding more to it. Instead, I'd
> suggest this should be resolved in the kconfig files. i.e. make
> CONFIG_NFSD_SCSILAYOUT=y select CONFIG_NFSD_BLOCKLAYOUT to resolve
> the config dependency at config time.

But the point is to leave CONFIG_NFSD_BLOCKLAYOUT undefined otherwise 
knfsd
will advertise block layouts to clients -- which we don't want.

Would a third define specific for xfs_export_operations that gets
set in kconfig files work for you?  Something like XFS_PNFS_EXPORT_OPS.

Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] nfsd: allow SCSI layout support without Block layout
  2016-07-06  9:58   ` Benjamin Coddington
@ 2016-07-06 12:43     ` J. Bruce Fields
  2016-07-06 22:16       ` Dave Chinner
  0 siblings, 1 reply; 7+ messages in thread
From: J. Bruce Fields @ 2016-07-06 12:43 UTC (permalink / raw)
  To: Benjamin Coddington; +Cc: Christoph Hellwig, xfs

On Wed, Jul 06, 2016 at 05:58:09AM -0400, Benjamin Coddington wrote:
> On 6 Jul 2016, at 5:19, Dave Chinner wrote:
> 
> >On Tue, Jul 05, 2016 at 09:48:47PM -0400, Benjamin Coddington wrote:
> >>We shouldn't have to configure both NFSD_BLOCKLAYOUT and
> >>NFSD_SCSILAYOUT if
> >>all we want are SCSI layouts on the server, so define the xfs export
> >>operations for either configuration.
> >>
> >>Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
> >
> >I don't really like exploding config option dependencies into
> >subsystems that aren't actually related to the config options.
> >It's confusing enough laready that we've got XFS code dependent on
> >PNFSD config options without adding more to it. Instead, I'd
> >suggest this should be resolved in the kconfig files. i.e. make
> >CONFIG_NFSD_SCSILAYOUT=y select CONFIG_NFSD_BLOCKLAYOUT to resolve
> >the config dependency at config time.
> 
> But the point is to leave CONFIG_NFSD_BLOCKLAYOUT undefined
> otherwise knfsd
> will advertise block layouts to clients -- which we don't want.
> 
> Would a third define specific for xfs_export_operations that gets
> set in kconfig files work for you?  Something like XFS_PNFS_EXPORT_OPS.

That makes sense to me....

--b.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] nfsd: allow SCSI layout support without Block layout
  2016-07-06 12:43     ` J. Bruce Fields
@ 2016-07-06 22:16       ` Dave Chinner
  2016-07-06 22:41         ` J. Bruce Fields
  2016-07-07  9:29         ` Benjamin Coddington
  0 siblings, 2 replies; 7+ messages in thread
From: Dave Chinner @ 2016-07-06 22:16 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Benjamin Coddington, Christoph Hellwig, xfs

On Wed, Jul 06, 2016 at 08:43:26AM -0400, J. Bruce Fields wrote:
> On Wed, Jul 06, 2016 at 05:58:09AM -0400, Benjamin Coddington wrote:
> > On 6 Jul 2016, at 5:19, Dave Chinner wrote:
> > 
> > >On Tue, Jul 05, 2016 at 09:48:47PM -0400, Benjamin Coddington wrote:
> > >>We shouldn't have to configure both NFSD_BLOCKLAYOUT and
> > >>NFSD_SCSILAYOUT if
> > >>all we want are SCSI layouts on the server, so define the xfs export
> > >>operations for either configuration.
> > >>
> > >>Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
> > >
> > >I don't really like exploding config option dependencies into
> > >subsystems that aren't actually related to the config options.
> > >It's confusing enough laready that we've got XFS code dependent on
> > >PNFSD config options without adding more to it. Instead, I'd
> > >suggest this should be resolved in the kconfig files. i.e. make
> > >CONFIG_NFSD_SCSILAYOUT=y select CONFIG_NFSD_BLOCKLAYOUT to resolve
> > >the config dependency at config time.
> > 
> > But the point is to leave CONFIG_NFSD_BLOCKLAYOUT undefined
> > otherwise knfsd
> > will advertise block layouts to clients -- which we don't want.

Pnfsd layout is determined at compile time?  That's seems less than
useful to me for distros wanting to support for multiple layout
types in the one kernel. i.e. Shouldn't the layout to be advertised
be something like a per-export configuration option rather than
determined at compile time define?

> > Would a third define specific for xfs_export_operations that gets
> > set in kconfig files work for you?  Something like XFS_PNFS_EXPORT_OPS.
>
> That makes sense to me....

Sounds good, but I'd drop the "XFS_" prefix because when multiple
filesytems end up supporting it, we don't want to have to select
every single one of them from the PNFSD config options...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] nfsd: allow SCSI layout support without Block layout
  2016-07-06 22:16       ` Dave Chinner
@ 2016-07-06 22:41         ` J. Bruce Fields
  2016-07-07  9:29         ` Benjamin Coddington
  1 sibling, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2016-07-06 22:41 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Benjamin Coddington, Christoph Hellwig, xfs

On Thu, Jul 07, 2016 at 08:16:48AM +1000, Dave Chinner wrote:
> On Wed, Jul 06, 2016 at 08:43:26AM -0400, J. Bruce Fields wrote:
> > On Wed, Jul 06, 2016 at 05:58:09AM -0400, Benjamin Coddington wrote:
> > > On 6 Jul 2016, at 5:19, Dave Chinner wrote:
> > > 
> > > >On Tue, Jul 05, 2016 at 09:48:47PM -0400, Benjamin Coddington wrote:
> > > >>We shouldn't have to configure both NFSD_BLOCKLAYOUT and
> > > >>NFSD_SCSILAYOUT if
> > > >>all we want are SCSI layouts on the server, so define the xfs export
> > > >>operations for either configuration.
> > > >>
> > > >>Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
> > > >
> > > >I don't really like exploding config option dependencies into
> > > >subsystems that aren't actually related to the config options.
> > > >It's confusing enough laready that we've got XFS code dependent on
> > > >PNFSD config options without adding more to it. Instead, I'd
> > > >suggest this should be resolved in the kconfig files. i.e. make
> > > >CONFIG_NFSD_SCSILAYOUT=y select CONFIG_NFSD_BLOCKLAYOUT to resolve
> > > >the config dependency at config time.
> > > 
> > > But the point is to leave CONFIG_NFSD_BLOCKLAYOUT undefined
> > > otherwise knfsd
> > > will advertise block layouts to clients -- which we don't want.
> 
> Pnfsd layout is determined at compile time?

On the server side it's currently controlled just by that and by a
single off-or-on "pnfs" option.  Well, and client behavior also
determines which one's actually negotiated in practice.

> That's seems less than useful to me for distros wanting to support for
> multiple layout types in the one kernel. i.e. Shouldn't the layout to
> be advertised be something like a per-export configuration option
> rather than determined at compile time define?

Yes, eventually we'll want something like that.  For now it's not
terribly interesting.

> > > Would a third define specific for xfs_export_operations that gets
> > > set in kconfig files work for you?  Something like XFS_PNFS_EXPORT_OPS.
> >
> > That makes sense to me....
> 
> Sounds good, but I'd drop the "XFS_" prefix because when multiple
> filesytems end up supporting it, we don't want to have to select
> every single one of them from the PNFSD config options...

OK.

--b.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] nfsd: allow SCSI layout support without Block layout
  2016-07-06 22:16       ` Dave Chinner
  2016-07-06 22:41         ` J. Bruce Fields
@ 2016-07-07  9:29         ` Benjamin Coddington
  1 sibling, 0 replies; 7+ messages in thread
From: Benjamin Coddington @ 2016-07-07  9:29 UTC (permalink / raw)
  To: Dave Chinner; +Cc: J. Bruce Fields, Christoph Hellwig, xfs

On 6 Jul 2016, at 18:16, Dave Chinner wrote:

> On Wed, Jul 06, 2016 at 08:43:26AM -0400, J. Bruce Fields wrote:
>> On Wed, Jul 06, 2016 at 05:58:09AM -0400, Benjamin Coddington wrote:
>>> On 6 Jul 2016, at 5:19, Dave Chinner wrote:
>>>
>>>> On Tue, Jul 05, 2016 at 09:48:47PM -0400, Benjamin Coddington wrote:
>>>>> We shouldn't have to configure both NFSD_BLOCKLAYOUT and
>>>>> NFSD_SCSILAYOUT if
>>>>> all we want are SCSI layouts on the server, so define the xfs export
>>>>> operations for either configuration.
>>>>>
>>>>> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
>>>>
>>>> I don't really like exploding config option dependencies into
>>>> subsystems that aren't actually related to the config options.
>>>> It's confusing enough laready that we've got XFS code dependent on
>>>> PNFSD config options without adding more to it. Instead, I'd
>>>> suggest this should be resolved in the kconfig files. i.e. make
>>>> CONFIG_NFSD_SCSILAYOUT=y select CONFIG_NFSD_BLOCKLAYOUT to resolve
>>>> the config dependency at config time.
>>>
>>> But the point is to leave CONFIG_NFSD_BLOCKLAYOUT undefined
>>> otherwise knfsd
>>> will advertise block layouts to clients -- which we don't want.
>
> Pnfsd layout is determined at compile time?  That's seems less than
> useful to me for distros wanting to support for multiple layout
> types in the one kernel. i.e. Shouldn't the layout to be advertised
> be something like a per-export configuration option rather than
> determined at compile time define?
>
>>> Would a third define specific for xfs_export_operations that gets
>>> set in kconfig files work for you?  Something like XFS_PNFS_EXPORT_OPS.
>>
>> That makes sense to me....
>
> Sounds good, but I'd drop the "XFS_" prefix because when multiple
> filesytems end up supporting it, we don't want to have to select
> every single one of them from the PNFSD config options...

I now think using PNFS_EXPORT_OPS is too general for all layouts, since nfsd
might support additional layout types that require other export_operations
that have nothing to do with out-of-filesystem access to the storage media.
Also, I believe there's been some interest in using the map_blocks and
commit_blocks interface elsewhere.  So, perhaps something like
CONFIG_BLOCK_EXPORT_OPS would be more appropriate. I'm going to run with
that unless someone disagrees.

I'll also send this as a follow-up to this patch instead of a v2, since
combining both changes into one patch would hide this fix to include these
operations for both SCSI and BLOCK layout types.

Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2016-07-07  9:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06  1:48 [PATCH] nfsd: allow SCSI layout support without Block layout Benjamin Coddington
2016-07-06  9:19 ` Dave Chinner
2016-07-06  9:58   ` Benjamin Coddington
2016-07-06 12:43     ` J. Bruce Fields
2016-07-06 22:16       ` Dave Chinner
2016-07-06 22:41         ` J. Bruce Fields
2016-07-07  9:29         ` Benjamin Coddington

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