On (02/12/18 11:05), Bart Van Assche wrote:
[..]
quoted hunk ↗ jump to hunk
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index ac4740cf74be..cf17626604c2 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1026,14 +1026,25 @@ static inline int blk_rq_cur_bytes(const struct request *rq)
extern unsigned int blk_rq_err_bytes(const struct request *rq);
+/*
+ * Variables of type sector_t represent an offset or size that is a multiple of
+ * 2**9 bytes. Hence these two constants.
+ */
+#ifndef SECTOR_SHIFT
+enum { SECTOR_SHIFT = 9 };
+#endif
+#ifndef SECTOR_SIZE
+enum { SECTOR_SIZE = 512 };
+#endif
Shouldn't SECTOR_SIZE depend on SECTOR_SHIFT?
1 << SECTOR_SHIFT
-ss