From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aZKCX-0006vv-Ee for barebox@lists.infradead.org; Fri, 26 Feb 2016 15:21:06 +0000 Received: by mail-wm0-x243.google.com with SMTP id g62so9598197wme.2 for ; Fri, 26 Feb 2016 07:20:44 -0800 (PST) From: yegorslists@googlemail.com Date: Fri, 26 Feb 2016 16:19:43 +0100 Message-Id: <1456499985-22860-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 v4 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