Hide Forgot
PATCH: http://patches.gluster.com/patch/1917 in master (performance/quick-read: frame->local need not be set in qr_open_cbk.)
PATCH: http://patches.gluster.com/patch/1918 in release-2.0 (performance/quick-read: frame->local need not be set in qr_open_cbk.)
A kernel compile can result in the number of opened files in a system crossing the system limit. qr_open_cbk checks for frame->local and if it is NULL, it sets op_ret = -1. And with op_ret = -1 the file is not marked as opened. Since many fops does not allocate frame->local, the opens sent by these fops does not mark the file to be opened though open is successful at posix. Hence multiple opens are sent on same fd and since only one release is called per fd, there is fd leak.