LU-3219 ost: Ensure dirty flushed on fiemap ioctl

Data corruption is possible if cp(coreutils) uses FIEMAP to obtain
data holes in shared file, since there could be dirty cache on
other clients which hasn't been flushed back.

To ensure all the dirty on remote clients being flushed back on
fiemap ioctl, we'd acquire ldlm lock on server side for fiemap,
unless the local client (which invoke fiemap) has cached lock.

Xyratex-bug-id: MRP-1001
Signed-off-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I67fe05bac1ce75f98c3d3806a4d08f6cb02048e6
Reviewed-on: http://review.whamcloud.com/6127
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
MRP-983 tests: combine dependent sanity tests

The tests 27c, 77c, 77e, 77h are skipped when previous dependent test
is not ran.
This patch combines the following sanity tests:
    tests 27b, 27c to test 27b
    tests 77b, 77c to test 77b
    tests 77d, 77e to test 77d
    tests 77g, 77h to test 77g
For the 77* tests $tfile is used for test file name.

Signed-off-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Change-Id: Ic8691d98e9047868a874ce994b40f5b4d9011863
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/401
Tested-by: Jenkins
Reviewed-by: Vladimir Saveliev <vladimir_saveliev@xyratex.com>
MRP-998: remove dentry from niobuf_local

niobuf_local array contains dentry, while
only one copy is enough. This patch removes
unnecessary copies. It also converts
filter_iobuf_add_page() to void, which it
actually is.

Change-Id: I60e587b869e965ab0f1d1b6f0f424e2609836b90
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/392
Tested-by: Jenkins
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>