Re: [PATCH 1/2 v2] convert xfs_getbmap to take formatter functions

Christoph Hellwig
2008-10-25T20:25:36Z

On Sat, Oct 25, 2008 at 08:33:11AM -0500, Eric Sandeen wrote:
> ("*thing" because fiemap doesn't pass the user pointer around, but rather
> has a pointer to a fiemap info structure, and helpers associated with it)

Which means sparse won't like it. You declare the first argument to the
filler as __user pointer here, but without it in the fiemap version. I
think the better interface would be to pass a void *buffer, which is
casted to a

struct {
struct getbmap(x) __user *base,
unsigned nr;
}

for the XFS ioctl case and something different for fiemap. And please
run sparse over it :)

Except for that the patch looks good to me.