aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_fs.h
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2008-11-27 22:23:35 -0500
committerNiv Sardi <xaiki@sgi.com>2008-11-30 19:29:00 -0500
commit8a7141a8b931d60d42830432b82078cd6dace83b (patch)
treee5f1f2573b7e759e8d04b39757c1491689037485 /fs/xfs/xfs_fs.h
parent0924b585fc49bf371bc700c23e516a538bf589af (diff)
[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>
Diffstat (limited to 'fs/xfs/xfs_fs.h')
-rw-r--r--fs/xfs/xfs_fs.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h
index 01c0cc88d3f3..df859d62a163 100644
--- a/fs/xfs/xfs_fs.h
+++ b/fs/xfs/xfs_fs.h
@@ -114,22 +114,10 @@ struct getbmapx {
114#define BMV_IF_NO_DMAPI_READ 0x2 /* Do not generate DMAPI read event */ 114#define BMV_IF_NO_DMAPI_READ 0x2 /* Do not generate DMAPI read event */
115#define BMV_IF_PREALLOC 0x4 /* rtn status BMV_OF_PREALLOC if req */ 115#define BMV_IF_PREALLOC 0x4 /* rtn status BMV_OF_PREALLOC if req */
116#define BMV_IF_VALID (BMV_IF_ATTRFORK|BMV_IF_NO_DMAPI_READ|BMV_IF_PREALLOC) 116#define BMV_IF_VALID (BMV_IF_ATTRFORK|BMV_IF_NO_DMAPI_READ|BMV_IF_PREALLOC)
117#ifdef __KERNEL__
118#define BMV_IF_EXTENDED 0x40000000 /* getpmapx if set */
119#endif
120 117
121/* bmv_oflags values - returned for for each non-header segment */ 118/* bmv_oflags values - returned for for each non-header segment */
122#define BMV_OF_PREALLOC 0x1 /* segment = unwritten pre-allocation */ 119#define BMV_OF_PREALLOC 0x1 /* segment = unwritten pre-allocation */
123 120
124/* Convert getbmap <-> getbmapx - move fields from p1 to p2. */
125#define GETBMAP_CONVERT(p1,p2) { \
126 p2.bmv_offset = p1.bmv_offset; \
127 p2.bmv_block = p1.bmv_block; \
128 p2.bmv_length = p1.bmv_length; \
129 p2.bmv_count = p1.bmv_count; \
130 p2.bmv_entries = p1.bmv_entries; }
131
132
133/* 121/*
134 * Structure for XFS_IOC_FSSETDM. 122 * Structure for XFS_IOC_FSSETDM.
135 * For use by backup and restore programs to set the XFS on-disk inode 123 * For use by backup and restore programs to set the XFS on-disk inode