Skip to content
Commit 9d865439 authored by Artem Blagodarenko's avatar Artem Blagodarenko Committed by Greg Kroah-Hartman
Browse files

staging/lustre/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.

[picked osc part for upstream kernel submission]
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3219
Xyratex-bug-id: MRP-1001
Lustre-change: http://review.whamcloud.com/6127


Signed-off-by: default avatarArtem Blagodarenko <artem_blagodarenko@xyratex.com>
Signed-off-by: default avatarNiu Yawei <yawei.niu@intel.com>
Reviewed-by: default avatarNathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e377988e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment