From: Artem Blagodarenko Date: Mon, 3 Jun 2013 13:40:53 +0000 (+0800) Subject: staging/lustre/ost: Ensure dirty flushed on fiemap ioctl X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~76^2~341 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d8654397d0dcb1885457a2188b59995f2219676;p=pandora-kernel.git 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-diff-tree failed