From 25f4f23e4202dd31866d4832a1e5b3424daccfb2 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Wed, 19 Aug 2015 12:44:07 +0100 Subject: [PATCH] [file_utils] fix bug in get_nr_blocks. Introduced in previous patch --- persistent-data/file_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/persistent-data/file_utils.cc b/persistent-data/file_utils.cc index b00acf0..88ee945 100644 --- a/persistent-data/file_utils.cc +++ b/persistent-data/file_utils.cc @@ -24,7 +24,7 @@ persistent_data::get_nr_blocks(string const &path, sector_t block_size) throw runtime_error("Couldn't stat dev path"); if (S_ISREG(info.st_mode) && info.st_size) - nr_blocks = div_up(info.st_size, MD_BLOCK_SIZE); + nr_blocks = div_up(info.st_size, block_size); else if (S_ISBLK(info.st_mode)) { // To get the size of a block device we need to