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>
Mon, 20 May 2013 18:08:00 +0000 (14:08 -0400)
commit6a4ea7d154b6c016f482662463c9d2186176fee0
tree5eef85a0aacc3a58dccb1a7dc2d175593f259b44
parentd572822bd36b94c149f6e9e055a53f89d34406d4
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>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I6debe07acd015eb990d5b3748e50cc88d61065f8
Reviewed-on: http://review.whamcloud.com/6377
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
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