1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

bcache: rename bcache_write_zeroes() -> bcache_zero_bytes()

Now matches the other util functions:

bcache_{prefetch,read,write,zero}_bytes()
This commit is contained in:
Joe Thornber 2018-05-03 10:21:14 +01:00
parent 8b755f1e04
commit 2688aafefb
3 changed files with 3 additions and 3 deletions

View File

@ -151,7 +151,7 @@ static bool _zero_partial(struct bcache *cache, int fd, block_address bb, uint64
return true; 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; block_address bb, be;
uint64_t block_size = bcache_block_sectors(cache) << SECTOR_SHIFT; uint64_t block_size = bcache_block_sectors(cache) << SECTOR_SHIFT;

View File

@ -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. // 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_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_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);
//---------------------------------------------------------------- //----------------------------------------------------------------

View File

@ -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", log_error("dev_write_zeros %s at %u bcache write failed invalidate fd %d",
dev_name(dev), (uint32_t)start, dev->bcache_fd); dev_name(dev), (uint32_t)start, dev->bcache_fd);
label_scan_invalidate(dev); label_scan_invalidate(dev);