pub(crate) async fn write_efficient_zeroes<S: StorageExt>(
storage: S,
offset: u64,
length: u64,
allocate: bool,
) -> Result<()>Expand description
Write zeroes efficiently to the given area.
This implements write_zeroes() and write_allocated_zeroes().
If allocate is true, use Storage::pure_write_allocated_zeroes(); else, use
Storage::pure_write_zeroes().
If the pure_* call fails with io::ErrorKind::Unsupported, fall back to
write_full_zeroes().