xfs
[Top] [All Lists]

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

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH 1/2 v2] convert xfs_getbmap to take formatter functions
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sat, 25 Oct 2008 16:25:28 -0400
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <49032017.6070408@xxxxxxxxxxx>
References: <49031E81.7040807@xxxxxxxxxxx> <49032017.6070408@xxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
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.

<Prev in Thread] Current Thread [Next in Thread>