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:
parent
8b755f1e04
commit
2688aafefb
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user