Lines Matching +full:sync +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0
15 #include "sync.h"
22 int mode; member
27 struct io_sync *sync = io_kiocb_to_cmd(req, struct io_sync); in io_sfr_prep() local
29 if (unlikely(sqe->addr || sqe->buf_index || sqe->splice_fd_in)) in io_sfr_prep()
30 return -EINVAL; in io_sfr_prep()
32 sync->off = READ_ONCE(sqe->off); in io_sfr_prep()
33 sync->len = READ_ONCE(sqe->len); in io_sfr_prep()
34 sync->flags = READ_ONCE(sqe->sync_range_flags); in io_sfr_prep()
40 struct io_sync *sync = io_kiocb_to_cmd(req, struct io_sync); in io_sync_file_range() local
45 return -EAGAIN; in io_sync_file_range()
47 ret = sync_file_range(req->file, sync->off, sync->len, sync->flags); in io_sync_file_range()
54 struct io_sync *sync = io_kiocb_to_cmd(req, struct io_sync); in io_fsync_prep() local
56 if (unlikely(sqe->addr || sqe->buf_index || sqe->splice_fd_in)) in io_fsync_prep()
57 return -EINVAL; in io_fsync_prep()
59 sync->flags = READ_ONCE(sqe->fsync_flags); in io_fsync_prep()
60 if (unlikely(sync->flags & ~IORING_FSYNC_DATASYNC)) in io_fsync_prep()
61 return -EINVAL; in io_fsync_prep()
63 sync->off = READ_ONCE(sqe->off); in io_fsync_prep()
64 sync->len = READ_ONCE(sqe->len); in io_fsync_prep()
70 struct io_sync *sync = io_kiocb_to_cmd(req, struct io_sync); in io_fsync() local
71 loff_t end = sync->off + sync->len; in io_fsync()
76 return -EAGAIN; in io_fsync()
78 ret = vfs_fsync_range(req->file, sync->off, end > 0 ? end : LLONG_MAX, in io_fsync()
79 sync->flags & IORING_FSYNC_DATASYNC); in io_fsync()
86 struct io_sync *sync = io_kiocb_to_cmd(req, struct io_sync); in io_fallocate_prep() local
88 if (sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in) in io_fallocate_prep()
89 return -EINVAL; in io_fallocate_prep()
91 sync->off = READ_ONCE(sqe->off); in io_fallocate_prep()
92 sync->len = READ_ONCE(sqe->addr); in io_fallocate_prep()
93 sync->mode = READ_ONCE(sqe->len); in io_fallocate_prep()
99 struct io_sync *sync = io_kiocb_to_cmd(req, struct io_sync); in io_fallocate() local
104 return -EAGAIN; in io_fallocate()
105 ret = vfs_fallocate(req->file, sync->mode, sync->off, sync->len); in io_fallocate()
107 fsnotify_modify(req->file); in io_fallocate()