[XFS] convert xfs_getbmap to take formatter functions
authorEric Sandeen <sandeen@sandeen.net>
Fri, 28 Nov 2008 03:23:35 +0000 (14:23 +1100)
committerNiv Sardi <xaiki@sgi.com>
Mon, 1 Dec 2008 00:29:00 +0000 (11:29 +1100)
commit8a7141a8b931d60d42830432b82078cd6dace83b
treee5f1f2573b7e759e8d04b39757c1491689037485
parent0924b585fc49bf371bc700c23e516a538bf589af
[XFS] convert xfs_getbmap to take formatter functions

Preliminary work to hook up fiemap, this allows us to pass in an
arbitrary formatter to copy extent data back to userspace.

The formatter takes info for 1 extent, a pointer to the user "thing*"
and a pointer to a "filled" variable to indicate whether a userspace
buffer did get filled in (for fiemap, hole "extents" are skipped).

I'm just using the getbmapx struct as a "common denominator" because
as far as I can see, it holds all info that any formatters will care
about.

("*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)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
fs/xfs/linux-2.6/xfs_ioctl.c
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap.h
fs/xfs/xfs_fs.h