--- initial
+++ final
@@ -1,96 +1,96 @@
 static int xfs_file_iomap_begin_delay(struct inode *inode, loff_t offset, loff_t count, unsigned flags, struct iomap *iomap) {
   struct xfs_inode *ip = XFS_I(inode);
   struct xfs_mount *mp = ip->i_mount;
   struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, XFS_DATA_FORK);
   xfs_fileoff_t offset_fsb = XFS_B_TO_FSBT(mp, offset);
   xfs_fileoff_t maxbytes_fsb = XFS_B_TO_FSB(mp, mp->m_super->s_maxbytes);
   xfs_fileoff_t end_fsb;
   int error = 0, eof = 0;
   struct xfs_bmbt_irec got;
   xfs_extnum_t idx;
   xfs_fsblock_t prealloc_blocks = 0;
   ASSERT(!XFS_IS_REALTIME_INODE(ip));
   ASSERT(!xfs_get_extsz_hint(ip));
   xfs_ilock(ip, XFS_ILOCK_EXCL);
-  if (unlikely(XFS_TEST_ERROR((XFS_IFORK_FORMAT(ip, XFS_DATA_FORK) != XFS_DINODE_FMT_EXTENTS && XFS_IFORK_FORMAT(ip, XFS_DATA_FORK) != XFS_DINODE_FMT_BTREE), mp, XFS_ERRTAG_BMAPIFORMAT, XFS_RANDOM_BMAPIFORMAT))) {
+  if (unlikely(XFS_TEST_ERROR((XFS_IFORK_FORMAT(ip, XFS_DATA_FORK) != XFS_DINODE_FMT_EXTENTS && XFS_IFORK_FORMAT(ip, XFS_DATA_FORK) != XFS_DINODE_FMT_BTREE), mp, XFS_ERRTAG_BMAPIFORMAT))) {
     XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, mp);
     error = -EFSCORRUPTED;
     goto out_unlock;
   }
   XFS_STATS_INC(mp, xs_blk_mapw);
   if (!(ifp->if_flags & XFS_IFEXTENTS)) {
     error = xfs_iread_extents(NULL, ip, XFS_DATA_FORK);
     if (error) goto out_unlock;
   }
   eof = !xfs_iext_lookup_extent(ip, ifp, offset_fsb, &idx, &got);
   if (!eof && got.br_startoff <= offset_fsb) {
     if (xfs_is_reflink_inode(ip)) {
       bool shared;
       end_fsb = min(XFS_B_TO_FSB(mp, offset + count), maxbytes_fsb);
       xfs_trim_extent(&got, offset_fsb, end_fsb - offset_fsb);
       error = xfs_reflink_reserve_cow(ip, &got, &shared);
       if (error) goto out_unlock;
     }
     trace_xfs_iomap_found(ip, offset, count, 0, &got);
     goto done;
   }
   error = xfs_qm_dqattach_locked(ip, 0);
   if (error) goto out_unlock;
   /*
    * We cap the maximum length we map here to MAX_WRITEBACK_PAGES pages
    * to keep the chunks of work done where somewhat symmetric with the
    * work writeback does. This is a completely arbitrary number pulled
    * out of thin air as a best guess for initial testing.
    *
    * Note that the values needs to be less than 32-bits wide until
    * the lower level functions are updated.
    */
   count = min_t(loff_t, count, 1024 * PAGE_SIZE);
   end_fsb = min(XFS_B_TO_FSB(mp, offset + count), maxbytes_fsb);
   if (eof) {
     prealloc_blocks = xfs_iomap_prealloc_size(ip, offset, count, idx);
     if (prealloc_blocks) {
       xfs_extlen_t align;
       xfs_off_t end_offset;
       xfs_fileoff_t p_end_fsb;
       end_offset = XFS_WRITEIO_ALIGN(mp, offset + count - 1);
       p_end_fsb = XFS_B_TO_FSBT(mp, end_offset) + prealloc_blocks;
       align = xfs_eof_alignment(ip, 0);
       if (align) p_end_fsb = roundup_64(p_end_fsb, align);
       p_end_fsb = min(p_end_fsb, maxbytes_fsb);
       ASSERT(p_end_fsb > offset_fsb);
       prealloc_blocks = p_end_fsb - end_fsb;
     }
   }
 retry:
   error = xfs_bmapi_reserve_delalloc(ip, XFS_DATA_FORK, offset_fsb, end_fsb - offset_fsb, prealloc_blocks, &got, &idx, eof);
   switch (error) {
   case 0: break;
   case -ENOSPC:
   case -EDQUOT:
     /* retry without any preallocation */
     trace_xfs_delalloc_enospc(ip, offset, count);
     if (prealloc_blocks) {
       prealloc_blocks = 0;
       goto retry;
     }
     /*FALLTHRU*/
   default: goto out_unlock;
   }
   /*
    * Flag newly allocated delalloc blocks with IOMAP_F_NEW so we punch
    * them out if the write happens to fail.
    */
   iomap->flags = IOMAP_F_NEW;
   trace_xfs_iomap_alloc(ip, offset, count, 0, &got);
 done:
   if (isnullstartblock(got.br_startblock)) got.br_startblock = DELAYSTARTBLOCK;
   if (!got.br_startblock) {
     error = xfs_alert_fsblock_zero(ip, &got);
     if (error) goto out_unlock;
   }
   xfs_bmbt_to_iomap(ip, iomap, &got);
 out_unlock:
   xfs_iunlock(ip, XFS_ILOCK_EXCL);
   return error;
 }<sep>@@
expression e1,e2,e3,e4;
@@
XFS_TEST_ERROR(e1,e2,e3
-                      ,e4
   )