block: Rename AsyncDiskFile::new_async_io to create_async_io

The new_ prefix in Rust conventionally denotes constructors that return
Self (e.g. Vec::new(), File::new()). AsyncDiskFile::new_async_io does
not return Self. It is a factory method that constructs and returns a
Box<dyn AsyncIo> worker bound to the disk file descriptor and
metadata. The create_ prefix communicates this: the caller receives
a freshly constructed object of a different type.

This rename touches every format backend in block plus two external
callers in virtio-devices and performance-metrics. Every change is a
mechanical s/new_async_io/create_async_io/ substitution. No functional
change.

Ref: #7877 (task 3.2.8)
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-04-20 23:23:12 +02:00
committed by Rob Bradford
parent 5a14d0e2e0
commit 21cd13df01
12 changed files with 75 additions and 75 deletions
+1 -1
View File
@@ -1129,7 +1129,7 @@ impl VirtioDevice for Block {
mem: mem.clone(),
disk_image: self
.disk_image
.new_async_io(queue_size as u32)
.create_async_io(queue_size as u32)
.map_err(|e| {
error!("failed to create new AsyncIo: {e}");
ActivateError::BadActivate