~ubuntu-branches/ubuntu/precise/xfsprogs/precise

« back to all changes in this revision

Viewing changes to db/frag.c

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2009-12-10 09:19:37 UTC
  • mfrom: (8.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091210091937-22ll7dx6lsix3uec
Tags: 3.1.0
* New upstream release
* Merged German translation (closes: #521389)
* Merged German translation update (closes: #557100)
* Uptodate po file is provided now (closes: #538962)
* Fixed typos in xfs_quota man page (closes: #481715)
* Tighten permissions on temp fsr files (closes: #559490)

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
                                       xfs_extlen_t c);
67
67
static int              frag_f(int argc, char **argv);
68
68
static int              init(int argc, char **argv);
69
 
static void             process_bmbt_reclist(xfs_bmbt_rec_32_t *rp, int numrecs,
 
69
static void             process_bmbt_reclist(xfs_bmbt_rec_t *rp, int numrecs,
70
70
                                             extmap_t **extmapp);
71
71
static void             process_btinode(xfs_dinode_t *dip, extmap_t **extmapp,
72
72
                                        int whichfork);
223
223
 
224
224
static void
225
225
process_bmbt_reclist(
226
 
        xfs_bmbt_rec_32_t       *rp,
 
226
        xfs_bmbt_rec_t          *rp,
227
227
        int                     numrecs,
228
228
        extmap_t                **extmapp)
229
229
{
234
234
        xfs_dfsbno_t            s;
235
235
 
236
236
        for (i = 0; i < numrecs; i++, rp++) {
237
 
                convert_extent((xfs_bmbt_rec_64_t *)rp, &o, &s, &c, &f);
 
237
                convert_extent(rp, &o, &s, &c, &f);
238
238
                extmap_set_ext(extmapp, (xfs_fileoff_t)o, (xfs_extlen_t)c);
239
239
        }
240
240
}
248
248
        xfs_bmdr_block_t        *dib;
249
249
        int                     i;
250
250
        xfs_bmbt_ptr_t          *pp;
251
 
        xfs_bmbt_rec_32_t       *rp;
252
251
 
253
252
        dib = (xfs_bmdr_block_t *)XFS_DFORK_PTR(dip, whichfork);
254
253
        if (be16_to_cpu(dib->bb_level) == 0) {
255
 
                rp = (xfs_bmbt_rec_32_t *)XFS_BMDR_REC_ADDR(dib, 1);
 
254
                xfs_bmbt_rec_t          *rp = XFS_BMDR_REC_ADDR(dib, 1);
256
255
                process_bmbt_reclist(rp, be16_to_cpu(dib->bb_numrecs), extmapp);
257
256
                return;
258
257
        }
270
269
        extmap_t                **extmapp,
271
270
        int                     whichfork)
272
271
{
273
 
        xfs_bmbt_rec_32_t       *rp;
 
272
        xfs_bmbt_rec_t          *rp;
274
273
 
275
 
        rp = (xfs_bmbt_rec_32_t *)XFS_DFORK_PTR(dip, whichfork);
 
274
        rp = (xfs_bmbt_rec_t *)XFS_DFORK_PTR(dip, whichfork);
276
275
        process_bmbt_reclist(rp, XFS_DFORK_NEXTENTS(dip, whichfork), extmapp);
277
276
}
278
277
 
448
447
                        return;
449
448
                }
450
449
                rp = XFS_BMBT_REC_ADDR(mp, block, 1);
451
 
                process_bmbt_reclist((xfs_bmbt_rec_32_t *)rp, 
452
 
                                nrecs, extmapp);
 
450
                process_bmbt_reclist(rp, nrecs, extmapp);
453
451
                return;
454
452
        }
455
453