block: raw: Rename RawFileSync to RawSync

Apply the consistent <Format><Backend> naming convention.

No functional change.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-04-24 17:26:46 +02:00
committed by Rob Bradford
parent 8835656f21
commit 6279214dff
4 changed files with 13 additions and 13 deletions

View File

@@ -13,7 +13,7 @@ use crate::async_io::{AsyncIo, AsyncIoCompletion, AsyncIoError, AsyncIoOperation
use crate::sparse::{punch_hole, write_zeroes};
use crate::{SECTOR_SIZE, is_block_device};
pub struct RawFileSync {
pub struct RawSync {
fd: RawFd,
eventfd: EventFd,
completion_list: VecDeque<AsyncIoCompletion>,
@@ -21,10 +21,10 @@ pub struct RawFileSync {
is_block_device: bool,
}
impl RawFileSync {
impl RawSync {
pub fn new(fd: RawFd) -> Self {
let is_block_device = is_block_device(fd);
RawFileSync {
RawSync {
fd,
eventfd: EventFd::new(libc::EFD_NONBLOCK).expect("Failed creating EventFd for RawFile"),
completion_list: VecDeque::new(),
@@ -34,7 +34,7 @@ impl RawFileSync {
}
}
impl AsyncIo for RawFileSync {
impl AsyncIo for RawSync {
fn notifier(&self) -> &EventFd {
&self.eventfd
}
@@ -141,7 +141,7 @@ mod unit_tests {
fn test_punch_hole() {
let temp_file = TempFile::new().unwrap();
let mut file = temp_file.into_file();
let mut async_io = RawFileSync::new(file.as_raw_fd());
let mut async_io = RawSync::new(file.as_raw_fd());
raw_async_io_tests::test_punch_hole(&mut async_io, &mut file);
}
@@ -149,7 +149,7 @@ mod unit_tests {
fn test_write_zeroes() {
let temp_file = TempFile::new().unwrap();
let mut file = temp_file.into_file();
let mut async_io = RawFileSync::new(file.as_raw_fd());
let mut async_io = RawSync::new(file.as_raw_fd());
raw_async_io_tests::test_write_zeroes(&mut async_io, &mut file);
}
@@ -157,7 +157,7 @@ mod unit_tests {
fn test_punch_hole_multiple_operations() {
let temp_file = TempFile::new().unwrap();
let mut file = temp_file.into_file();
let mut async_io = RawFileSync::new(file.as_raw_fd());
let mut async_io = RawSync::new(file.as_raw_fd());
raw_async_io_tests::test_punch_hole_multiple_operations(&mut async_io, &mut file);
}
}