mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
[virtio-9p] Add datasync to server side TFSYNC/RFSYNC for dotl
SYNOPSIS size[4] Tfsync tag[2] fid[4] datasync[4] size[4] Rfsync tag[2] DESCRIPTION The Tfsync transaction transfers ("flushes") all modified in-core data of file identified by fid to the disk device (or other permanent storage device) where that file resides. If datasync flag is specified data will be fleshed but does not flush modified metadata unless that metadata is needed in order to allow a subsequent data retrieval to be correctly handled. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
This commit is contained in:
parent
6a8657528d
commit
49594973fb
3 changed files with 13 additions and 8 deletions
|
@ -490,9 +490,13 @@ static int local_remove(FsContext *ctx, const char *path)
|
|||
return remove(rpath(ctx, path));
|
||||
}
|
||||
|
||||
static int local_fsync(FsContext *ctx, int fd)
|
||||
static int local_fsync(FsContext *ctx, int fd, int datasync)
|
||||
{
|
||||
return fsync(fd);
|
||||
if (datasync) {
|
||||
return qemu_fdatasync(fd);
|
||||
} else {
|
||||
return fsync(fd);
|
||||
}
|
||||
}
|
||||
|
||||
static int local_statfs(FsContext *s, const char *path, struct statfs *stbuf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue