From: Eric Sandeen <sandeen@sandeen.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH 1/2 v2] convert xfs_getbmap to take formatter functions
Date: Sat, 25 Oct 2008 15:28:46 -0500 [thread overview]
Message-ID: <4903817E.5040006@sandeen.net> (raw)
In-Reply-To: <20081025202743.GH28002@infradead.org>
Christoph Hellwig wrote:
>> +int xfs_getbmapx_format(void __user **ap, struct getbmapx *bmv, int *filled)
>> +{
>> + *filled = 0;
>> + if (copy_to_user(*ap, bmv, sizeof(struct getbmapx)))
>> + return XFS_ERROR(EFAULT);
>> +
>> + *ap += sizeof(struct getbmapx);
>> + *filled = 1;
>> + return 0;
>> +}
>> +
>> +int xfs_getbmap_format(void __user **ap, struct getbmapx *bmv, int *filled)
>> +{
>> + *filled = 0;
>> + /* copy only getbmap portion (not getbmapx) */
>> + if (copy_to_user(*ap, bmv, sizeof(struct getbmap)))
>> + return XFS_ERROR(EFAULT);
>> +
>> + *ap += sizeof(struct getbmap);
>> + *filled = 1;
>> + return 0;
>> +}
>
> Probably makes sense to have these two helpers in xfs_ioctl.c, where
> they are used, similar to how fiemap is implemented.
>
Ok, that makes sense. Will change that & the other suggestions.
(I did run sparse once, but made changes after that and forgot to re-run...)
-Eric
next prev parent reply other threads:[~2008-10-25 20:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 13:26 [PATCH 0/2 v2] hook xfs to fiemap ioctl Eric Sandeen
2008-10-25 13:33 ` [PATCH 1/2 v2] convert xfs_getbmap to take formatter functions Eric Sandeen
2008-10-25 20:25 ` Christoph Hellwig
2008-10-25 20:27 ` Christoph Hellwig
2008-10-25 20:28 ` Eric Sandeen [this message]
2008-10-25 13:34 ` [PATCH 2/2 v2] hook up fiemap & associated formatter Eric Sandeen
2008-10-25 20:26 ` Christoph Hellwig
2008-10-26 4:38 ` Eric Sandeen
2008-10-25 20:20 ` [PATCH 0/2 v2] hook xfs to fiemap ioctl Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4903817E.5040006@sandeen.net \
--to=sandeen@sandeen.net \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox