mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v4 1/3] linux/types.h: add sector_t and blkcnt_t types
@ 2016-02-26 15:19 yegorslists
  2016-02-26 15:19 ` [PATCH v4 2/3] linux/fs.h: add types and routines needed for SquashFS yegorslists
  2016-02-26 15:19 ` [PATCH v4 3/3] fs: add support for SquashFS 4.0 yegorslists
  0 siblings, 2 replies; 5+ messages in thread
From: yegorslists @ 2016-02-26 15:19 UTC (permalink / raw)
  To: barebox

From: Yegor Yefremov <yegorslists@googlemail.com>

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 include/linux/types.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/include/linux/types.h b/include/linux/types.h
index 9f8eb67..f64ec4a 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.
  */
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-01  8:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26 15:19 [PATCH v4 1/3] linux/types.h: add sector_t and blkcnt_t types yegorslists
2016-02-26 15:19 ` [PATCH v4 2/3] linux/fs.h: add types and routines needed for SquashFS yegorslists
2016-02-26 17:19   ` Antony Pavlov
2016-02-26 15:19 ` [PATCH v4 3/3] fs: add support for SquashFS 4.0 yegorslists
2016-03-01  8:23   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox