repositories
/
deb_libnfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7f3a78
)
Mix in the pid in the top 16 bits for the initial xid.
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Fri, 25 Oct 2013 23:16:43 +0000
(16:16 -0700)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Fri, 25 Oct 2013 23:16:43 +0000
(16:16 -0700)
This helps for users which rapidly fork a lot of processes that then
immediately create a new context (I am looking at you dbench)
to awoid having lots of processes starting and using overlapping xid values.
lib/init.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/init.c
b/lib/init.c
index 62a8f81ac96fffa8d2e55f9e76dd2ae2683cd9d5..2a451a16d51f4282b76b40f0d32ee416aae72ef0 100644
(file)
--- a/
lib/init.c
+++ b/
lib/init.c
@@
-70,7
+70,7
@@
struct rpc_context *rpc_init_context(void)
free(rpc);
return NULL;
}
- rpc->xid = salt + time(NULL);
+ rpc->xid = salt + time(NULL)
+ getpid() << 16
;
salt += 0x01000000;
rpc->fd = -1;