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-1267 don't share FS struct for a threads with disk IO.

ldlm_poold, ldlm_elt, mgs_reenqueu threads may do own IO,
but share a same FS structs that may produce a data corruption
with writing to the wrong parttion.

Change-Id: Iaaf725623b4c6378d539895ae9c4ea48f99bb4a4
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/628
Tested-by: Jenkins
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
MRP-1296 ldlm: ldlm_cancel_stale_locks()) ASSERTION( count > 0 ) failed

number of granted locks can be really huge.
Use 64bit math to calculate number of locks to cancel

Change-Id: Ia10c056a03750c242e6bb97dfad5718d54fe7e88
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/637
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
Tested-by: Jenkins
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-1203 mdt: Fix the assert in mdt_lock_pdo_init

Fix the assert in mdt_lock_pdo_init to also take into consideration
the case wherein the variable name is not null but rather an empty
string

Signed-off-by: Cheng Shao <cheng_shao@xyratex.com>
Change-Id: Icc8a732318743a065a1be25c4acffdd872b6d853
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/614
Tested-by: Jenkins
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Rahul Deshmukh <Rahul_Deshmukh@xyratex.com>
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
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-1179 libcfs: fix for removing lcw at lcw_dispatch_main

lcw_dispatch_main() creates zombies list and moves lcw into it.
But removes entry from another list in the zombies loop.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: Ia234cb81d56169e7241ffda7315a5d977216749e
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/583
Tested-by: Jenkins
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
Reviewed-by: Cheng Shao <cheng_shao@xyratex.com>
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-1266 ldlm_flock_deadlock() ASSERTION( req != lock ) failed

Abort processing of flock blockers list
on reaching disconnected export

Change-Id: Ifbe546486d9c3aad870c4a5cc300bfc586f14609
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/621
Tested-by: Jenkins
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
MRP-1180 mdt: fix error handling in mdt_quotactl_handle()

MDT handlers should return errors with SERIOUS
flag or allocate reply buffer.
Otherwise assertion fails:
niobuf.c:428:ptlrpc_send_reply()) ASSERTION( rs != ((void *)0) ) failed:

Change-Id: Iff83dbb968710e54c9c9bd941af399f129c26ba5
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/566
Tested-by: Jenkins
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-459 ptlrpc: Allow clients reconnect with RPCs in process

Since not letting clients with pending RPCs to reconnect caused a lot
of problems, this patch allows such a reconnection and would only
refuse to process requests with the same xids that are already being
processed. This patch is a port of LU-793 to the b_neo_stable 1.3
Requests from Andreas were added.

Signed-off-by: Iurii Golovach <iurii_golovach@xyratex.com>
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: Ib6f245e2b77b6265411e75c295987efca297fbcb
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/594
Tested-by: Jenkins
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Reviewed-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>