Skip to contentSkip to conversation

master - bcache: rename bcache_write_zeroes() -> bcache_zero_bytes()

PATCH Joe Thornber 1 participant 1 message May 3, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2688aafefbc937fc319c59ca1c77cdc24bb2c214
Commit:        2688aafefbc937fc319c59ca1c77cdc24bb2c214
Parent:        8b755f1e042555c5c90cb5766fe90429f143f089
Author:        Joe Thornber <[email protected]>
AuthorDate:    Thu May 3 10:21:14 2018 +0100
Committer:     Joe Thornber <[email protected]>
CommitterDate: Thu May 3 10:21:14 2018 +0100

bcache: rename bcache_write_zeroes() -> bcache_zero_bytes()

Now matches the other util functions:

bcache_{prefetch,read,write,zero}_bytes()

---
 lib/device/bcache-utils.c |    2 +-
 lib/device/bcache.h       |    2 +-
 lib/label/label.c         |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
lib/device/bcache-utils.c +1 -1
index fb02a4b..d946cc4 100644
@@ -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;
lib/device/bcache.h +1 -1
index c6b6fb7..c07f012 100644
@@ -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);
 
 //----------------------------------------------------------------
 
lib/label/label.c +1 -1
index a981809..d6a5727 100644
@@ -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);