Whamcloud - gitweb
LU-1755 osc: solve a race between fsync and truncate
If an OSC extent is being truncated when fsync is called, it will
have oe_fsync_wait set but no oe_urgent or oe_hp set. This causes
problem because when the extent changes OES_CACHE later, it won't
be written out immediately because urgent bit is not set.
This problem can be fixed by checking oe_fsync_wait bit and set urgent
bit correspondingly when changing osc extent's state from OES_TRUNC to
OES_CACHE at the end of truncate.
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I755baac066375a92730b14de1c470c66baad5320
Reviewed-on: http://review.whamcloud.com/3699
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>