MRP-1507 quota: mds hang during testing of 2.4 client

A deadlock between chkquota and start transaction occurs
during sync transaction commit.

mdd_attr_set() should check quota before starting transaction.

Change-Id: Ib5740a81ccb759d6c3b49931066a289c8ae97d51
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/1228
Tested-by: Jenkins
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-1366 ldlm: cancel stale locks from a separate thread

This is a re-write of MRP-395:
- do not cancel unlinked export locks in shrink & recalc, but do
  it in a separate thread;
- do not cancel in small portions, cancel all together in just 1
  dedicated thread - use server side blocking thread for that;
- cancel blocked locks first so that waiting locks could proceed;
- take care about blocked waiting locks, so that they would
  get cancelled quickly too.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Change-Id: I37a366e96e0b22d35474597c7ada11150f6093f5
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/730
Tested-by: Jenkins
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>