322
} else if (INT_GET(info->magic, ARCH_CONVERT) !=
322
} else if (be16_to_cpu(info->magic) != XFS_DA_NODE_MAGIC) {
325
324
do_warn(_("bad dir magic number 0x%x in inode %llu "
327
INT_GET(info->magic, ARCH_CONVERT),
326
be16_to_cpu(info->magic),
328
327
da_cursor->ino, bno);
331
330
node = (xfs_da_intnode_t*)info;
332
if (INT_GET(node->hdr.count, ARCH_CONVERT) >
333
mp->m_dir_node_ents) {
331
if (be16_to_cpu(node->hdr.count) > mp->m_dir_node_ents) {
335
333
do_warn(_("bad record count in inode %llu, count = %d, "
336
334
"max = %d\n"), da_cursor->ino,
337
INT_GET(node->hdr.count, ARCH_CONVERT),
335
be16_to_cpu(node->hdr.count),
338
336
mp->m_dir_node_ents);
460
457
* that all entries are used, encountered and expected hashvals
463
if (entry != INT_GET(node->hdr.count, ARCH_CONVERT) - 1) {
460
if (entry != be16_to_cpu(node->hdr.count) - 1) {
465
462
_("directory block used/count inconsistency - %d / %hu\n"),
466
entry, INT_GET(node->hdr.count, ARCH_CONVERT));
463
entry, be16_to_cpu(node->hdr.count));
470
467
* hash values monotonically increasing ???
472
469
if (cursor->level[this_level].hashval >=
473
INT_GET(node->btree[entry].hashval, ARCH_CONVERT)) {
470
be32_to_cpu(node->btree[entry].hashval)) {
474
471
do_warn(_("directory/attribute block hashvalue inconsistency, "
475
472
"expected > %u / saw %u\n"),
476
473
cursor->level[this_level].hashval,
477
INT_GET(node->btree[entry].hashval, ARCH_CONVERT));
474
be32_to_cpu(node->btree[entry].hashval));
480
if (INT_GET(node->hdr.info.forw, ARCH_CONVERT) != 0) {
477
if (be32_to_cpu(node->hdr.info.forw) != 0) {
481
478
do_warn(_("bad directory/attribute forward block pointer, "
482
479
"expected 0, saw %u\n"),
483
INT_GET(node->hdr.info.forw, ARCH_CONVERT));
480
be32_to_cpu(node->hdr.info.forw));
498
495
* ok, now check descendant block number against this level
500
497
if (cursor->level[p_level].bno !=
501
INT_GET(node->btree[entry].before, ARCH_CONVERT)) {
498
be32_to_cpu(node->btree[entry].before))
505
501
if (cursor->level[p_level].hashval !=
506
INT_GET(node->btree[entry].hashval, ARCH_CONVERT)) {
502
be32_to_cpu(node->btree[entry].hashval)) {
507
503
if (!no_modify) {
508
504
do_warn(_("correcting bad hashval in non-leaf dir "
509
505
"block\n\tin (level %d) in inode %llu.\n"),
510
506
this_level, cursor->ino);
511
INT_SET(node->btree[entry].hashval, ARCH_CONVERT,
512
cursor->level[p_level].hashval);
507
node->btree[entry].hashval = cpu_to_be32(
508
cursor->level[p_level].hashval);
513
509
cursor->level[this_level].dirty++;
515
511
do_warn(_("would correct bad hashval in non-leaf dir "
667
662
* entry count, verify level
670
if (XFS_DA_NODE_MAGIC !=
671
INT_GET(newnode->hdr.info.magic, ARCH_CONVERT)) {
665
if (XFS_DA_NODE_MAGIC != be16_to_cpu(newnode->hdr.info.magic)) {
672
666
do_warn(_("bad magic number %x in block %u for "
673
667
"directory inode %llu\n"),
674
INT_GET(newnode->hdr.info.magic, ARCH_CONVERT),
668
be16_to_cpu(newnode->hdr.info.magic),
675
669
dabno, cursor->ino);
678
if (INT_GET(newnode->hdr.info.back, ARCH_CONVERT) !=
679
cursor->level[this_level].bno) {
672
if (be32_to_cpu(newnode->hdr.info.back) !=
673
cursor->level[this_level].bno) {
680
674
do_warn(_("bad back pointer in block %u for directory "
682
676
dabno, cursor->ino);
685
if (INT_GET(newnode->hdr.count, ARCH_CONVERT) >
686
mp->m_dir_node_ents) {
679
if (be16_to_cpu(newnode->hdr.count) > mp->m_dir_node_ents) {
687
680
do_warn(_("entry count %d too large in block %u for "
688
681
"directory inode %llu\n"),
689
INT_GET(newnode->hdr.count, ARCH_CONVERT),
682
be16_to_cpu(newnode->hdr.count),
690
683
dabno, cursor->ino);
693
if (INT_GET(newnode->hdr.level, ARCH_CONVERT) != this_level) {
686
if (be16_to_cpu(newnode->hdr.level) != this_level) {
694
687
do_warn(_("bad level %d in block %u for directory "
696
INT_GET(newnode->hdr.level, ARCH_CONVERT),
689
be16_to_cpu(newnode->hdr.level),
697
690
dabno, cursor->ino);
725
718
* ditto for block numbers
727
720
if (cursor->level[p_level].bno !=
728
INT_GET(node->btree[entry].before, ARCH_CONVERT)) {
721
be32_to_cpu(node->btree[entry].before))
732
724
* ok, now validate last hashvalue in the descendant
733
725
* block against the hashval in the current entry
735
727
if (cursor->level[p_level].hashval !=
736
INT_GET(node->btree[entry].hashval, ARCH_CONVERT)) {
728
be32_to_cpu(node->btree[entry].hashval)) {
737
729
if (!no_modify) {
738
730
do_warn(_("correcting bad hashval in interior dir "
739
731
"block\n\tin (level %d) in inode %llu.\n"),
740
732
this_level, cursor->ino);
741
INT_SET(node->btree[entry].hashval, ARCH_CONVERT,
742
cursor->level[p_level].hashval);
733
node->btree[entry].hashval = cpu_to_be32(
734
cursor->level[p_level].hashval);
743
735
cursor->level[this_level].dirty++;
745
737
do_warn(_("would correct bad hashval in interior dir "
782
774
memmove(oldsfp, newsfp, oldsize);
783
INT_SET(newsfp->hdr.count, ARCH_CONVERT,
784
INT_GET(oldsfp->hdr.count, ARCH_CONVERT));
775
newsfp->hdr.count = oldsfp->hdr.count;
785
776
newsfp->hdr.i8count = 0;
786
ino = XFS_DIR2_SF_GET_INUMBER(oldsfp, &oldsfp->hdr.parent);
787
XFS_DIR2_SF_PUT_INUMBER(newsfp, &ino, &newsfp->hdr.parent);
788
oldsfep = XFS_DIR2_SF_FIRSTENTRY(oldsfp);
789
newsfep = XFS_DIR2_SF_FIRSTENTRY(newsfp);
777
ino = xfs_dir2_sf_get_inumber(oldsfp, &oldsfp->hdr.parent);
778
xfs_dir2_sf_put_inumber(newsfp, &ino, &newsfp->hdr.parent);
779
oldsfep = xfs_dir2_sf_firstentry(oldsfp);
780
newsfep = xfs_dir2_sf_firstentry(newsfp);
790
781
while ((int)((char *)oldsfep - (char *)oldsfp) < oldsize) {
791
782
newsfep->namelen = oldsfep->namelen;
792
XFS_DIR2_SF_PUT_OFFSET(newsfep,
793
XFS_DIR2_SF_GET_OFFSET(oldsfep));
783
xfs_dir2_sf_put_offset(newsfep,
784
xfs_dir2_sf_get_offset(oldsfep));
794
785
memmove(newsfep->name, oldsfep->name, newsfep->namelen);
795
ino = XFS_DIR2_SF_GET_INUMBER(oldsfp,
796
XFS_DIR2_SF_INUMBERP(oldsfep));
797
XFS_DIR2_SF_PUT_INUMBER(newsfp, &ino,
798
XFS_DIR2_SF_INUMBERP(newsfep));
799
oldsfep = XFS_DIR2_SF_NEXTENTRY(oldsfp, oldsfep);
800
newsfep = XFS_DIR2_SF_NEXTENTRY(newsfp, newsfep);
786
ino = xfs_dir2_sf_get_inumber(oldsfp,
787
xfs_dir2_sf_inumberp(oldsfep));
788
xfs_dir2_sf_put_inumber(newsfp, &ino,
789
xfs_dir2_sf_inumberp(newsfep));
790
oldsfep = xfs_dir2_sf_nextentry(oldsfp, oldsfep);
791
newsfep = xfs_dir2_sf_nextentry(newsfp, newsfep);
802
793
*next_sfep = newsfep;
815
806
xfs_dir2_sf_entry_t *sfep;
816
807
xfs_dir2_sf_t *sfp;
818
for (i = 0, sfp = &dip->di_u.di_dir2sf,
819
sfep = XFS_DIR2_SF_FIRSTENTRY(sfp),
820
offset = XFS_DIR2_DATA_FIRST_OFFSET;
821
i < INT_GET(sfp->hdr.count, ARCH_CONVERT);
822
i++, sfep = XFS_DIR2_SF_NEXTENTRY(sfp, sfep)) {
823
XFS_DIR2_SF_PUT_OFFSET(sfep, offset);
824
offset += XFS_DIR2_DATA_ENTSIZE(sfep->namelen);
809
sfp = &dip->di_u.di_dir2sf;
810
sfep = xfs_dir2_sf_firstentry(sfp);
811
offset = XFS_DIR2_DATA_FIRST_OFFSET;
813
for (i = 0; i < sfp->hdr.count; i++) {
814
xfs_dir2_sf_put_offset(sfep, offset);
815
offset += xfs_dir2_data_entsize(sfep->namelen);
816
sfep = xfs_dir2_sf_nextentry(sfp, sfep);
879
871
* Initialize i8 based on size of parent inode number.
881
i8 = (XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent)
873
i8 = (xfs_dir2_sf_get_inumber(sfp, &sfp->hdr.parent)
882
874
> XFS_DIR2_MAX_SHORT_INUM);
885
877
* check for bad entry count
887
if (num_entries * XFS_DIR2_SF_ENTSIZE_BYNAME(sfp, 1) +
888
XFS_DIR2_SF_HDR_SIZE(0) > max_size ||
879
if (num_entries * xfs_dir2_sf_entsize_byname(sfp, 1) +
880
xfs_dir2_sf_hdr_size(0) > max_size || num_entries == 0)
890
881
num_entries = 0xFF;
893
884
* run through entries, stop at first bad entry, don't need
894
885
* to check for .. since that's encoded in its own field
896
sfep = next_sfep = XFS_DIR2_SF_FIRSTENTRY(sfp);
887
sfep = next_sfep = xfs_dir2_sf_firstentry(sfp);
898
889
i < num_entries && ino_dir_size > (char *)next_sfep - (char *)sfp;
1160
1149
next_sfep = (tmp_sfep == NULL)
1161
1150
? (xfs_dir2_sf_entry_t *) ((__psint_t) sfep
1162
1151
+ ((!bad_sfnamelen)
1163
? XFS_DIR2_SF_ENTSIZE_BYENTRY(sfp,
1152
? xfs_dir2_sf_entsize_byentry(sfp,
1165
: XFS_DIR2_SF_ENTSIZE_BYNAME(sfp,
1154
: xfs_dir2_sf_entsize_byname(sfp,
1170
1159
/* sync up sizes and entry counts */
1172
if (INT_GET(sfp->hdr.count, ARCH_CONVERT) != i) {
1161
if (sfp->hdr.count != i) {
1173
1162
if (no_modify) {
1174
1163
do_warn(_("would have corrected entry count "
1175
1164
"in directory %llu from %d to %d\n"),
1176
ino, INT_GET(sfp->hdr.count, ARCH_CONVERT), i);
1165
ino, sfp->hdr.count, i);
1178
1167
do_warn(_("corrected entry count in directory %llu, "
1179
1168
"was %d, now %d\n"),
1180
ino, INT_GET(sfp->hdr.count, ARCH_CONVERT), i);
1181
INT_SET(sfp->hdr.count, ARCH_CONVERT, i);
1169
ino, sfp->hdr.count, i);
1182
1171
*dino_dirty = 1;
1343
1329
int nm_illegal;
1347
1334
bf = d->hdr.bestfree;
1348
1335
ptr = (char *)d->u;
1349
1336
badbest = lastfree = freeseen = 0;
1350
if (INT_GET(bf[0].length, ARCH_CONVERT) == 0) {
1351
badbest |= INT_GET(bf[0].offset, ARCH_CONVERT) != 0;
1337
if (be16_to_cpu(bf[0].length) == 0) {
1338
badbest |= be16_to_cpu(bf[0].offset) != 0;
1352
1339
freeseen |= 1 << 0;
1354
if (INT_GET(bf[1].length, ARCH_CONVERT) == 0) {
1355
badbest |= INT_GET(bf[1].offset, ARCH_CONVERT) != 0;
1341
if (be16_to_cpu(bf[1].length) == 0) {
1342
badbest |= be16_to_cpu(bf[1].offset) != 0;
1356
1343
freeseen |= 1 << 1;
1358
if (INT_GET(bf[2].length, ARCH_CONVERT) == 0) {
1359
badbest |= INT_GET(bf[2].offset, ARCH_CONVERT) != 0;
1345
if (be16_to_cpu(bf[2].length) == 0) {
1346
badbest |= be16_to_cpu(bf[2].offset) != 0;
1360
1347
freeseen |= 1 << 2;
1362
badbest |= INT_GET(bf[0].length, ARCH_CONVERT) < INT_GET(bf[1].length, ARCH_CONVERT);
1363
badbest |= INT_GET(bf[1].length, ARCH_CONVERT) < INT_GET(bf[2].length, ARCH_CONVERT);
1349
badbest |= be16_to_cpu(bf[0].length) < be16_to_cpu(bf[1].length);
1350
badbest |= be16_to_cpu(bf[1].length) < be16_to_cpu(bf[2].length);
1364
1351
while (ptr < endptr) {
1365
1352
dup = (xfs_dir2_data_unused_t *)ptr;
1368
1355
* If we find it, account for that, else make sure it doesn't
1369
1356
* need to be there.
1371
if (INT_GET(dup->freetag, ARCH_CONVERT) == XFS_DIR2_DATA_FREE_TAG) {
1372
if (ptr + INT_GET(dup->length, ARCH_CONVERT) > endptr ||
1373
INT_GET(dup->length, ARCH_CONVERT) == 0 ||
1374
(INT_GET(dup->length, ARCH_CONVERT) & (XFS_DIR2_DATA_ALIGN - 1)))
1358
if (be16_to_cpu(dup->freetag) == XFS_DIR2_DATA_FREE_TAG) {
1359
if (ptr + be16_to_cpu(dup->length) > endptr ||
1360
be16_to_cpu(dup->length) == 0 ||
1361
(be16_to_cpu(dup->length) & (XFS_DIR2_DATA_ALIGN - 1)))
1376
if (INT_GET(*XFS_DIR2_DATA_UNUSED_TAG_P(dup),
1377
ARCH_CONVERT) != (char *)dup - (char *)d)
1363
if (be16_to_cpu(*xfs_dir2_data_unused_tag_p(dup)) !=
1364
(char *)dup - (char *)d)
1379
1366
badbest |= lastfree != 0;
1380
1367
dfp = xfs_dir2_data_freefind(d, dup);
1383
1370
badbest |= (freeseen & (1 << i)) != 0;
1384
1371
freeseen |= 1 << i;
1386
badbest |= INT_GET(dup->length, ARCH_CONVERT) >
1387
INT_GET(bf[2].length, ARCH_CONVERT);
1388
ptr += INT_GET(dup->length, ARCH_CONVERT);
1373
badbest |= be16_to_cpu(dup->length) >
1374
be16_to_cpu(bf[2].length);
1375
ptr += be16_to_cpu(dup->length);
1392
1379
dep = (xfs_dir2_data_entry_t *)ptr;
1393
if (ptr + XFS_DIR2_DATA_ENTSIZE(dep->namelen) > endptr)
1395
if (INT_GET(*XFS_DIR2_DATA_ENTRY_TAG_P(dep), ARCH_CONVERT) !=
1396
(char *)dep - (char *)d)
1398
ptr += XFS_DIR2_DATA_ENTSIZE(dep->namelen);
1380
if (ptr + xfs_dir2_data_entsize(dep->namelen) > endptr)
1382
if (be16_to_cpu(*xfs_dir2_data_entry_tag_p(dep)) !=
1383
(char *)dep - (char *)d)
1385
ptr += xfs_dir2_data_entsize(dep->namelen);
1418
1405
while (ptr < endptr) {
1419
1406
dup = (xfs_dir2_data_unused_t *)ptr;
1420
if (INT_GET(dup->freetag, ARCH_CONVERT) ==
1421
XFS_DIR2_DATA_FREE_TAG) {
1422
ptr += INT_GET(dup->length, ARCH_CONVERT);
1407
if (be16_to_cpu(dup->freetag) == XFS_DIR2_DATA_FREE_TAG) {
1408
ptr += be16_to_cpu(dup->length);
1425
1411
dep = (xfs_dir2_data_entry_t *)ptr;
1412
ent_ino = be64_to_cpu(dep->inumber);
1427
1416
* We may have to blow out an entry because of bad inode
1428
1417
* numbers. Do NOT touch the name until after we've computed
1429
1418
* the hashvalue and done a namecheck() on the name.
1420
* Conditions must either set clearino to zero or set
1421
* clearreason why it's being cleared.
1431
if (!ino_discovery &&
1432
INT_GET(dep->inumber, ARCH_CONVERT) == BADFSINO) {
1423
if (!ino_discovery && ent_ino == BADFSINO) {
1434
1425
* Don't do a damned thing. We already found this
1435
1426
* (or did it ourselves) during phase 3.
1438
} else if (verify_inum(mp, INT_GET(dep->inumber, ARCH_CONVERT))) {
1429
} else if (verify_inum(mp, ent_ino)) {
1440
1431
* Bad inode number. Clear the inode number and the
1441
1432
* entry will get removed later. We don't trash the
1442
1433
* directory since it's still structurally intact.
1445
1435
clearreason = _("invalid");
1446
} else if (INT_GET(dep->inumber, ARCH_CONVERT) == mp->m_sb.sb_rbmino) {
1436
} else if (ent_ino == mp->m_sb.sb_rbmino) {
1448
1437
clearreason = _("realtime bitmap");
1449
} else if (INT_GET(dep->inumber, ARCH_CONVERT) == mp->m_sb.sb_rsumino) {
1438
} else if (ent_ino == mp->m_sb.sb_rsumino) {
1451
1439
clearreason = _("realtime summary");
1452
} else if (INT_GET(dep->inumber, ARCH_CONVERT) == mp->m_sb.sb_uquotino) {
1440
} else if (ent_ino == mp->m_sb.sb_uquotino) {
1454
1441
clearreason = _("user quota");
1455
} else if (INT_GET(dep->inumber, ARCH_CONVERT) == mp->m_sb.sb_gquotino) {
1442
} else if (ent_ino == mp->m_sb.sb_gquotino) {
1457
1443
clearreason = _("group quota");
1458
} else if ((irec_p = find_inode_rec(
1459
XFS_INO_TO_AGNO(mp, INT_GET(dep->inumber,
1461
XFS_INO_TO_AGINO(mp, INT_GET(dep->inumber,
1462
ARCH_CONVERT)))) != NULL) {
1464
* Inode recs should have only confirmed inodes in them.
1466
ino_off = XFS_INO_TO_AGINO(mp, INT_GET(dep->inumber,
1467
ARCH_CONVERT)) - irec_p->ino_startnum;
1468
ASSERT(is_inode_confirmed(irec_p, ino_off));
1470
* If inode is marked free and we're in inode discovery
1471
* mode, leave the entry alone for now. If the inode
1472
* turns out to be used, we'll figure that out when we
1473
* scan it. If the inode really is free, we'll hit this
1474
* code again in phase 4 after we've finished inode
1475
* discovery and blow out the entry then.
1477
if (!ino_discovery && is_inode_free(irec_p, ino_off)) {
1479
clearreason = _("free");
1482
} else if (ino_discovery) {
1483
add_inode_uncertain(mp, INT_GET(dep->inumber, ARCH_CONVERT), 0);
1487
clearreason = _("non-existent");
1445
irec_p = find_inode_rec(XFS_INO_TO_AGNO(mp, ent_ino),
1446
XFS_INO_TO_AGINO(mp, ent_ino));
1447
if (irec_p == NULL) {
1448
if (ino_discovery) {
1449
add_inode_uncertain(mp, ent_ino, 0);
1452
clearreason = _("non-existent");
1455
* Inode recs should have only confirmed
1458
ino_off = XFS_INO_TO_AGINO(mp, ent_ino)
1459
- irec_p->ino_startnum;
1460
ASSERT(is_inode_confirmed(irec_p, ino_off));
1462
* If inode is marked free and we're in inode
1463
* discovery mode, leave the entry alone for
1464
* now. If the inode turns out to be used,
1465
* we'll figure that out when we scan it.
1466
* If the inode really is free, we'll hit this
1467
* code again in phase 4 after we've finished
1468
* inode discovery and blow out the entry then.
1470
if (!ino_discovery && is_inode_free(irec_p,
1472
clearreason = _("free");
1477
ASSERT((clearino == 0 && clearreason == NULL) ||
1478
(clearino != 0 && clearreason != NULL));
1490
1480
do_warn(_("entry \"%*.*s\" at block %u offset %d in "
1491
1481
"directory inode %llu references %s inode "
1493
1483
dep->namelen, dep->namelen, dep->name,
1494
1484
da_bno, (char *)ptr - (char *)d, ino,
1496
INT_GET(dep->inumber, ARCH_CONVERT));
1485
clearreason, ent_ino);
1498
1487
* If the name length is 0 (illegal) make it 1 and blast
1761
for (i = stale = 0; i < INT_GET(leaf->hdr.count, ARCH_CONVERT); i++) {
1748
for (i = stale = 0; i < be16_to_cpu(leaf->hdr.count); i++) {
1762
1749
if ((char *)&leaf->ents[i] >= (char *)leaf + mp->m_dirblksize) {
1763
1750
do_warn(_("bad entry count in block %u of directory "
1764
1751
"inode %llu\n"),
1768
if (INT_GET(leaf->ents[i].address, ARCH_CONVERT) ==
1769
XFS_DIR2_NULL_DATAPTR)
1755
if (be32_to_cpu(leaf->ents[i].address) == XFS_DIR2_NULL_DATAPTR)
1771
else if (INT_GET(leaf->ents[i].hashval, ARCH_CONVERT) <
1757
else if (be32_to_cpu(leaf->ents[i].hashval) < last_hashval) {
1773
1758
do_warn(_("bad hash ordering in block %u of directory "
1774
1759
"inode %llu\n"),
1778
1763
*next_hashval = last_hashval =
1779
INT_GET(leaf->ents[i].hashval, ARCH_CONVERT);
1764
be32_to_cpu(leaf->ents[i].hashval);
1781
if (stale != INT_GET(leaf->hdr.stale, ARCH_CONVERT)) {
1766
if (stale != be16_to_cpu(leaf->hdr.stale)) {
1782
1767
do_warn(_("bad stale count in block %u of directory "
1783
1768
"inode %llu\n"),
2025
2010
data = bp->data;
2026
if (INT_GET(data->hdr.magic, ARCH_CONVERT) !=
2027
XFS_DIR2_DATA_MAGIC)
2011
if (be32_to_cpu(data->hdr.magic) != XFS_DIR2_DATA_MAGIC)
2028
2012
do_warn(_("bad directory block magic # %#x in block "
2029
2013
"%llu for directory inode %llu\n"),
2030
INT_GET(data->hdr.magic, ARCH_CONVERT),
2014
be32_to_cpu(data->hdr.magic), dbno, ino);
2032
2015
i = process_dir2_data(mp, ino, dip, ino_discovery, dirname,
2033
2016
parent, bp, dot, dotdot, (xfs_dablk_t)dbno,
2034
2017
(char *)data + mp->m_dirblksize);
2088
2071
last = blkmap_last_off(blkmap);
2089
if (INT_GET(dip->di_core.di_size, ARCH_CONVERT) <=
2090
XFS_DFORK_DSIZE(dip, mp) &&
2091
dip->di_core.di_format == XFS_DINODE_FMT_LOCAL) {
2072
if (be64_to_cpu(dip->di_core.di_size) <= XFS_DFORK_DSIZE(dip, mp) &&
2073
dip->di_core.di_format == XFS_DINODE_FMT_LOCAL) {
2092
2074
dot = dotdot = 1;
2093
2075
res = process_sf_dir2(mp, ino, dip, ino_discovery, dino_dirty,
2094
2076
dirname, parent, &repair);
2095
2077
} else if (last == mp->m_dirblkfsbs &&
2096
(dip->di_core.di_format == XFS_DINODE_FMT_EXTENTS ||
2097
dip->di_core.di_format == XFS_DINODE_FMT_BTREE)) {
2078
(dip->di_core.di_format == XFS_DINODE_FMT_EXTENTS ||
2079
dip->di_core.di_format == XFS_DINODE_FMT_BTREE)) {
2098
2080
res = process_block_dir2(mp, ino, dip, ino_discovery,
2099
2081
dino_dirty, dirname, parent, blkmap, &dot, &dotdot,
2101
2083
} else if (last >= mp->m_dirleafblk + mp->m_dirblkfsbs &&
2102
(dip->di_core.di_format == XFS_DINODE_FMT_EXTENTS ||
2103
dip->di_core.di_format == XFS_DINODE_FMT_BTREE)) {
2084
(dip->di_core.di_format == XFS_DINODE_FMT_EXTENTS ||
2085
dip->di_core.di_format == XFS_DINODE_FMT_BTREE)) {
2104
2086
res = process_leaf_node_dir2(mp, ino, dip, ino_discovery,
2105
2087
dirname, parent, blkmap, &dot, &dotdot, &repair,
2106
2088
last > mp->m_dirleafblk + mp->m_dirblkfsbs);