diff options
author | Rick Macklem <rmacklem@FreeBSD.org> | 2018-06-10 19:03:21 +0000 |
---|---|---|
committer | Rick Macklem <rmacklem@FreeBSD.org> | 2018-06-10 19:03:21 +0000 |
commit | 8097753476d28d1cdbe20a9c377f4071b0c52edd (patch) | |
tree | cefb631a4221f5212b19a8cdda73d419127b42ed /sys | |
parent | 7f7bc5b2f974691a958e4672d460c435d8394d33 (diff) | |
download | src-8097753476d28d1cdbe20a9c377f4071b0c52edd.tar.gz src-8097753476d28d1cdbe20a9c377f4071b0c52edd.zip |
Add checks for the Flexible File layout to LayoutRecall callbacks.
The Flexible File layout case wasn't handled by LayoutRecall callbacks
because it just checked for File layout and returned NFSERR_NOMATCHLAYOUT
otherwise. This patch adds the Flexible File layout handling.
Found during testing of the pNFS server.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=334930
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/nfsclient/nfs_clstate.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index c72884482d99..702f81a0465b 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -3422,9 +3422,12 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) else changed = 0; recalltype = fxdr_unsigned(int, *tl); + NFSCL_DEBUG(4, "layt=%d iom=%d ch=%d rectyp=%d\n", + laytype, iomode, changed, recalltype); recallp = malloc(sizeof(*recallp), M_NFSLAYRECALL, M_WAITOK); - if (laytype != NFSLAYOUT_NFSV4_1_FILES) + if (laytype != NFSLAYOUT_NFSV4_1_FILES && + laytype != NFSLAYOUT_FLEXFILE) error = NFSERR_NOMATCHLAYOUT; else if (recalltype == NFSLAYOUTRETURN_FILE) { error = nfsm_getfh(nd, &nfhp); @@ -3441,6 +3444,9 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) error = NFSERR_NOTSUPP; else if (i == 0) error = NFSERR_OPNOTINSESS; + NFSCL_DEBUG(4, "off=%ju len=%ju sq=%u err=%d\n", + (uintmax_t)off, (uintmax_t)len, + stateid.seqid, error); if (error == 0) { NFSLOCKCLSTATE(); clp = nfscl_getclntsess(sessionid); @@ -3453,7 +3459,8 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) lyp); if (lyp != NULL && (lyp->nfsly_flags & - NFSLY_FILES) != 0 && + (NFSLY_FILES | + NFSLY_FLEXFILE)) != 0 && !NFSBCMP(stateid.other, lyp->nfsly_stateid.other, NFSX_STATEIDOTHER)) { |