~ubuntu-branches/ubuntu/utopic/xfsprogs/utopic-proposed

« back to all changes in this revision

Viewing changes to repair/dinode.c

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2009-09-17 14:32:48 UTC
  • Revision ID: james.westby@ubuntu.com-20090917143248-jrclwl1byyautnnk
Tags: 3.0.4
* New bugfix release
* Resolve a libxfs unaligned access (closes: #517553)

Show diffs side-by-side

added added

removed removed

Lines of Context:
319
319
                return (agbno >= sbp->sb_agblocks);
320
320
        if (agno == (sbp->sb_agcount - 1)) 
321
321
                return (agbno >= (sbp->sb_dblocks -
322
 
                                ((sbp->sb_agcount - 1) * sbp->sb_agblocks)));
 
322
                                ((xfs_drfsbno_t)(sbp->sb_agcount - 1) *
 
323
                                 sbp->sb_agblocks)));
323
324
        return 1;
324
325
}
325
326
 
1280
1281
                }
1281
1282
        }
1282
1283
        /*
 
1284
         * Ideally if all the extents are ok (perhaps after further
 
1285
         * checks below?) we'd just move this back into extents format.
 
1286
         * But for now clear it, as the kernel will choke on this
 
1287
         */
 
1288
        if (*nex <= XFS_DFORK_SIZE(dip, mp, whichfork) /
 
1289
                        sizeof(xfs_bmbt_rec_t)) {
 
1290
                do_warn(
 
1291
        _("extent count for ino %lld %s fork too low (%d) for file format\n"),
 
1292
                                lino, forkname, *nex);
 
1293
                return(1);
 
1294
        }
 
1295
        /*
1283
1296
         * Check that the last child block's forward sibling pointer
1284
1297
         * is NULL.
1285
1298
         */