Jim Chen has uploaded this change for review.

View Change

FSAL_VFS: propagate fsync writeback errors in vfs_write2

In vfs_write2(), when a synchronous write is requested
(write_arg->fsal_stable == true), fsync(my_fd->fd) is called to flush
dirty pages to disk. If fsync() encounters a writeback failure (e.g.
EIO, EDQUOT, or ENOSPC), the error was assigned to status2 instead of
status. The function then cleared fsal_stable but left status as
ERR_FSAL_NO_ERROR from the prior pwritev(), returning success to the
caller.

Propagate posix2fsal_status(errno) into status so that fsync() writeback
failures are reported to the caller.

Change-Id: I6d92cbc0f23e6476b853782fe119574d644cd2bc
Signed-off-by: Jim Chen <czcbangkai@google.com>
---
M src/FSAL/FSAL_VFS/file.c
1 file changed, 2 insertions(+), 2 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/30/1257730/1

To view, visit change 1257730. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I6d92cbc0f23e6476b853782fe119574d644cd2bc
Gerrit-Change-Number: 1257730
Gerrit-PatchSet: 1
Gerrit-Owner: Jim Chen <czcbangkai@google.com>