- 08 8月, 2013 1 次提交
-
-
由 Weston Andros Adamson 提交于
- don't BUG_ON() when not SP4_NONE - calculate recv and send reserve sizes correctly Signed-off-by: NWeston Andros Adamson <dros@netapp.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 13 7月, 2013 1 次提交
-
-
由 J. Bruce Fields 提交于
You can turn on or off support for minorversions using e.g. echo "-4.2" >/proc/fs/nfsd/versions However, the current implementation is a little wonky. For example, the above will turn off 4.2 support, but it will also turn *on* 4.1 support. This didn't matter as long as we only had 2 minorversions, which was true till very recently. And do a little cleanup here. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 02 7月, 2013 1 次提交
-
-
由 J. Bruce Fields 提交于
We saw a v4.0 client's create fail as follows: - open create succeeds and gets a read delegation - client attempts to set mode on new file, gets DELAY while server recalls delegation. - client attempts a CLAIM_DELEGATE_CUR open using the delegation, gets error because of new file mode. This probably can't happen on a recent kernel since we're no longer giving out delegations on create opens. Nevertheless, it's a bug--reclaim opens should bypass permission checks. Reported-by: NSteve Dickson <steved@redhat.com> Reported-by: NTrond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 15 5月, 2013 1 次提交
-
-
由 David Quigley 提交于
Implement labeled NFS on the server: encoding and decoding, and writing and reading, of file labels. Enabled with CONFIG_NFSD_V4_SECURITY_LABEL. Signed-off-by: NMatthew N. Dodd <Matthew.Dodd@sparta.com> Signed-off-by: NMiguel Rodel Felipe <Rodel_FM@dsi.a-star.edu.sg> Signed-off-by: NPhua Eu Gene <PHUA_Eu_Gene@dsi.a-star.edu.sg> Signed-off-by: NKhin Mi Mi Aung <Mi_Mi_AUNG@dsi.a-star.edu.sg> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 04 5月, 2013 1 次提交
-
-
由 J. Bruce Fields 提交于
The Linux client is using CLAIM_FH to implement regular opens, not just recovery cases, so it depends on the server to check permissions correctly. Therefore the owner override, which may make sense in the delegation recovery case, isn't right in the CLAIM_FH case. Symptoms: on a client with 49f9a0fa "NFSv4.1: Enable open-by-filehandle", Bryan noticed this: touch test.txt chmod 000 test.txt echo test > test.txt succeeding. Cc: stable@kernel.org Reported-by: NBryan Schumaker <bjschuma@netapp.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 01 5月, 2013 1 次提交
-
-
由 J. Bruce Fields 提交于
We're going out of our way here to remap an error to make rfc 3530 happy--but the rfc itself (nor rfc 1813, which has similar language) gives no justification. And disagrees with local filesystem behavior, with Linux and posix man pages, and knfsd's implemented behavior for v2 and v3. And the documented behavior seems better, in that it gives a little more information--you could implement the 3530 behavior using the posix behavior, but not the other way around. Also, the Linux client makes no attempt to remap this error in the v4 case, so it can end up just returning EEXIST to the application in a case where it should return EISDIR. So honestly I think the rfc's are just buggy here--or in any case it doesn't see worth the trouble to remap this error. Reported-by: NFrank S Filz <ffilz@us.ibm.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 09 4月, 2013 2 次提交
-
-
由 J. Bruce Fields 提交于
More logic that's unnecessary in the 4.1 case. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 J. Bruce Fields 提交于
The replay_owner will never be used in the sessions case. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 08 4月, 2013 1 次提交
-
-
由 J. Bruce Fields 提交于
Closed stateid's are kept around a little while to handle close replays in the 4.0 case. So we stash them in the last-used stateid in the oo_last_closed_stateid field of the open owner. We can free that in encode_seqid_op_tail once the seqid on the open owner is next incremented. But we don't want to do that on the close itself; so we set NFS4_OO_PURGE_CLOSE flag set on the open owner, skip freeing it the first time through encode_seqid_op_tail, then when we see that flag set next time we free it. This is unnecessarily baroque. Instead, just move the logic that increments the seqid out of the xdr code and into the operation code itself. The justification given for the current placement is that we need to wait till the last minute to be sure we know whether the status is a sequence-id-mutating error or not, but examination of the code shows that can't actually happen. Reported-by: NYanchuan Nian <ycnian@gmail.com> Tested-by: NYanchuan Nian <ycnian@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 04 4月, 2013 1 次提交
-
-
由 fanchaoting 提交于
we should return error status directly when nfs4_preprocess_stateid_op return error. Signed-off-by: Nfanchaoting <fanchaoting@cn.fujitsu.com> Cc: stable@vger.kernel.org Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 03 4月, 2013 2 次提交
-
-
由 J. Bruce Fields 提交于
If a client sets an owner (or group_owner or acl) attribute on open for create, and the mapping of that owner to an id fails, then we return BAD_OWNER. But BAD_OWNER is a seqid-mutating error, so we can't shortcut the open processing that case: we have to at least look up the owner so we can find the seqid to bump. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 J. Bruce Fields 提交于
This BUG_ON just crashes the thread a little earlier than it would otherwise--it doesn't seem useful. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 24 1月, 2013 1 次提交
-
-
由 J. Bruce Fields 提交于
It seems slightly simpler to make nfsd4_encode_fattr rather than its callers responsible for advancing the write pointer on success. (Also: the count == 0 check in the verify case looks superfluous. Running out of buffer space is really the only reason fattr encoding should fail with eresource.) Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 18 12月, 2012 2 次提交
-
-
由 J. Bruce Fields 提交于
Cc: Tigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 J. Bruce Fields 提交于
To ensure ordering of read data with any following operations, turn off zero copy if the read is not the final operation in the compound. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 11 12月, 2012 2 次提交
-
-
由 Stanislav Kinsbursky 提交于
This is simple: an NFSd service can be started at different times in different network environments. So, its "boot time" has to be assigned per net. Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Neil Brown 提交于
With NFSv4, if we create a file then open it we explicit avoid checking the permissions on the file during the open because the fact that we created it ensures we should be allow to open it (the create and the open should appear to be a single operation). However if the reply to an EXCLUSIVE create gets lots and the client resends the create, the current code will perform the permission check - because it doesn't realise that it did the open already.. This patch should fix this. Note that I haven't actually seen this cause a problem. I was just looking at the code trying to figure out a different EXCLUSIVE open related issue, and this looked wrong. (Fix confirmed with pynfs 4.0 test OPEN4--bfields) Cc: stable@kernel.org Signed-off-by: NNeilBrown <neilb@suse.de> [bfields: use OWNER_OVERRIDE and update for 4.1] Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 26 11月, 2012 1 次提交
-
-
由 J. Bruce Fields 提交于
Our server rejects compounds containing more than one write operation. It's unclear whether this is really permitted by the spec; with 4.0, it's possibly OK, with 4.1 (which has clearer limits on compound parameters), it's probably not OK. No client that we're aware of has ever done this, but in theory it could be useful. The source of the limitation: we need an array of iovecs to pass to the write operation. In the worst case that array of iovecs could have hundreds of elements (the maximum rwsize divided by the page size), so it's too big to put on the stack, or in each compound op. So we instead keep a single such array in the compound argument. We fill in that array at the time we decode the xdr operation. But we decode every op in the compound before executing any of them. So once we've used that array we can't decode another write. If we instead delay filling in that array till the time we actually perform the write, we can reuse it. Another option might be to switch to decoding compound ops one at a time. I considered doing that, but it has a number of other side effects, and I'd rather fix just this one problem for now. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 15 11月, 2012 1 次提交
-
-
由 Stanislav Kinsbursky 提交于
This patch replaces init_net by SVC_NET(), where possible and also passes proper context to nested functions where required. Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 08 11月, 2012 1 次提交
-
-
由 J. Bruce Fields 提交于
This operation is mandatory for servers to implement. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 02 10月, 2012 1 次提交
-
-
由 J. Bruce Fields 提交于
Something like creating a client with setclientid and then trying to confirm it with create_session may not crash the server, but I'm not completely positive of that, and in any case it's obviously bad client behavior. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 21 8月, 2012 1 次提交
-
-
由 Bryan Schumaker 提交于
stateid_setter should be matched to op_set_currentstateid, rather than op_get_currentstateid. Signed-off-by: NBryan Schumaker <bjschuma@netapp.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 28 7月, 2012 1 次提交
-
-
由 Stanislav Kinsbursky 提交于
Passed network namespace replaced hard-coded init_net Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 13 4月, 2012 1 次提交
-
-
由 Al Viro 提交于
..._want_write() returns -EROFS on failure, _not_ an NFS error value. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 12 4月, 2012 1 次提交
-
-
由 J. Bruce Fields 提交于
Allow a v3 unchecked open of a non-regular file succeed as if it were a lookup; typically a client in such a case will want to fall back on a local open, so succeeding and giving it the filehandle is more useful than failing with nfserr_exist, which makes it appear that nothing at all exists by that name. Similarly for v4, on an open-create, return the same errors we would on an attempt to open a non-regular file, instead of returning nfserr_exist. This fixes a problem found doing a v4 open of a symlink with O_RDONLY|O_CREAT, which resulted in the current client returning EEXIST. Thanks also to Trond for analysis. Cc: stable@kernel.org Reported-by: NOrion Poplawski <orion@cora.nwra.com> Tested-by: NOrion Poplawski <orion@cora.nwra.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 26 3月, 2012 1 次提交
-
-
由 Jeff Layton 提交于
We'll need a way to flag the nfs4_client as already being recorded on stable storage so that we don't continually upcall. Currently, that's recorded in the cl_firststate field of the client struct. Using an entire u32 to store a flag is rather wasteful though. The cl_cb_flags field is only using 2 bits right now, so repurpose that to a generic flags field. Rename NFSD4_CLIENT_KILL to NFSD4_CLIENT_CB_KILL to make it evident that it's part of the callback flags. Add a mask that we can use for existing checks that look to see whether any flags are set, so that the new flags don't interfere. Convert all references to cl_firstate to the NFSD4_CLIENT_STABLE flag, and add a new NFSD4_CLIENT_RECLAIM_COMPLETE flag. Signed-off-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 21 3月, 2012 2 次提交
-
-
由 Chuck Lever 提交于
Clean up due to code review. The nfs4_verifier's data field is not guaranteed to be u32-aligned. Casting an array of chars to a u32 * is considered generally hazardous. We can fix most of this by using a __be32 array to generate the verifier's contents and then byte-copying it into the verifier field. However, there is one spot where there is a backwards compatibility constraint: the do_nfsd_create() call expects a verifier which is 32-bit aligned. Fix this spot by forcing the alignment of the create verifier in the nfsd4_open args structure. Also, sizeof(nfs4_verifer) is the size of the in-core verifier data structure, but NFS4_VERIFIER_SIZE is the number of octets in an XDR'd verifier. The two are not interchangeable, even if they happen to have the same value. Signed-off-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Trond Myklebust 提交于
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 07 3月, 2012 2 次提交
-
-
由 J. Bruce Fields 提交于
I get 320 bytes for struct svc_fh on x86_64, really a little large to be putting on the stack; kmalloc() instead. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 J. Bruce Fields 提交于
Compound processing stops on error, so the current filehandle won't be used on error. Thus the order here doesn't really matter. It'll be more convenient to do it later, though. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 18 2月, 2012 1 次提交
-
-
由 Benny Halevy 提交于
Signed-off-by: NBenny Halevy <bhalevy@tonian.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 16 2月, 2012 9 次提交
-
-
由 Tigran Mkrtchyan 提交于
Signed-off-by: NTigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Tigran Mkrtchyan 提交于
Signed-off-by: NTigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Tigran Mkrtchyan 提交于
Signed-off-by: NTigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Tigran Mkrtchyan 提交于
Signed-off-by: NTigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Tigran Mkrtchyan 提交于
Signed-off-by: NTigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Tigran Mkrtchyan 提交于
Signed-off-by: NTigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Tigran Mkrtchyan 提交于
Signed-off-by: NTigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Tigran Mkrtchyan 提交于
Signed-off-by: NTigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Tigran Mkrtchyan 提交于
Signed-off-by: NTigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-