Whamcloud - gitweb
LU-5912 libcfs: use vfs api for fsync calls 31/12731/3
authorBob Glossman <bob.glossman@intel.com>
Fri, 14 Nov 2014 22:26:30 +0000 (14:26 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 4 Dec 2014 13:32:13 +0000 (13:32 +0000)
commita1f7493109cc995f43204d9a0f19a229ec5edef6
tree7b95052cfb5dca8fee1f65f8b584cb2ab94b6ca3
parent1a165c02f5e97c830800d6dcbc11e86790fc015d
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.

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