Whamcloud - gitweb
b=5492,5624,5654,5664,5672
Fundamentally changes the locking rules for the i_size and KMS. The way in
which this was done is documented in bug 5654 comment #6, and I'll ask the
colibri team to either adopt or adapt this design, but in any case make it a
part of their documentation after they've merged it.
i_size and KMS sampling and updates are now protected by an lli_size_sem.
The reasons are many:
The truncate path has been reorganized not to hold this semaphore during RPCs,
which allows us to reverse the deadlock-inducing order with the ns_lock in
ll_pgcache_remove_extent. (bug 5492)
The introduction of the i_alloc_sem in 2.6 was wreaking havoc on our ability
to get our ordering right. The truncate path was a festering boil of unlocking
and relocking which may well have been the source of other concurrency bugs.
Not using the i_sem for i_size updates eliminates this rat nest (bugs 5624,
5654)
Finally, the CMD team reported a similar inversion between a writing thread
and ptlrpcd (the writing thread has the i_sem, and won't release it until
ptlrpcd finishes the I/O; ptlrpcd wants the i_sem to finalize lock cancellation
after being evicted). (bugs 5664, 5672)
This has been running at NERSC for the last week, so I think it's ready for
more exposure.