xfs: remove unused XFS_BMAPI_ flags
authorChristoph Hellwig <hch@infradead.org>
Wed, 23 Jun 2010 08:11:15 +0000 (18:11 +1000)
committerAlex Elder <aelder@sgi.com>
Mon, 26 Jul 2010 18:16:39 +0000 (13:16 -0500)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap.h
fs/xfs/xfs_inode.c

index e0389656ad2c51548014b6706efd202e86b56c09..598a30ba3141acd552cdf1d319d907eed9b1d9a3 100644 (file)
@@ -4618,19 +4618,13 @@ xfs_bmapi(
                         * allocate the stuff asked for in this bmap call
                         * but that wouldn't be as good.
                         */
-                       if (wasdelay && !(flags & XFS_BMAPI_EXACT)) {
+                       if (wasdelay) {
                                alen = (xfs_extlen_t)got.br_blockcount;
                                aoff = got.br_startoff;
                                if (lastx != NULLEXTNUM && lastx) {
                                        ep = xfs_iext_get_ext(ifp, lastx - 1);
                                        xfs_bmbt_get_all(ep, &prev);
                                }
-                       } else if (wasdelay) {
-                               alen = (xfs_extlen_t)
-                                       XFS_FILBLKS_MIN(len,
-                                               (got.br_startoff +
-                                                got.br_blockcount) - bno);
-                               aoff = bno;
                        } else {
                                alen = (xfs_extlen_t)
                                        XFS_FILBLKS_MIN(len, MAXEXTLEN);
index 419dafb9d87d4a2a79b440c30a54e672a571b55f..d9c8a39b285570415afe4f1d6c0aa901f27b2a29 100644 (file)
@@ -82,16 +82,13 @@ typedef     struct xfs_bmap_free
 #define XFS_BMAPI_DELAY                0x002   /* delayed write operation */
 #define XFS_BMAPI_ENTIRE       0x004   /* return entire extent, not trimmed */
 #define XFS_BMAPI_METADATA     0x008   /* mapping metadata not user data */
-#define XFS_BMAPI_EXACT                0x010   /* allocate only to spec'd bounds */
-#define XFS_BMAPI_ATTRFORK     0x020   /* use attribute fork not data */
-#define XFS_BMAPI_ASYNC                0x040   /* bunmapi xactions can be async */
-#define XFS_BMAPI_RSVBLOCKS    0x080   /* OK to alloc. reserved data blocks */
-#define        XFS_BMAPI_PREALLOC      0x100   /* preallocation op: unwritten space */
-#define        XFS_BMAPI_IGSTATE       0x200   /* Ignore state - */
+#define XFS_BMAPI_ATTRFORK     0x010   /* use attribute fork not data */
+#define XFS_BMAPI_RSVBLOCKS    0x020   /* OK to alloc. reserved data blocks */
+#define        XFS_BMAPI_PREALLOC      0x040   /* preallocation op: unwritten space */
+#define        XFS_BMAPI_IGSTATE       0x080   /* Ignore state - */
                                        /* combine contig. space */
-#define        XFS_BMAPI_CONTIG        0x400   /* must allocate only one extent */
-/*     XFS_BMAPI_DIRECT_IO     0x800   */
-#define XFS_BMAPI_CONVERT      0x1000  /* unwritten extent conversion - */
+#define        XFS_BMAPI_CONTIG        0x100   /* must allocate only one extent */
+#define XFS_BMAPI_CONVERT      0x200   /* unwritten extent conversion - */
                                        /* need write cache flushing and no */
                                        /* additional allocation alignments */
 
@@ -100,9 +97,7 @@ typedef      struct xfs_bmap_free
        { XFS_BMAPI_DELAY,      "DELAY" }, \
        { XFS_BMAPI_ENTIRE,     "ENTIRE" }, \
        { XFS_BMAPI_METADATA,   "METADATA" }, \
-       { XFS_BMAPI_EXACT,      "EXACT" }, \
        { XFS_BMAPI_ATTRFORK,   "ATTRFORK" }, \
-       { XFS_BMAPI_ASYNC,      "ASYNC" }, \
        { XFS_BMAPI_RSVBLOCKS,  "RSVBLOCKS" }, \
        { XFS_BMAPI_PREALLOC,   "PREALLOC" }, \
        { XFS_BMAPI_IGSTATE,    "IGSTATE" }, \
index d22b580162cc2075aec482fd1f6b643fbc319de0..1e6ae68f91af176c51f7bc38a3a61eafe143296b 100644 (file)
@@ -1585,8 +1585,7 @@ xfs_itruncate_finish(
                xfs_bmap_init(&free_list, &first_block);
                error = xfs_bunmapi(ntp, ip,
                                    first_unmap_block, unmap_len,
-                                   xfs_bmapi_aflag(fork) |
-                                     (sync ? 0 : XFS_BMAPI_ASYNC),
+                                   xfs_bmapi_aflag(fork),
                                    XFS_ITRUNC_MAX_EXTENTS,
                                    &first_block, &free_list,
                                    NULL, &done);