diff --git a/lib/device/bcache-utils.c b/lib/device/bcache-utils.c index fb02a4b7e..d946cc407 100644 --- a/lib/device/bcache-utils.c +++ b/lib/device/bcache-utils.c @@ -151,7 +151,7 @@ static bool _zero_partial(struct bcache *cache, int fd, block_address bb, uint64 return true; } -bool bcache_write_zeros(struct bcache *cache, int fd, uint64_t start, size_t len) +bool bcache_zero_bytes(struct bcache *cache, int fd, uint64_t start, size_t len) { block_address bb, be; uint64_t block_size = bcache_block_sectors(cache) << SECTOR_SHIFT; diff --git a/lib/device/bcache.h b/lib/device/bcache.h index c6b6fb7e2..c07f01268 100644 --- a/lib/device/bcache.h +++ b/lib/device/bcache.h @@ -161,7 +161,7 @@ void bcache_prefetch_bytes(struct bcache *cache, int fd, uint64_t start, size_t // Reads, writes and zeroes bytes. Returns false if errors occur. bool bcache_read_bytes(struct bcache *cache, int fd, uint64_t start, size_t len, void *data); bool bcache_write_bytes(struct bcache *cache, int fd, uint64_t start, size_t len, void *data); -bool bcache_write_zeros(struct bcache *cache, int fd, uint64_t start, size_t len); +bool bcache_zero_bytes(struct bcache *cache, int fd, uint64_t start, size_t len); //---------------------------------------------------------------- diff --git a/lib/label/label.c b/lib/label/label.c index a9818092a..d6a5727e8 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -988,7 +988,7 @@ bool dev_write_zeros(struct device *dev, off_t start, size_t len) } } - if (!bcache_write_zeros(scan_bcache, dev->bcache_fd, start, len)) { + if (!bcache_zero_bytes(scan_bcache, dev->bcache_fd, start, len)) { log_error("dev_write_zeros %s at %u bcache write failed invalidate fd %d", dev_name(dev), (uint32_t)start, dev->bcache_fd); label_scan_invalidate(dev);