public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] NFSD: Add v4.2 SEEK support
@ 2014-09-26 17:58 Anna.Schumaker
  2014-09-26 17:58 ` [PATCH v3 1/2] NFSD: Add generic v4.2 infrastructure Anna.Schumaker
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Anna.Schumaker @ 2014-09-26 17:58 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

From: Anna Schumaker <Anna.Schumaker@Netapp.com>

These patches add server support for the NFS v4.2 operation SEEK.  The first
patch adds basic NFS v4.2 infrastructure that all future operations will rely
on.  The second patch adds the SEEK operation.

Changes in v3:
- Rework the switch statement in nfsd4_seek() so we only call vfs_llseek()
  from one place.
- Change XDR encode and decode functions to A + B notation for calculating
  byte counts.

These patches and the corresponding client patch are avaliable in the [seek]
branch of:

	git://git.linux-nfs.org/projects/anna/linux-nfs.git


Questions?  Comments?  Thoughts?

Anna


Anna Schumaker (2):
  NFSD: Add generic v4.2 infrastructure
  NFSD: Implement SEEK

 fs/nfsd/nfs4proc.c   | 49 ++++++++++++++++++++++++++++++++++++++++++
 fs/nfsd/nfs4xdr.c    | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/nfsd/xdr4.h       | 14 ++++++++++++
 include/linux/nfs4.h | 23 ++++++++++++++++++--
 4 files changed, 144 insertions(+), 2 deletions(-)

-- 
2.1.0


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

* [PATCH v3 1/2] NFSD: Add generic v4.2 infrastructure
  2014-09-26 17:58 [PATCH v3 0/2] NFSD: Add v4.2 SEEK support Anna.Schumaker
@ 2014-09-26 17:58 ` Anna.Schumaker
  2014-09-26 17:58 ` [PATCH v3 2/2] NFSD: Implement SEEK Anna.Schumaker
  2014-09-26 21:54 ` [PATCH v3 0/2] NFSD: Add v4.2 SEEK support J. Bruce Fields
  2 siblings, 0 replies; 11+ messages in thread
From: Anna.Schumaker @ 2014-09-26 17:58 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

From: Anna Schumaker <Anna.Schumaker@netapp.com>

It's cleaner to introduce everything at once and have the server reply
with "not supported" than it would be to introduce extra operations when
implementing a specific one in the middle of the list.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
---
 fs/nfsd/nfs4xdr.c    | 28 ++++++++++++++++++++++++++++
 include/linux/nfs4.h | 18 ++++++++++++++++--
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index f9821ce..94dde7b 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1593,6 +1593,20 @@ static nfsd4_dec nfsd4_dec_ops[] = {
 	[OP_WANT_DELEGATION]	= (nfsd4_dec)nfsd4_decode_notsupp,
 	[OP_DESTROY_CLIENTID]	= (nfsd4_dec)nfsd4_decode_destroy_clientid,
 	[OP_RECLAIM_COMPLETE]	= (nfsd4_dec)nfsd4_decode_reclaim_complete,
+
+	/* new operations for NFSv4.2 */
+	[OP_ALLOCATE]		= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_COPY]		= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_COPY_NOTIFY]	= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_DEALLOCATE]		= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_IO_ADVISE]		= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_LAYOUTERROR]	= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_LAYOUTSTATS]	= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_OFFLOAD_CANCEL]	= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_OFFLOAD_STATUS]	= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_READ_PLUS]		= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_SEEK]		= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_WRITE_SAME]		= (nfsd4_dec)nfsd4_decode_notsupp,
 };
 
 static inline bool
