path: root/rpc/rpc-lib/src
diff options
authorAnand Avati <>2012-04-23 00:39:14 -0700
committerVijay Bellur <>2012-04-24 09:44:36 -0700
commit1fc54cf7c5e2a88cf8f59d98f6e0eb7df485ae80 (patch)
tree8e90b6c4a223c34b139cd1cd02272e55cae8b61e /rpc/rpc-lib/src
parentbe2cc2f7ce90b97328d933517ce66169ae89baeb (diff)
statedump: fix deadlock during state dump of fds
Existing state dump of FD context tries to be extra safe by trying to call the fd dump callback outside the inode lock. It acheives this by taking an fd ref and unreffing it later. This exercise can be harmful at times when the fd unref performed by state dump ends up being the last unref and triggers fd_destroy. fd_destroy in turn triggers inode_unref which blocks on inode table lock, while the inode table lock was already held by the thread before it even attempted fd ctx dump. The fix takes away the dangerous ref/unref of the fd during state dump and instead calls fd_ctx_dump() whiel the inode lock is held. This is not a problem as long as the dump functions do not call any inode function which tries to take an inode lock (none of the existing fd dump ops do) Change-Id: Ia4b27ba5a321285d3e64896a679a00363bb1e822 BUG: 815242 Signed-off-by: Anand Avati <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Amar Tumballi <> Reviewed-by: Raghavendra Bhat <> Reviewed-by: Vijay Bellur <>
Diffstat (limited to 'rpc/rpc-lib/src')
0 files changed, 0 insertions, 0 deletions