libafscp: Remove comment with dead code
authorAndrew Deason <adeason@sinenomine.net>
Thu, 30 Jan 2014 19:38:01 +0000 (13:38 -0600)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 11 Feb 2015 14:06:52 +0000 (09:06 -0500)
You're not supposed to write the length of the submitted data on the
split rx stream for a StoreData operation; the fileserver knows how
much data to read from the "Length" parameter of the StoreData RPC.

For a FetchData, putting the data length over the split rx stream is
required, since we can't get the "OUT" arguments before reading the
file data. But for a StoreData, this is unnecessary, since the length
is right there in the arguments.

So just get rid of this commented-out code; it's clearly wrong and
this commit explains why.

Change-Id: Idde0f9079e90da75d71a142f4a9f36a84ce79776
Reviewed-on: http://gerrit.openafs.org/10786
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/libafscp/afscp_file.c

index b887c5a..8bc3ed4 100644 (file)
@@ -161,18 +161,6 @@ afscp_PWrite(const struct afscp_venusfid * fid, const void *buffer,
                        code = rx_EndCall(c, code);
                        continue;
                    }
-                   /*
-                    * seems to write file length to beginning of file -- why?
-                    */
-                   /*
-                    * bytesremaining = htonl(count);
-                    * bytes = rx_Write(c, (char *)&bytesremaining,
-                    *                  sizeof(afs_int32));
-                    * if (bytes != sizeof(afs_int32)) {
-                    *  code = rx_EndCall(c, bytes);
-                    *  continue;
-                    * }
-                    */
                    bytesremaining = count;
                    totalbytes = 0;
                    while (bytesremaining > 0) {