@@ -3822,6 +3836,20 @@ static nfsd4_enc nfsd4_enc_ops[] = {
 	[OP_WANT_DELEGATION]	= (nfsd4_enc)nfsd4_encode_noop,
 	[OP_DESTROY_CLIENTID]	= (nfsd4_enc)nfsd4_encode_noop,
 	[OP_RECLAIM_COMPLETE]	= (nfsd4_enc)nfsd4_encode_noop,
+
+	/* NFSv4.2 operations */
+	[OP_ALLOCATE]		= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_COPY]		= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_COPY_NOTIFY]	= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_DEALLOCATE]		= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_IO_ADVISE]		= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_LAYOUTERROR]	= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_LAYOUTSTATS]	= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_OFFLOAD_CANCEL]	= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_OFFLOAD_STATUS]	= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_READ_PLUS]		= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_SEEK]		= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_WRITE_SAME]		= (nfsd4_enc)nfsd4_encode_noop,
 };
 
 /*
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index 79b2a0f..cf38224 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -110,6 +110,20 @@ enum nfs_opnum4 {
 	OP_DESTROY_CLIENTID = 57,
 	OP_RECLAIM_COMPLETE = 58,
 
+	/* nfs42 */
+	OP_ALLOCATE = 59,
+	OP_COPY = 60,
+	OP_COPY_NOTIFY = 61,
+	OP_DEALLOCATE = 62,
+	OP_IO_ADVISE = 63,
+	OP_LAYOUTERROR = 64,
+	OP_LAYOUTSTATS = 65,
+	OP_OFFLOAD_CANCEL = 66,
+	OP_OFFLOAD_STATUS = 67,
+	OP_READ_PLUS = 68,
+	OP_SEEK = 69,
+	OP_WRITE_SAME = 70,
+
 	OP_ILLEGAL = 10044,
 };
 
@@ -117,10 +131,10 @@ enum nfs_opnum4 {
 Needs to be updated if more operations are defined in future.*/
 
 #define FIRST_NFS4_OP	OP_ACCESS
-#define LAST_NFS4_OP 	OP_RECLAIM_COMPLETE
+#define LAST_NFS4_OP 	OP_WRITE_SAME
 #define LAST_NFS40_OP	OP_RELEASE_LOCKOWNER
 #define LAST_NFS41_OP	OP_RECLAIM_COMPLETE
-#define LAST_NFS42_OP	OP_RECLAIM_COMPLETE
+#define LAST_NFS42_OP	OP_WRITE_SAME
 
 enum nfsstat4 {
 	NFS4_OK = 0,
-- 
2.1.0


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

* [PATCH v3 2/2] NFSD: Implement SEEK
  2014-09-26 17:58 [PATCH v3 0/2] NFSD: Add v4.2 SEEK support Anna.Schumaker
  2014-09-26 17:58 ` [PATCH v3 1/2] NFSD: Add generic v4.2 infrastructure Anna.Schumaker
@ 2014-09-26 17:58 ` Anna.Schumaker
  2014-09-26 21:54 ` [PATCH v3 0/2] NFSD: Add v4.2 SEEK support J. Bruce Fields
  2 siblings, 0 replies; 11+ messages in thread
From: Anna.Schumaker @ 2014-09-26 17:58 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

From: Anna Schumaker <Anna.Schumaker@netapp.com>

This patch adds server support for the NFS v4.2 operation SEEK, which
returns the position of the next hole or data segment in a file.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
---
 fs/nfsd/nfs4proc.c   | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 fs/nfsd/nfs4xdr.c    | 36 ++++++++++++++++++++++++++++++++++--
 fs/nfsd/xdr4.h       | 14 ++++++++++++++
 include/linux/nfs4.h |  5 +++++
 4 files changed, 102 insertions(+), 2 deletions(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 5e0dc52..cdeb3cf 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1013,6 +1013,49 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
 	return status;
 }
 
+static __be32
+nfsd4_seek(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+		struct nfsd4_seek *seek)
+{
+	int whence;
+	__be32 status;
+	struct file *file;
+
+	status = nfs4_preprocess_stateid_op(SVC_NET(rqstp), cstate,
+					    &seek->seek_stateid,
+					    RD_STATE, &file);
+	if (status) {
+		dprintk("NFSD: nfsd4_seek: couldn't process stateid!\n");
+		return status;
+	}
+
+	switch (seek->seek_whence) {
+	case NFS4_CONTENT_DATA:
+		whence = SEEK_DATA;
+		break;
+	case NFS4_CONTENT_HOLE:
+		whence = SEEK_HOLE;
+		break;
+	default:
+		status = nfserr_union_notsupp;
+		goto out;
+	}
+
+	/*
+	 * Note:  This call does change file->f_pos, but nothing in NFSD
+	 *        should ever file->f_pos.
+	 */
+	seek->seek_pos = vfs_llseek(file, seek->seek_offset, whence);
+	if (seek->seek_pos < 0)
+		status = nfserrno(seek->seek_pos);
+	else if (seek->seek_pos >= i_size_read(file_inode(file)))
+		seek->seek_eof = true;
+
+out:
+	fput(file);
+	return status;
+}
+
 /* This routine never returns NFS_OK!  If there are no other errors, it
  * will return NFSERR_SAME or NFSERR_NOT_SAME depending on whether the
  * attributes matched.  VERIFY is implemented by mapping NFSERR_SAME
@@ -1881,6 +1924,12 @@ static struct nfsd4_operation nfsd4_ops[] = {
 		.op_get_currentstateid = (stateid_getter)nfsd4_get_freestateid,
 		.op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
 	},
+
+	/* NFSv4.2 operations */
+	[OP_SEEK] = {
+		.op_func = (nfsd4op_func)nfsd4_seek,
+		.op_name = "OP_SEEK",
+	},
 };
 
 int nfsd4_max_reply(struct svc_rqst *rqstp, struct nfsd4_op *op)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 94dde7b..d20e0a5 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1521,6 +1521,22 @@ static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp, str
 }
 
 static __be32
+nfsd4_decode_seek(struct nfsd4_compoundargs *argp, struct nfsd4_seek *seek)
+{
+	DECODE_HEAD;
+
+	status = nfsd4_decode_stateid(argp, &seek->seek_stateid);
+	if (status)
+		return status;
+
+	READ_BUF(8 + 4);
+	p = xdr_decode_hyper(p, &seek->seek_offset);
+	seek->seek_whence = be32_to_cpup(p);
+
+	DECODE_TAIL;
+}
+
+static __be32
 nfsd4_decode_noop(struct nfsd4_compoundargs *argp, void *p)
 {
 	return nfs_ok;
@@ -1605,7 +1621,7 @@ static nfsd4_dec nfsd4_dec_ops[] = {
 	[OP_OFFLOAD_CANCEL]	= (nfsd4_dec)nfsd4_decode_notsupp,
 	[OP_OFFLOAD_STATUS]	= (nfsd4_dec)nfsd4_decode_notsupp,
 	[OP_READ_PLUS]		= (nfsd4_dec)nfsd4_decode_notsupp,
-	[OP_SEEK]		= (nfsd4_dec)nfsd4_decode_notsupp,
+	[OP_SEEK]		= (nfsd4_dec)nfsd4_decode_seek,
 	[OP_WRITE_SAME]		= (nfsd4_dec)nfsd4_decode_notsupp,
 };
 
@@ -3765,6 +3781,22 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, __be32 nfserr,
 }
 
 static __be32
+nfsd4_encode_seek(struct nfsd4_compoundres *resp, __be32 nfserr,
+		  struct nfsd4_seek *seek)
+{
+	__be32 *p;
+
+	if (nfserr)
+		return nfserr;
+
+	p = xdr_reserve_space(&resp->xdr, 4 + 8);
+	*p++ = cpu_to_be32(seek->seek_eof);
+	p = xdr_encode_hyper(p, seek->seek_pos);
+
+	return nfserr;
+}
+
+static __be32
 nfsd4_encode_noop(struct nfsd4_compoundres *resp, __be32 nfserr, void *p)
 {
 	return nfserr;
@@ -3848,7 +3880,7 @@ static nfsd4_enc nfsd4_enc_ops[] = {
 	[OP_OFFLOAD_CANCEL]	= (nfsd4_enc)nfsd4_encode_noop,
 	[OP_OFFLOAD_STATUS]	= (nfsd4_enc)nfsd4_encode_noop,
 	[OP_READ_PLUS]		= (nfsd4_enc)nfsd4_encode_noop,
-	[OP_SEEK]		= (nfsd4_enc)nfsd4_encode_noop,
+	[OP_SEEK]		= (nfsd4_enc)nfsd4_encode_seek,
 	[OP_WRITE_SAME]		= (nfsd4_enc)nfsd4_encode_noop,
 };
 
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 465e779..5720e94 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -428,6 +428,17 @@ struct nfsd4_reclaim_complete {
 	u32 rca_one_fs;
 };
 
+struct nfsd4_seek {
+	/* request */
+	stateid_t	seek_stateid;
+	loff_t		seek_offset;
+	u32		seek_whence;
+
+	/* response */
+	u32		seek_eof;
+	loff_t		seek_pos;
+};
+
 struct nfsd4_op {
 	int					opnum;
 	__be32					status;
@@ -473,6 +484,9 @@ struct nfsd4_op {
 		struct nfsd4_reclaim_complete	reclaim_complete;
 		struct nfsd4_test_stateid	test_stateid;
 		struct nfsd4_free_stateid	free_stateid;
+
+		/* NFSv4.2 */
+		struct nfsd4_seek		seek;
 	} u;
 	struct nfs4_replay *			replay;
 };
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index cf38224..026b0c0 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -550,4 +550,9 @@ struct nfs4_deviceid {
 	char data[NFS4_DEVICEID4_SIZE];
 };
 
+enum data_content4 {
+	NFS4_CONTENT_DATA		= 0,
+	NFS4_CONTENT_HOLE		= 1,
+};
+
 #endif
-- 
2.1.0


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

* Re: [PATCH v3 0/2] NFSD: Add v4.2 SEEK support
  2014-09-26 17:58 [PATCH v3 0/2] NFSD: Add v4.2 SEEK support Anna.Schumaker
  2014-09-26 17:58 ` [PATCH v3 1/2] NFSD: Add generic v4.2 infrastructure Anna.Schumaker
  2014-09-26 17:58 ` [PATCH v3 2/2] NFSD: Implement SEEK Anna.Schumaker
@ 2014-09-26 21:54 ` J. Bruce Fields
       [not found]   ` <CAFX2Jfm2pDmz7vKPVNe8yZScVT-MvVD=+AsfOgdrPfKwgaLTXw@mail.gmail.com>
  2 siblings, 1 reply; 11+ messages in thread
From: J. Bruce Fields @ 2014-09-26 21:54 UTC (permalink / raw)
  To: Anna.Schumaker; +Cc: linux-nfs

On Fri, Sep 26, 2014 at 01:58:25PM -0400, Anna.Schumaker@netapp.com wrote:
> From: Anna Schumaker <Anna.Schumaker@Netapp.com>
> 
> These patches add server support for the NFS v4.2 operation SEEK.  The first
> patch adds basic NFS v4.2 infrastructure that all future operations will rely
> on.  The second patch adds the SEEK operation.

How are you testing these?

It looks OK to me, so I'll likely commit in a few days if there are no
objections.

--b.

> 
> Changes in v3:
> - Rework the switch statement in nfsd4_seek() so we only call vfs_llseek()
>   from one place.
> - Change XDR encode and decode functions to A + B notation for calculating
>   byte counts.
> 
> These patches and the corresponding client patch are avaliable in the [seek]
> branch of:
> 
> 	git://git.linux-nfs.org/projects/anna/linux-nfs.git
> 
> 
> Questions?  Comments?  Thoughts?
> 
> Anna
> 
> 
> Anna Schumaker (2):
>   NFSD: Add generic v4.2 infrastructure
>   NFSD: Implement SEEK
> 
>  fs/nfsd/nfs4proc.c   | 49 ++++++++++++++++++++++++++++++++++++++++++
>  fs/nfsd/nfs4xdr.c    | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  fs/nfsd/xdr4.h       | 14 ++++++++++++
>  include/linux/nfs4.h | 23 ++++++++++++++++++--
>  4 files changed, 144 insertions(+), 2 deletions(-)
> 
> -- 
> 2.1.0
> 

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

* Re: [PATCH v3 0/2] NFSD: Add v4.2 SEEK support
       [not found]   ` <CAFX2Jfm2pDmz7vKPVNe8yZScVT-MvVD=+AsfOgdrPfKwgaLTXw@mail.gmail.com>
@ 2014-10-01 18:21     ` J. Bruce Fields
  2014-10-28 21:07     ` J. Bruce Fields
  1 sibling, 0 replies; 11+ messages in thread
From: J. Bruce Fields @ 2014-10-01 18:21 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: linux-nfs@vger.kernel.org

On Tue, Sep 30, 2014 at 01:00:24PM -0400, Anna Schumaker wrote:
> I'm testing with xfstests #285.  It's an lseek specific test, and helped
> find a few edge cases during development.

I think you told me that already and I forgot.  Bah.

OK, applied.  Thanks!

--b.

> 
> Anna
> 
> On Fri, Sep 26, 2014 at 5:54 PM, J. Bruce Fields <bfields@fieldses.org>
> wrote:
> 
> > On Fri, Sep 26, 2014 at 01:58:25PM -0400, Anna.Schumaker@netapp.com wrote:
> > > From: Anna Schumaker <Anna.Schumaker@Netapp.com>
> > >
> > > These patches add server support for the NFS v4.2 operation SEEK.  The
> > first
> > > patch adds basic NFS v4.2 infrastructure that all future operations will
> > rely
> > > on.  The second patch adds the SEEK operation.
> >
> > How are you testing these?
> >
> > It looks OK to me, so I'll likely commit in a few days if there are no
> > objections.
> >
> > --b.
> >
> > >
> > > Changes in v3:
> > > - Rework the switch statement in nfsd4_seek() so we only call
> > vfs_llseek()
> > >   from one place.
> > > - Change XDR encode and decode functions to A + B notation for
> > calculating
> > >   byte counts.
> > >
> > > These patches and the corresponding client patch are avaliable in the
> > [seek]
> > > branch of:
> > >
> > >       git://git.linux-nfs.org/projects/anna/linux-nfs.git
> > >
> > >
> > > Questions?  Comments?  Thoughts?
> > >
> > > Anna
> > >
> > >
> > > Anna Schumaker (2):
> > >   NFSD: Add generic v4.2 infrastructure
> > >   NFSD: Implement SEEK
> > >
> > >  fs/nfsd/nfs4proc.c   | 49 ++++++++++++++++++++++++++++++++++++++++++
> > >  fs/nfsd/nfs4xdr.c    | 60
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++
> > >  fs/nfsd/xdr4.h       | 14 ++++++++++++
> > >  include/linux/nfs4.h | 23 ++++++++++++++++++--
> > >  4 files changed, 144 insertions(+), 2 deletions(-)
> > >
> > > --
> > > 2.1.0
> > >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >

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

* Re: [PATCH v3 0/2] NFSD: Add v4.2 SEEK support
       [not found]   ` <CAFX2Jfm2pDmz7vKPVNe8yZScVT-MvVD=+AsfOgdrPfKwgaLTXw@mail.gmail.com>
  2014-10-01 18:21     ` J. Bruce Fields
@ 2014-10-28 21:07     ` J. Bruce Fields
  2014-10-28 21:09       ` Anna Schumaker
  1 sibling, 1 reply; 11+ messages in thread
From: J. Bruce Fields @ 2014-10-28 21:07 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: linux-nfs@vger.kernel.org

On Tue, Sep 30, 2014 at 01:00:24PM -0400, Anna Schumaker wrote:
> I'm testing with xfstests #285.  It's an lseek specific test, and helped
> find a few edge cases during development.

Any hints?  I did basically:

	yum install xfsprogs-devel libattr-devel libacl-devel
	git clone git://oss.sgi.com/xfs/cmds/xfstests.git
	cd xfstests
	make
	make install
	cat >local.config <<EOF
	FSTYP=nfs
	TEST_DEV=f20-1:/exports/xfs/xfstests
	TEST_DIR=/mnt
	NFS_MOUNT_OPTIONS='-overs=4.2,sec=sys'
	EOF
	./check -nfs generic/285

Passes just fine, but insists on using 4.0 and sec=krb5p, so apparently
NFS_MOUNT_OPTIONS is ignored.

I'm probably missing something basic, I haven't used xfstests before
(shame on me).

--b.

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

* Re: [PATCH v3 0/2] NFSD: Add v4.2 SEEK support
  2014-10-28 21:07     ` J. Bruce Fields
@ 2014-10-28 21:09       ` Anna Schumaker
  2014-10-28 21:17         ` J. Bruce Fields
  0 siblings, 1 reply; 11+ messages in thread
From: Anna Schumaker @ 2014-10-28 21:09 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs@vger.kernel.org

On 10/28/2014 05:07 PM, J. Bruce Fields wrote:
> On Tue, Sep 30, 2014 at 01:00:24PM -0400, Anna Schumaker wrote:
>> I'm testing with xfstests #285.  It's an lseek specific test, and helped
>> find a few edge cases during development.
> 
> Any hints?  I did basically:
> 
> 	yum install xfsprogs-devel libattr-devel libacl-devel
> 	git clone git://oss.sgi.com/xfs/cmds/xfstests.git
> 	cd xfstests
> 	make
> 	make install
> 	cat >local.config <<EOF
> 	FSTYP=nfs
> 	TEST_DEV=f20-1:/exports/xfs/xfstests
> 	TEST_DIR=/mnt
> 	NFS_MOUNT_OPTIONS='-overs=4.2,sec=sys'

Try setting TEST_FS_MOUNT_OPTIONS instead of NFS_MOUNT_OPTIONS.

> 	EOF
> 	./check -nfs generic/285
> 
> Passes just fine, but insists on using 4.0 and sec=krb5p, so apparently
> NFS_MOUNT_OPTIONS is ignored.
> 
> I'm probably missing something basic, I haven't used xfstests before
> (shame on me).
> 
> --b.
> 


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

* Re: [PATCH v3 0/2] NFSD: Add v4.2 SEEK support
  2014-10-28 21:09       ` Anna Schumaker
@ 2014-10-28 21:17         ` J. Bruce Fields
  2014-10-28 21:24           ` J. Bruce Fields
  0 siblings, 1 reply; 11+ messages in thread
From: J. Bruce Fields @ 2014-10-28 21:17 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: linux-nfs@vger.kernel.org

On Tue, Oct 28, 2014 at 05:09:00PM -0400, Anna Schumaker wrote:
> On 10/28/2014 05:07 PM, J. Bruce Fields wrote:
> > On Tue, Sep 30, 2014 at 01:00:24PM -0400, Anna Schumaker wrote:
> >> I'm testing with xfstests #285.  It's an lseek specific test, and helped
> >> find a few edge cases during development.
> > 
> > Any hints?  I did basically:
> > 
> > 	yum install xfsprogs-devel libattr-devel libacl-devel
> > 	git clone git://oss.sgi.com/xfs/cmds/xfstests.git
> > 	cd xfstests
> > 	make
> > 	make install
> > 	cat >local.config <<EOF
> > 	FSTYP=nfs
> > 	TEST_DEV=f20-1:/exports/xfs/xfstests
> > 	TEST_DIR=/mnt
> > 	NFS_MOUNT_OPTIONS='-overs=4.2,sec=sys'
> 
> Try setting TEST_FS_MOUNT_OPTIONS instead of NFS_MOUNT_OPTIONS.

No change.--b.

> 
> > 	EOF
> > 	./check -nfs generic/285
> > 
> > Passes just fine, but insists on using 4.0 and sec=krb5p, so apparently
> > NFS_MOUNT_OPTIONS is ignored.
> > 
> > I'm probably missing something basic, I haven't used xfstests before
> > (shame on me).
> > 
> > --b.
> > 
> 

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

* Re: [PATCH v3 0/2] NFSD: Add v4.2 SEEK support
  2014-10-28 21:17         ` J. Bruce Fields
@ 2014-10-28 21:24           ` J. Bruce Fields
  2014-10-28 21:29             ` Anna Schumaker
  2014-10-28 21:30             ` J. Bruce Fields
  0 siblings, 2 replies; 11+ messages in thread
From: J. Bruce Fields @ 2014-10-28 21:24 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: linux-nfs@vger.kernel.org

On Tue, Oct 28, 2014 at 05:17:28PM -0400, J. Bruce Fields wrote:
> On Tue, Oct 28, 2014 at 05:09:00PM -0400, Anna Schumaker wrote:
> > On 10/28/2014 05:07 PM, J. Bruce Fields wrote:
> > > On Tue, Sep 30, 2014 at 01:00:24PM -0400, Anna Schumaker wrote:
> > >> I'm testing with xfstests #285.  It's an lseek specific test, and helped
> > >> find a few edge cases during development.
> > > 
> > > Any hints?  I did basically:
> > > 
> > > 	yum install xfsprogs-devel libattr-devel libacl-devel
> > > 	git clone git://oss.sgi.com/xfs/cmds/xfstests.git
> > > 	cd xfstests
> > > 	make
> > > 	make install
> > > 	cat >local.config <<EOF
> > > 	FSTYP=nfs
> > > 	TEST_DEV=f20-1:/exports/xfs/xfstests
> > > 	TEST_DIR=/mnt
> > > 	NFS_MOUNT_OPTIONS='-overs=4.2,sec=sys'
> > 
> > Try setting TEST_FS_MOUNT_OPTIONS instead of NFS_MOUNT_OPTIONS.
> 
> No change.--b.

(But TEST_FS_MOUNT_OPTS works.  How was I supposed to figure that out?)

--b.

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

* Re: [PATCH v3 0/2] NFSD: Add v4.2 SEEK support
  2014-10-28 21:24           ` J. Bruce Fields
@ 2014-10-28 21:29             ` Anna Schumaker
  2014-10-28 21:30             ` J. Bruce Fields
  1 sibling, 0 replies; 11+ messages in thread
From: Anna Schumaker @ 2014-10-28 21:29 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs@vger.kernel.org

On 10/28/2014 05:24 PM, J. Bruce Fields wrote:
> On Tue, Oct 28, 2014 at 05:17:28PM -0400, J. Bruce Fields wrote:
>> On Tue, Oct 28, 2014 at 05:09:00PM -0400, Anna Schumaker wrote:
>>> On 10/28/2014 05:07 PM, J. Bruce Fields wrote:
>>>> On Tue, Sep 30, 2014 at 01:00:24PM -0400, Anna Schumaker wrote:
>>>>> I'm testing with xfstests #285.  It's an lseek specific test, and helped
>>>>> find a few edge cases during development.
>>>>
>>>> Any hints?  I did basically:
>>>>
>>>> 	yum install xfsprogs-devel libattr-devel libacl-devel
>>>> 	git clone git://oss.sgi.com/xfs/cmds/xfstests.git
>>>> 	cd xfstests
>>>> 	make
>>>> 	make install
>>>> 	cat >local.config <<EOF
>>>> 	FSTYP=nfs
>>>> 	TEST_DEV=f20-1:/exports/xfs/xfstests
>>>> 	TEST_DIR=/mnt
>>>> 	NFS_MOUNT_OPTIONS='-overs=4.2,sec=sys'
>>>
>>> Try setting TEST_FS_MOUNT_OPTIONS instead of NFS_MOUNT_OPTIONS.
>>
>> No change.--b.
> 
> (But TEST_FS_MOUNT_OPTS works.  How was I supposed to figure that out?)

I double checked my "run xfstests!" script and I guess I am using TEST_FS_MOUNT_OPTS.  Sorry for the typo, I'm glad you figured it out!

Anna
> 
> --b.
> 


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

* Re: [PATCH v3 0/2] NFSD: Add v4.2 SEEK support
  2014-10-28 21:24           ` J. Bruce Fields
  2014-10-28 21:29             ` Anna Schumaker
@ 2014-10-28 21:30             ` J. Bruce Fields
  1 sibling, 0 replies; 11+ messages in thread
From: J. Bruce Fields @ 2014-10-28 21:30 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: linux-nfs@vger.kernel.org

On Tue, Oct 28, 2014 at 05:24:41PM -0400, J. Bruce Fields wrote:
> On Tue, Oct 28, 2014 at 05:17:28PM -0400, J. Bruce Fields wrote:
> > On Tue, Oct 28, 2014 at 05:09:00PM -0400, Anna Schumaker wrote:
> > > On 10/28/2014 05:07 PM, J. Bruce Fields wrote:
> > > > On Tue, Sep 30, 2014 at 01:00:24PM -0400, Anna Schumaker wrote:
> > > >> I'm testing with xfstests #285.  It's an lseek specific test, and helped
> > > >> find a few edge cases during development.
> > > > 
> > > > Any hints?  I did basically:
> > > > 
> > > > 	yum install xfsprogs-devel libattr-devel libacl-devel
> > > > 	git clone git://oss.sgi.com/xfs/cmds/xfstests.git
> > > > 	cd xfstests
> > > > 	make
> > > > 	make install
> > > > 	cat >local.config <<EOF
> > > > 	FSTYP=nfs
> > > > 	TEST_DEV=f20-1:/exports/xfs/xfstests
> > > > 	TEST_DIR=/mnt
> > > > 	NFS_MOUNT_OPTIONS='-overs=4.2,sec=sys'
> > > 
> > > Try setting TEST_FS_MOUNT_OPTIONS instead of NFS_MOUNT_OPTIONS.
> > 
> > No change.--b.
> 
> (But TEST_FS_MOUNT_OPTS works.  How was I supposed to figure that out?)

OK, now my complaint is #285 is passing but I'm not seeing any SEEKs in
the trace.

Well, I'll take another look tomorrow....

--b.

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

end of thread, other threads:[~2014-10-28 21:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-26 17:58 [PATCH v3 0/2] NFSD: Add v4.2 SEEK support Anna.Schumaker
2014-09-26 17:58 ` [PATCH v3 1/2] NFSD: Add generic v4.2 infrastructure Anna.Schumaker
2014-09-26 17:58 ` [PATCH v3 2/2] NFSD: Implement SEEK Anna.Schumaker
2014-09-26 21:54 ` [PATCH v3 0/2] NFSD: Add v4.2 SEEK support J. Bruce Fields
     [not found]   ` <CAFX2Jfm2pDmz7vKPVNe8yZScVT-MvVD=+AsfOgdrPfKwgaLTXw@mail.gmail.com>
2014-10-01 18:21     ` J. Bruce Fields
2014-10-28 21:07     ` J. Bruce Fields
2014-10-28 21:09       ` Anna Schumaker
2014-10-28 21:17         ` J. Bruce Fields
2014-10-28 21:24           ` J. Bruce Fields
2014-10-28 21:29             ` Anna Schumaker
2014-10-28 21:30             ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox