)]}'
{
  "commit": "24446fc66fdebbdd8baca0f44fd2a47ad77ba580",
  "tree": "98822ad25ac286f1bc6730ae47004bdc091f4461",
  "parents": [
    "0fbca4d1c3932c27c4794bf5c2b5fc961cf5a54f"
  ],
  "author": {
    "name": "bpm@sgi.com",
    "email": "bpm@sgi.com",
    "time": "Wed Jan 19 17:41:58 2011 +0000"
  },
  "committer": {
    "name": "Alex Elder",
    "email": "aelder@sgi.com",
    "time": "Fri Jan 28 09:13:29 2011 -0600"
  },
  "message": "xfs: xfs_bmap_add_extent_delay_real should init br_startblock\n\nWhen filling in the middle of a previous delayed allocation in\nxfs_bmap_add_extent_delay_real, set br_startblock of the new delay\nextent to the right to nullstartblock instead of 0 before inserting\nthe extent into the ifork (xfs_iext_insert), rather than setting\nbr_startblock afterward.\n\nAdding the extent into the ifork with br_startblock\u003d0 can lead to\nthe extent being copied into the btree by xfs_bmap_extent_to_btree\nif we happen to convert from extents format to btree format before\nupdating br_startblock with the correct value.  The unexpected\naddition of this delay extent to the btree can cause subsequent\nXFS_WANT_CORRUPTED_GOTO filesystem shutdown in several\nxfs_bmap_add_extent_delay_real cases where we are converting a delay\nextent to real and unexpectedly find an extent already inserted.\nFor example:\n\n911         case BMAP_LEFT_FILLING:\n912                 /*\n913                  * Filling in the first part of a previous delayed allocation.\n914                  * The left neighbor is not contiguous.\n915                  */\n916                 trace_xfs_bmap_pre_update(ip, idx, state, _THIS_IP_);\n917                 xfs_bmbt_set_startoff(ep, new_endoff);\n918                 temp \u003d PREV.br_blockcount - new-\u003ebr_blockcount;\n919                 xfs_bmbt_set_blockcount(ep, temp);\n920                 xfs_iext_insert(ip, idx, 1, new, state);\n921                 ip-\u003ei_df.if_lastex \u003d idx;\n922                 ip-\u003ei_d.di_nextents++;\n923                 if (cur \u003d\u003d NULL)\n924                         rval \u003d XFS_ILOG_CORE | XFS_ILOG_DEXT;\n925                 else {\n926                         rval \u003d XFS_ILOG_CORE;\n927                         if ((error \u003d xfs_bmbt_lookup_eq(cur, new-\u003ebr_startoff,\n928                                         new-\u003ebr_startblock, new-\u003ebr_blockcount,\n929                                         \u0026i)))\n930                                 goto done;\n931                         XFS_WANT_CORRUPTED_GOTO(i \u003d\u003d 0, done);\n\nWith the bogus extent in the btree we shutdown the filesystem at\n931.  The conversion from extents to btree format happens when the\nnumber of extents in the inode increases above ip-\u003ei_df.if_ext_max.\nxfs_bmap_extent_to_btree copies extents from the ifork into the\nbtree, ignoring all delalloc extents which are denoted by\nbr_startblock having some value of nullstartblock.\n\nSGI-PV: 1013221\n\nSigned-off-by: Ben Myers \u003cbpm@sgi.com\u003e\nReviewed-by: Dave Chinner \u003cdchinner@redhat.com\u003e\nSigned-off-by: Alex Elder \u003caelder@sgi.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3e9c278a8f7822458e300b94736ac1b80b50ecab",
      "old_mode": 33188,
      "old_path": "fs/xfs/xfs_bmap.c",
      "new_id": "dc3afd7739ff40754d1e04eda13178acc78ef3c2",
      "new_mode": 33188,
      "new_path": "fs/xfs/xfs_bmap.c"
    }
  ]
}
