[patch 06/11] dm-log: remove SECTOR_SHIFT define

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sector size on Linux is always 512 bytes. Don't even try to give the
impression this is changeable.

Signed-off-by: Jan Blunck <jblunck@xxxxxxx>
---
 drivers/md/dm-log.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- a/drivers/md/dm-log.c
+++ b/drivers/md/dm-log.c
@@ -330,9 +330,9 @@ static int create_log_context(struct dir
 		/*
 		 * Buffer holds both header and bitset.
 		 */
-		buf_size = dm_round_up((LOG_OFFSET << SECTOR_SHIFT) +
-				       bitset_size, ti->limits.hardsect_size);
-		lc->header_location.count = buf_size >> SECTOR_SHIFT;
+		buf_size = dm_round_up((LOG_OFFSET << 9) + bitset_size,
+				       ti->limits.hardsect_size);
+		lc->header_location.count = buf_size >> 9;
 		lc->io_req.mem.type = DM_IO_VMA;
 		lc->io_req.client = dm_io_client_create(dm_div_up(buf_size,
 								   PAGE_SIZE));
@@ -350,8 +350,7 @@ static int create_log_context(struct dir
 			return -ENOMEM;
 		}
 
-		lc->clean_bits = (void *)lc->disk_header +
-				 (LOG_OFFSET << SECTOR_SHIFT);
+		lc->clean_bits = (void *)lc->disk_header + (LOG_OFFSET << 9);
 	}
 
 	memset(lc->clean_bits, -1, bitset_size);

-- 

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux