]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
libceph: add an epoch_barrier field to struct ceph_osd_client
authorJeff Layton <jlayton@redhat.com>
Tue, 18 Apr 2017 13:21:16 +0000 (09:21 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 4 May 2017 07:19:21 +0000 (09:19 +0200)
commit58eb7932ae4d671d2a2377a1779eda96a2789b11
tree86596efc2d33230b40ee27244b7c1f73903d4cc9
parentfc36d0a42c19870e57a542c2dd0972185584d407
libceph: add an epoch_barrier field to struct ceph_osd_client

Cephfs can get cap update requests that contain a new epoch barrier in
them. When that happens we want to pause all OSD traffic until the right
map epoch arrives.

Add an epoch_barrier field to ceph_osd_client that is protected by the
osdc->lock rwsem. When the barrier is set, and the current OSD map
epoch is below that, pause the request target when submitting the
request or when revisiting it. Add a way for upper layers (cephfs)
to update the epoch_barrier as well.

If we get a new map, compare the new epoch against the barrier before
kicking requests and request another map if the map epoch is still lower
than the one we want.

If we get a map with a full pool, or at quota condition, then set the
barrier to the current epoch value.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
include/linux/ceph/osd_client.h
net/ceph/debugfs.c
net/ceph/osd_client.c