]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: fix mds scatter_writebehind starvation
authorSage Weil <sage@newdream.net>
Wed, 29 Jun 2011 22:23:40 +0000 (15:23 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 29 Jun 2011 22:23:40 +0000 (15:23 -0700)
commit310032ee8128f6417ac302c0f5ecd27c691cbcc7
tree6029b063cccd0d532619986b811c4f80cf777404
parentd918e675a21964441b27d1d0d2b29cdc3d7eace5
mds: fix mds scatter_writebehind starvation

scatter_writebehind is called by eval_gather on dirty locks, and
eval_gather is called by wrlock_finish on unstable locks when you
drop the last wrlock...and scatter_writebehind force-takes a wrlock.

This meant that a workload like:
seq 3000|xargs -i mkdir a/b/{} &
mkdir a/c
could cause the mkdir a/c to wait until after the other process
finished because rstats can propagate upwards asynchronously, but
mark the directory dirty synchronously, while the mkdir a/c requires
an actual wrlock in order to modify the rstats.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/mds/Locker.cc
src/mds/ScatterLock.h
src/mds/SimpleLock.h