Whamcloud - gitweb
LU-359 llite: no close error if application has known failure
authorFan Yong <yong.fan@whamcloud.com>
Thu, 2 Aug 2012 04:29:25 +0000 (12:29 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 9 Aug 2012 02:15:41 +0000 (22:15 -0400)
commit9eeff6d09450e1144b6b9dc1bdbc222ac2af9d67
treea18b366a1488274d4e21d5a6d47f122f76b16163
parent8d334f67052ccf77713c780a8040593728977599
LU-359 llite: no close error if application has known failure

Don't return error again when close if the application has known
former write failure.

Rename the per-inode based 'lli_write_rc' as per file-structure
based 'fd_last_write' to track the last write/fsync failure.
When 'sys_close()' is called against the 'file' structure,
we know whether the caller has already known former write/fsync
failure or not, then avoid potenical rdundant error handling,
like confused error message.

Miss to set 'lli_async_rc' if ll_writepage() failed.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I62d9cd83fc03fad22c994f2a77774ca113a6c057
Reviewed-on: http://review.whamcloud.com/1497
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/rw.c