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

[dm-devel] [patch 07/11] dm-crypt: remove SECTOR_SHIFT define



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 suse de>
---
 drivers/md/dm-crypt.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -350,12 +350,12 @@ static int crypt_convert(struct crypt_co
 		struct scatterlist sg_in = {
 			.page = bv_in->bv_page,
 			.offset = bv_in->bv_offset + ctx->offset_in,
-			.length = 1 << SECTOR_SHIFT
+			.length = 512
 		};
 		struct scatterlist sg_out = {
 			.page = bv_out->bv_page,
 			.offset = bv_out->bv_offset + ctx->offset_out,
-			.length = 1 << SECTOR_SHIFT
+			.length = 512
 		};
 
 		ctx->offset_in += sg_in.length;

-- 


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