summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorYegor Yefremov <yegorslists@googlemail.com>2016-03-01 12:10:02 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-03-02 19:14:57 +0100
commit196dccdfcfc2d8bcc8a162b13c2f7f500a351914 (patch)
tree7bd5c85a2d11c3cb3b4755f171876f308be0fbd3 /include/linux
parent3838a998c1bb3db455336257d65932007cc4503e (diff)
downloadbarebox-196dccdfcfc2d8bcc8a162b13c2f7f500a351914.tar.gz
barebox-196dccdfcfc2d8bcc8a162b13c2f7f500a351914.tar.xz
linux/types.h: add sector_t and blkcnt_t types
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/types.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/types.h b/include/linux/types.h
index 9f8eb679f4..f64ec4a814 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -157,6 +157,22 @@ typedef __u32 __bitwise __wsum;
#define __aligned_be64 __be64 __attribute__((aligned(8)))
#define __aligned_le64 __le64 __attribute__((aligned(8)))
+/**
+ * The type used for indexing onto a disc or disc partition.
+ *
+ * Linux always considers sectors to be 512 bytes long independently
+ * of the devices real block size.
+ *
+ * blkcnt_t is the type of the inode's block count.
+ */
+#ifdef CONFIG_LBDAF
+typedef u64 sector_t;
+typedef u64 blkcnt_t;
+#else
+typedef unsigned long sector_t;
+typedef unsigned long blkcnt_t;
+#endif
+
/*
* The type of an index into the pagecache.
*/