mds: take rdlocks on bounding dftlocks; clean up migrator lock code
We need to take an rdlock on bounding dirfrags during migration for a
rather irritating reason: when we export the bound inode, we need to send
scatterlock state for the dirfrags as well, so that the new auth also gets
the correct info. If we race with a refragment, this info is useless, as
we can't redivvy it up. And it's needed for the scatterlocks to work
properly: when the auth is in a sync/lock state it keeps each dirfrag's
portion in the local (auth OR replica) dirfrag.
So: take a rdlock on the bounding dirfrags to avoid this. Clean up the
Locker bulk rdlock interface while we're at it to be more general and
useful.
Also, while we're here, do an rdlock_try at this point. Note that we still
are going to fail more often than before, since dftlocks will frequently
be scattered if there has been a recent fragmentation. There is some
inevitable conflict here between refragmentation (which wants dftlock
in MIX) and exports (which want it SYNC). TODO.