MRP-1035 ldlm: report last_committed value using export/obd

Both export and obd value is used for report last_committed value.
Patch takes into account obd_last_transno number when reporting last
commit transaction number to the client. This helps for client with
open/close activity to get real commit number and free requests from
replay queue.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Change-Id: I160abcc7c3b48785f80efbb8cf03c3252d293272
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/533
Tested-by: Jenkins
Tested-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-1040 quota: a fix for a lost qonoff sem release

Release mds_qonoff_sem on error in dqacq_adjust_qunit_sz().

Change-Id: I996a5f540597aa27eea03848e641757881772221
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/436
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: Artem Blagodarenko <Artem_Blagodarenko@xyratex.com>
Tested-by: Jenkins
Tested-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-1073 ptlrpc: Remove accidentally added debug code

Remove "remove request from exp_rpcs_in_progress_list"
messages from the log.

Change-Id: I1231b0ea533cb3224f7b783061d91a1cb6bf9269
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/453
Tested-by: Jenkins
Reviewed-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-1147 ptlrpc: no abort connetcion with active request

The MRP-459 patch lost part which removes abort connection with
active request. This patch fix this issue.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I1d7eeccd8021c98993e005fcc4929be903626bf6
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/545
Tested-by: Jenkins
Tested-by: Roman Grigoryev <Roman_Grigoryev@xyratex.com>
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-1148 quota: set quota export before reconstruct

If mdt_reconstruct_open occures at mdt_reint_internal, and quota
is enabled, it cause fault when quota_check trying to touch export
mq->mq_exp. Initialization of this param occures after
mdt_reconstruct_open at mdt_reint_internal. This patch moves this
initialization before mdt_reconstruct call.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I119556d579978022db010f4422dd0a2b63d4d384
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/536
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Tested-by: Jenkins
Tested-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-395 disconnect takes too long time if there are many locks to cancel

besides the amount of time spent on each lock cancel, there is a resched() in
cfs_hash_for_each_relax(), i.e. disconnect or eviction may take unexpectedly
long time.
- do not cancel locks on disconnect_export;
- export will be left in obd_unlinked_exports list pinned by live locks;
- new re-connects will created other non-conflicting exports;
- new locks will cancel obsolete locks on conflicts;
- once all the locks on the disconnected export will be cancelled, the export
  will be destroyed on the last ref put;
- pool shrink and recalc on server cancel obsolete locks in small portions;
- free the namespace before obd_exports_barrier on umount;

also make the proper order of events on umount:
- disconnect export;
- cleanup namespace, to cancel all the locks before export barrier;
- exports barrier;
- lprocfs_free_per_client_stats (requires nid_exp_ref_count == 0);
- namespace_free_post is left in cleanup ensure will not get and segfault on
  absent namespace.

Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>