Whamcloud - gitweb
LU-5912 libcfs: use vfs api for fsync calls 04/13404/3
authorBob Glossman <bob.glossman@intel.com>
Fri, 14 Nov 2014 22:26:30 +0000 (14:26 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 27 Jan 2015 02:44:33 +0000 (02:44 +0000)
commit88f2129504f0530106ebdbe7f5ff918d03bfcb42
tree50050d4e9bd04bc19993a9591b42c489d7151097
parentfe9ad627b6d83e29039c0c6c0b555aae5f23e9a7
LU-5912 libcfs: use vfs api for fsync calls

Use vfs_fsync_range() instead of direct use of filp->f_op->fsync()
routines.  Doing so will apply correct locking transparently without
needing to decide how to do it ourselves.
What we were doing was a long term violation of the locking
protocols described in Documentation/filesystems/Locking in linux
source but was never noticed until new checking code went into the
RHEL 6.6 kernel.  The new check triggered a visible error in syslog.

Lustre-commit: a1f7493109cc995f43204d9a0f19a229ec5edef6
Lustre-change: http://review.whamcloud.com/12731

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I551215fc340637364fe04f6e3bae963cf983c953
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-on: http://review.whamcloud.com/13404
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
libcfs/include/libcfs/linux/linux-fs.h
libcfs/libcfs/tracefile.c
lustre/osd-ldiskfs/osd_handler.c