Whamcloud - gitweb
LU-4388 llite: issue OST_SYNC for fsync() 84/8684/5
authorBobi Jam <bobijam.xu@intel.com>
Tue, 31 Dec 2013 08:07:37 +0000 (16:07 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 10 Mar 2014 23:34:37 +0000 (23:34 +0000)
commit52e0a32b780269ee658d9b6e45e61324ff9ff4cc
treec78b5aaf67f2bb601fb3e620247b721c1af8e77a
parente4d660244e9265015c3e3480b48a28b15f0813b7
LU-4388 llite: issue OST_SYNC for fsync()

The last parameter @datasync of fsync() has following indication:
* if datasync=0, we'd always flush data and metadata
* if datasync=1, we'd always flush data while does not flush modifed
  metadata unless that metadata is needed in order to allow a
  subsequent data retrieval to be correctly handled. For example, a
  change to the file size would require a metadata flush.

Lustre client can not tell the difference easily, and would issue
MDS_SYNC and OST_SYNC in all cases.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I90fa8e761e91c8a04afba3fbfafe1f60f5839ad1
Reviewed-on: http://review.whamcloud.com/8684
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
lustre/llite/file.c