[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1061208011336.30591@suse.de>
Date: Fri, 8 Dec 2006 12:13:36 +1100
From: NeilBrown <neilb@...e.de>
To: Andrew Morton <akpm@...l.org>
Cc: nfs@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: [PATCH 003 of 18] knfsd: nfsd4: clarify units of COMPOUND_SLACK_SPACE
From: J.Bruce Fields <bfields@...ldses.org>
A comment here incorrectly states that "slack_space" is measured in words,
not bytes. Remove the comment, and adjust a variable name and a few
comments to clarify the situation.
This is pure cleanup; there should be no change in functionality.
Signed-off-by: J. Bruce Fields <bfields@...i.umich.edu>
Signed-off-by: Neil Brown <neilb@...e.de>
### Diffstat output
./fs/nfsd/nfs4proc.c | 10 +++++-----
./include/linux/nfsd/nfsd.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff .prev/fs/nfsd/nfs4proc.c ./fs/nfsd/nfs4proc.c
--- .prev/fs/nfsd/nfs4proc.c 2006-12-08 12:07:28.000000000 +1100
+++ ./fs/nfsd/nfs4proc.c 2006-12-08 12:08:12.000000000 +1100
@@ -740,7 +740,7 @@ nfsd4_proc_compound(struct svc_rqst *rqs
struct svc_fh *current_fh = NULL;
struct svc_fh *save_fh = NULL;
struct nfs4_stateowner *replay_owner = NULL;
- int slack_space; /* in words, not bytes! */
+ int slack_bytes;
__be32 status;
status = nfserr_resource;
@@ -790,10 +790,10 @@ nfsd4_proc_compound(struct svc_rqst *rqs
* failed response to the next operation. If we don't
* have enough room, fail with ERR_RESOURCE.
*/
-/* FIXME - is slack_space *really* words, or bytes??? - neilb */
- slack_space = (char *)resp->end - (char *)resp->p;
- if (slack_space < COMPOUND_SLACK_SPACE + COMPOUND_ERR_SLACK_SPACE) {
- BUG_ON(slack_space < COMPOUND_ERR_SLACK_SPACE);
+ slack_bytes = (char *)resp->end - (char *)resp->p;
+ if (slack_bytes < COMPOUND_SLACK_SPACE
+ + COMPOUND_ERR_SLACK_SPACE) {
+ BUG_ON(slack_bytes < COMPOUND_ERR_SLACK_SPACE);
op->status = nfserr_resource;
goto encode_op;
}
diff .prev/include/linux/nfsd/nfsd.h ./include/linux/nfsd/nfsd.h
--- .prev/include/linux/nfsd/nfsd.h 2006-12-08 12:07:28.000000000 +1100
+++ ./include/linux/nfsd/nfsd.h 2006-12-08 12:08:12.000000000 +1100
@@ -275,12 +275,12 @@ static inline int is_fsid(struct svc_fh
* we might process an operation with side effects, and be unable to
* tell the client that the operation succeeded.
*
- * COMPOUND_SLACK_SPACE - this is the minimum amount of buffer space
+ * COMPOUND_SLACK_SPACE - this is the minimum bytes of buffer space
* needed to encode an "ordinary" _successful_ operation. (GETATTR,
* READ, READDIR, and READLINK have their own buffer checks.) if we
* fall below this level, we fail the next operation with NFS4ERR_RESOURCE.
*
- * COMPOUND_ERR_SLACK_SPACE - this is the minimum amount of buffer space
+ * COMPOUND_ERR_SLACK_SPACE - this is the minimum bytes of buffer space
* needed to encode an operation which has failed with NFS4ERR_RESOURCE.
* care is taken to ensure that we never fall below this level for any
* reason.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists