Whamcloud - gitweb
LU-3219 ost: Ensure dirty flushed on fiemap ioctl
authorArtem Blagodarenko <artem_blagodarenko@xyratex.com>
Tue, 23 Apr 2013 09:40:27 +0000 (13:40 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 15 May 2013 14:56:00 +0000 (10:56 -0400)
commit58444c4e9bc58e192f0bc0c163a5d51d42ba4255
tree132570fdd5819473ce0d9f1db9b589143b91aad6
parentdcd2b724b7c1e90b5f71625657dc6fb6107cfbe0
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>
lustre/ofd/ofd_obd.c
lustre/osc/osc_request.c
lustre/ost/ost_handler.c
lustre/tests/Makefile.am
lustre/tests/checkfiemap.c [new file with mode: 0644]
lustre/tests/sanityn.sh