Lines Matching refs:lb
445 static void finish_range(struct list_blocks_struct *lb)
447 if (lb->first_block == 0)
449 if (lb->first)
450 lb->first = 0;
452 fprintf(lb->f, ", ");
453 if (lb->first_block == lb->last_block)
454 fprintf(lb->f, "(%lld):%llu",
455 (long long)lb->first_bcnt, lb->first_block);
457 fprintf(lb->f, "(%lld-%lld):%llu-%llu",
458 (long long)lb->first_bcnt, (long long)lb->last_bcnt,
459 lb->first_block, lb->last_block);
460 lb->first_block = 0;
469 struct list_blocks_struct *lb = (struct list_blocks_struct *) private;
471 lb->total++;
476 if (lb->first_block &&
477 (lb->last_block+1 == *blocknr) &&
478 (lb->last_bcnt+1 == blockcnt)) {
479 lb->last_block = *blocknr;
480 lb->last_bcnt = blockcnt;
486 finish_range(lb);
487 lb->first_block = lb->last_block = *blocknr;
488 lb->first_bcnt = lb->last_bcnt = blockcnt;
494 finish_range(lb);
495 if (lb->first)
496 lb->first = 0;
498 fprintf(lb->f, ", ");
500 fprintf(lb->f, "(IND):%llu", (unsigned long long) *blocknr);
502 fprintf(lb->f, "(DIND):%llu", (unsigned long long) *blocknr);
504 fprintf(lb->f, "(TIND):%llu", (unsigned long long) *blocknr);
578 struct list_blocks_struct lb;
581 lb.total = 0;
582 lb.first_block = 0;
583 lb.f = f;
584 lb.first = 1;
586 list_blocks_proc, (void *)&lb);
587 finish_range(&lb);
588 if (lb.total)
589 fprintf(f, "\n%sTOTAL: %lld\n", prefix, (long long)lb.total);