MRP-1779 test: write_append_truncate failed with divide error

fix trunc_size calculation in case of append_size == 1

Change-Id: I43f402918b75ab8942a8cf5a66214d2a10aae80d
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/1728
Reviewed-by: Elena Gryaznova <elena_gryaznova@xyratex.com>
Tested-by: Jenkins
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Rahul Deshmukh <rahul_deshmukh@xyratex.com>
Tested-by: Andrey Bondarenko <andrey_bondarenko@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
MRP-1460 ost: fix obdo flag conflict for shortio

OBD_FL_SHORT_IO was not reserved at the master branch and was
rewritten by OBD_FL_FLUSH with new feature. This fix change value for
OBD_FL_SHORT_IO and resolve conflict for different client/server
version.

OBD_FL_FLUSH feature is not involved, it is used and set in separate
code paths and will always work correctly.

ShortIO is enabled by connect flag, so no problem when client or
server does not support it. Other interop cases:

1. neo 1.4 fixed client - neo 1.4 server
2. lustre 2.5 with fixed shortIO client - neo 1.4 server
new flag will not be recognised by server - FAILURE, shortIO pages
will be lost.

3. neo 1.4 client - neo 1.4 fixed server
4. neo 1.4 client - lustre 2.5 with fixed shortIO server
"fixed" server can recognise wrong flag sent by client, no problem
here.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I05a9e50059010bb5bc0bd2d6987d56000429b90b
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/898
Tested-by: Jenkins
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Tested-by: Elena Gryaznova <elena_gryaznova@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
LU-3889 osc: Allow lock to be canceled at ENQ time

A cl_lock can be canceled when it's in CLS_ENQUEUED state.
We can't unuse this kind of lock in lov_lock_unuse() because
it will bring this lock into CLS_NEW state and then confuse
osc_lock_upcall().

Add a regression test case by Alexander Boyko.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I2acc7fd0176280062eb0d25dbe929b5d0144db50
Reviewed-on: http://review.whamcloud.com/8405
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
MRP-1763 ptlrpc: request status gets overwritten

That is why mdt_set_info() always return 0 to client
and lctl changelog_clear always exits with 0 event
when called with wrong changelog id.

lustre_msg_set_status() should be used only by
ptlrpc_send_reply(). It sets status from req->rq_status.

Change-Id: I8e515671715d45dec47cbe21746d267caaf43d94
Signed-off-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/1692
Tested-by: Jenkins
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
MRP-975 ldlm: wrong handling of ldlm resends

If a successful reply is lost for an intent
lock request, MDS will not correctly recover
from this situation on resend. Instead, a new
lock is created.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Tested-by: Elena Gryaznova <elena_gryaznova@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Change-Id: If9fe6bdd3a539ee416c7119fca9d9605aff2fdb3
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/1769
Tested-by: Jenkins
Tested-by: Andrey Bondarenko <andrey_bondarenko@xyratex.com>