]> Pileus Git - ~andy/linux/blobdiff - fs/xfs/xfs_bmap.h
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / fs / xfs / xfs_bmap.h
index 7c9d12cd7a47bbd28db102e238b15d2c1ac547af..be2979d88d326625a5df5fbe387dfa19c4a3ac8b 100644 (file)
@@ -95,7 +95,6 @@ typedef       struct xfs_bmap_free
                                        /* need write cache flushing and no */
                                        /* additional allocation alignments */
 
-#define        XFS_BMAPI_AFLAG(w)      xfs_bmapi_aflag(w)
 static inline int xfs_bmapi_aflag(int w)
 {
        return (w == XFS_ATTR_FORK ? XFS_BMAPI_ATTRFORK : 0);
@@ -107,7 +106,6 @@ static inline int xfs_bmapi_aflag(int w)
 #define        DELAYSTARTBLOCK         ((xfs_fsblock_t)-1LL)
 #define        HOLESTARTBLOCK          ((xfs_fsblock_t)-2LL)
 
-#define        XFS_BMAP_INIT(flp,fbp)  xfs_bmap_init(flp,fbp)
 static inline void xfs_bmap_init(xfs_bmap_free_t *flp, xfs_fsblock_t *fbp)
 {
        ((flp)->xbf_first = NULL, (flp)->xbf_count = 0, \
@@ -356,15 +354,18 @@ xfs_bmap_finish(
        xfs_bmap_free_t         *flist,         /* i/o: list extents to free */
        int                     *committed);    /* xact committed or not */
 
+/* bmap to userspace formatter - copy to user & advance pointer */
+typedef int (*xfs_bmap_format_t)(void **, struct getbmapx *, int *);
+
 /*
- * Fcntl interface to xfs_bmapi.
+ * Get inode's extents as described in bmv, and format for output.
  */
 int                                            /* error code */
 xfs_getbmap(
        xfs_inode_t             *ip,
-       struct getbmap          *bmv,           /* user bmap structure */
-       void                    __user *ap,     /* pointer to user's array */
-       int                     iflags);        /* interface flags */
+       struct getbmapx         *bmv,           /* user bmap structure */
+       xfs_bmap_format_t       formatter,      /* format to user */
+       void                    *arg);          /* formatter arg */
 
 /*
  * Check if the endoff is outside the last extent. If so the caller will grow