From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aWmOG-0000Eo-1h for barebox@lists.infradead.org; Fri, 19 Feb 2016 14:50:41 +0000 Received: by mail-wm0-x232.google.com with SMTP id b205so71448187wmb.1 for ; Fri, 19 Feb 2016 06:50:19 -0800 (PST) From: yegorslists@googlemail.com Date: Fri, 19 Feb 2016 15:49:13 +0100 Message-Id: <1455893355-17319-1-git-send-email-yegorslists@googlemail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v3 1/3] linux/types.h: add sector_t and blkcnt_t types To: barebox@lists.infradead.org From: Yegor Yefremov Signed-off-by: Yegor Yefremov --- 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