[Pvfs2-cvs] commit by slang in pvfs2/src/io/bmi/bmi_tcp: bmi-tcp.c
CVS commit program
cvs at parl.clemson.edu
Thu Nov 8 16:48:21 EST 2007
Update of /projects/cvsroot/pvfs2/src/io/bmi/bmi_tcp
In directory parlweb1:/tmp/cvs-serv8252/src/io/bmi/bmi_tcp
Modified Files:
bmi-tcp.c
Log Message:
[on behalf of Phil]:
pvfs2-aio-cancel.patch
----------------------
This patch fixes a bug in the I/O cleanup path on the server side. In cases where a flow needed to cancel pending I/O operations, the trove cancel function was calling aio_cancel() directly. This doesn't work correctly if the alt-aio implementation is used.
pvfs2-root-squash-address.patch
-------------------------------
This fixes a bug in the root squash checking on the server side. The routine that compares a client address against the root squash list was using getsockname() rather than getpeername(). The former retrieves the server's address rather than the client's.
pvfs2-ls-rm.patch
-----------------
This is an interim fix for the concurrent "rm -rf" and "ls" problem that was recently discussed on the mailing list. It sounds like the long term direction is to switch to using entry names as dirent tokens, but this patch fixes the majority of cases in the mean time without a protocol change. The problem in the case I was seeing was a cache conflict between the two clients (the ls was caching tokens in the pcache that caused rm to get the wrong position). The token is 64 bits wide, but only the first 32 bits are used (the START and END values are near the top of the 32 bit range). This patch takes advantage of the extra top 32 bits on the server side to set a unique identifier in the token for each "readdir session" so that their cache entries do not collide. The client is not aware of this change because it treats the token as an opaque value. A readdir session begins when a client requests the START position.
pvfs2-client-buffer-logging.patch
---------------------------------
I don't know if there is any interest in this, but this adds some debugging to the buffers used in the kernel module. On startup, pvfs2-client will print the buffer pointers (whether debugging is enabled or not). There are also new debugging messages that will show the first byte of each memory buffer passing through the kernel if enabled. These logging messages were added to help track down what ended up being a server side problem (see pvfs2-aio-cancel.patch), but we kept it in case it is useful in the future.
Index: bmi-tcp.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi_tcp/bmi-tcp.c,v
diff -p -u -r1.123 -r1.124
--- bmi-tcp.c 7 Nov 2007 16:44:00 -0000 1.123
+++ bmi-tcp.c 8 Nov 2007 21:48:21 -0000 1.124
@@ -1707,9 +1707,15 @@ int BMI_tcp_query_addr_range(bmi_method_
struct sockaddr_in map_addr;
socklen_t map_addr_len = sizeof(map_addr);
const char *tcp_wildcard = wildcard_string + 6 /* strlen("tcp://") */;
+ int ret = -1;
memset(&map_addr, 0, sizeof(map_addr));
- getsockname(tcp_addr_data->socket, (struct sockaddr *) &map_addr, &map_addr_len);
+ if(getpeername(tcp_addr_data->socket, (struct sockaddr *) &map_addr, &map_addr_len) < 0)
+ {
+ ret = bmi_tcp_errno_to_pvfs(-EINVAL);
+ gossip_err("Error: failed to retrieve peer name for client.\n");
+ return(ret);
+ }
/* Wildcard specification */
if (netmask == -1)
{
More information about the Pvfs2-cvs
mailing list