From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
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 16:27:43 -0400 [thread overview]
Message-ID: <20081025202743.GH28002@infradead.org> (raw)
In-Reply-To: <49032017.6070408@sandeen.net>
> +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.
next prev parent reply other threads:[~2008-10-25 20:27 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 [this message]
2008-10-25 20:28 ` Eric Sandeen
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=20081025202743.GH28002@infradead.org \
--to=hch@infradead.org \
--cc=sandeen@sandeen.net \
--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