[lkml]   [2009]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Size of sector_t in userspace [Was: fix 41 'make headers_check' warnings]
On Wed, Jan 21 2009, Sam Ravnborg wrote:
> Hi Jens.
> In an attempt to fix some of the issues in our exported Headers jsr
> encountered some strange stuff in types.h.
> types.h is exported to userspace where we do not have access to CONFIG_*
> symbols.
> Despite this we use CONFGI_LBD to decide the size of sector_t like this:
> #ifdef CONFIG_LBD
> typedef u64 sector_t;
> typedef u64 blkcnt_t;
> #else
> typedef unsigned long sector_t;
> typedef unsigned long blkcnt_t;
> #endif
> But as CONFIG_LBD is never defined in userspace sector_t is now 32
> bit on 32 bit boxes and 64 bit on 64 bit boxes (in userspace).
> Is sector:t (and the companion blkcnt_t) really used by userspace?
> If it is - what size is it expected to have?

I don't think it's used by userspace, at least it cannot be used in
userspace <-> kernelspace interactions, since the size isn't fixed.

Jens Axboe

 \ /
  Last update: 2009-01-21 09:25    [W:0.148 / U:9.848 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site