From 9d8654397d0dcb1885457a2188b59995f2219676 Mon Sep 17 00:00:00 2001 From: Artem Blagodarenko Date: Mon, 3 Jun 2013 21:40:53 +0800 Subject: [PATCH] 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: Artem Blagodarenko Signed-off-by: Niu Yawei Reviewed-by: Nathaniel Clark Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Signed-off-by: Peng Tao Signed-off-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed