fs: add IOCB_SYNC and IOCB_DSYNC

This will allow us to do per-I/O sync file writes, as required by a lot
of fileservers or storage targets.

XXX: Will need a few additional audits for O_DSYNC

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Christoph Hellwig
2016-04-07 08:52:00 -07:00
committed by Al Viro
parent 716b9bc0cb
commit dde0c2e798
13 changed files with 25 additions and 16 deletions

View File

@@ -152,7 +152,7 @@ out:
if (retval > 0) {
mark_inode_dirty(inode);
err = generic_write_sync(file, iocb->ki_pos - retval, retval);
err = generic_write_sync(iocb, iocb->ki_pos - retval, retval);
if (err < 0)
retval = err;
}