]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: wake up the front pos waiter 40109/head
authorXiubo Li <xiubli@redhat.com>
Fri, 19 Feb 2021 14:05:23 +0000 (22:05 +0800)
committerXiubo Li <xiubli@redhat.com>
Mon, 15 Mar 2021 05:42:15 +0000 (13:42 +0800)
commit23a2093abd0d429336314eb7fcacb88f0ac4a7a1
tree8814afa8bb0233766c244609e207b7293c060a64
parent8191ac7873f4253a74b5e91d2a1344df8e2a591c
client: wake up the front pos waiter

The old code was buggy, why it ran well without any problem is that
the big client_lock will make sure that the read/write won't run in
parallel, so it won't be any problem here.

But when introducing inode lock to break the client_lock, which will
allow the read/write to run parallelly, the pos waiters won't get any
chance to be woke up.

In unlock_fh_pos(), it will always wake up the frontest waiter.

Fixes: https://tracker.ceph.com/issues/49379
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 66bcb880abe56c08e04876e98d3d751e78f8fd2f)
src/client/Client.cc