pub fn sync_file_range<'a>(
        &'a self,
        file: &'a File,
        offset: u64,
        len: usize,
        ordering: EventOrdering,
    ) -> Completion<'a, ()> {
        self.with_sqe(None, false, |mut sqe| {
            sqe.prep_rw(
                IORING_OP_SYNC_FILE_RANGE,
                file.as_raw_fd(),
                len,
                offset,
                ordering,
            );
            sqe.flags |= u8::try_from(
                // We don't use this because it causes
                // EBADF to be thrown. Looking at
                // linux's fs/sync.c, it seems as though
                // it performs an identical operation
                // as SYNC_FILE_RANGE_WAIT_AFTER.
                // libc::SYNC_FILE_RANGE_WAIT_BEFORE |
                libc::SYNC_FILE_RANGE_WRITE | libc::SYNC_FILE_RANGE_WAIT_AFTER,
            )
            .unwrap();
        })
    }
/// Synchronizes the data associated with a range
/// in a file. Does not synchronize any metadata
/// updates, which can cause data loss if you
/// are not writing to a file whose metadata
/// has previously been synchronized.
///
/// You probably want to have a prior write
/// linked to this, or set `EventOrdering::Drain`.
///
/// Under the hood, this uses the "pessimistic"
/// set of flags:
/// `SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER`
Synchronizes the data associated with a range
in a file. Does not synchronize any metadata
updates, which can cause data loss if you
are not writing to a file whose metadata
has previously been synchronized.

You probably want to have a prior write
linked to this, or set `EventOrdering::Drain`.

Under the hood, this uses the "pessimistic"
set of flags:
`SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER`
Synchronizes the data associated with a range in a file . Does not synchronize any metadata updates which can cause data loss if you are not writing to a file whose metadata has previously been synchronized . You probably want to have a prior write linked to this or set ` EventOrdering :: Drain ` . Under the hood this uses the " pessimistic " set of flags : ` SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER `
pub fn sync_file_range<'a>(
        &'a self,
        file: &'a File,
        offset: u64,
        len: usize,
        ordering: EventOrdering,
    ) -> Completion<'a, ()> {
        self.with_sqe(None, false, |mut sqe| {
            sqe.prep_rw(
                IORING_OP_SYNC_FILE_RANGE,
                file.as_raw_fd(),
                len,
                offset,
                ordering,
            );
            sqe.flags |= u8::try_from(
                // We don't use this because it causes
                // EBADF to be thrown. Looking at
                // linux's fs/sync.c, it seems as though
                // it performs an identical operation
                // as SYNC_FILE_RANGE_WAIT_AFTER.
                // libc::SYNC_FILE_RANGE_WAIT_BEFORE |
                libc::SYNC_FILE_RANGE_WRITE | libc::SYNC_FILE_RANGE_WAIT_AFTER,
            )
            .unwrap();
        })
    }
pub fn sync_file_range < ' a > ( & ' a self , file : & ' a File , offset : u64 , len : usize , ordering : EventOrdering , ) -> Completion < ' a , ( ) > { self . with_sqe ( None , false , | mut sqe | { sqe . prep_rw ( IORING_OP_SYNC_FILE_RANGE , file . as_raw_fd ( ) , len , offset , ordering , ) ; sqe . flags |= u8 :: try_from ( // We don't use this because it causes // EBADF to be thrown. Looking at // linux's fs/sync.c, it seems as though // it performs an identical operation // as SYNC_FILE_RANGE_WAIT_AFTER. // libc::SYNC_FILE_RANGE_WAIT_BEFORE | libc :: SYNC_FILE_RANGE_WRITE | libc :: SYNC_FILE_RANGE_WAIT_AFTER , ) . unwrap ( ) ; } ) }
Synchronizes the data associated with a range
in a file.
Synchronizes the data associated with a range in a file .
&'a self
file
&'a File
offset
u64
len
usize
ordering
EventOrdering
&'a self
file
&'a File
offset
u64
len
usize
ordering
EventOrdering