]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: cancel scrub if noscrub is set for pool or all 8462/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 6 Apr 2016 02:42:20 +0000 (10:42 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 6 Apr 2016 05:36:58 +0000 (13:36 +0800)
commit79b19a6ca5f691a63b684320179290fc6e53bb4f
tree8014b9fa1989ab413994e471a77d48df2ba391e0
parent4d3aef75ec44abf0cb2b59e419c1089d8db8b01f
osd: cancel scrub if noscrub is set for pool or all

The sched_scrub() method can be called by various code path, such as
OSD::tick() or triggered by a scrub_reserve_reply message.

The sched_scrub() will check whether or not the noscrub is globally set or
set for a specified pool before really starting to schedule a scrub job.
However, if we set noscrub flag for a specified pool, there are other pools
for which scrub are still legal and thus shall be granted.

The problem here is that we may stopping a pg's scrub in an intermidate stage
due to setting of the corresponding pool's noscrub flag whithout releasing
the reservation. Which as a result shall prevent other pgs of a different
pool from going scrubbing because we have already hit the reservation limit.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PG.cc