~ubuntu-branches/ubuntu/edgy/xfsprogs/edgy

« back to all changes in this revision

Viewing changes to repair/README

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2004-07-28 21:11:38 UTC
  • Revision ID: james.westby@ubuntu.com-20040728211138-0v4pdnunnp7na5lm
Tags: 2.6.20-1
* New upstream release.
* Fix xfs_io segfault on non-XFS files.  (closes: #260470)
* Fix packaging botch, deleted files included.  (closes: #260491)

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
                zeroed but they should be in a legal state
71
71
                (see xfs_quota.h).
72
72
 
73
 
D -             if the quota flags are non-zero, the corresponding
 
73
D -             if the quota flags are non-zero, the corresponding
74
74
                quota inodes must exist.
75
75
 
76
76
                quota inodes are never deleted, only their space
168
168
 
169
169
D - 0) do set/get_inode_parent functions in incore_ino.c.
170
170
        also do is/set/ inode_processed.
171
 
        
 
171
 
172
172
D - 0) do a versions.c to extract feature info and set global vars
173
173
        from the superblock version number and possibly feature bits
174
174
 
326
326
 
327
327
XXX     if in no_modify mode, check for blocks claimed by one freespace
328
328
        btree and not the other
329
 
        
 
329
 
330
330
Phase 3 -- traverse inodes to make the inodes, bmaps and freespace maps
331
331
                consistent.  For each ag, use either the incore inode map or
332
332
                scan the ag for inodes.
335
335
                when we traverse the directory heirarchy.  If we lose both,
336
336
                we could scan the disk.  Ugh.  Maybe make that a command-line
337
337
                option that we support later.
338
 
                
 
338
 
339
339
        ASSUMPTION: we know if the ag allocation btrees are intact (phase 2)
340
340
 
341
341
        First - Walk and clear the ag unlinked lists.  We'll process
347
347
                above and get them into the inode tree if they're good.
348
348
                The incore inode cluster tree *always* has good
349
349
                clusters (alignment, etc.) in it.
350
 
                
 
350
 
351
351
        Third, make sure that the root inode is known.  If not,
352
352
                and we know the inode number from the superblock,
353
353
                discover that inode and it's chunk.
398
398
                        current inode as allocated in the incore freespace
399
399
                        bitmap.
400
400
 
401
 
                - If inode is good and a directory, scan through it to
 
401
                - If inode is good and a directory, scan through it to
402
402
                        find leaf entries and discover any unknown inodes.
403
 
                        
 
403
 
404
404
                        For shortform, we correct what we can.
405
405
 
406
406
                        If the directory is corrupt, we try and fix it in
431
431
                        in use, we'll mark in use then.  If not, we'll
432
432
                        clear it and mark the inode map.  then in phase
433
433
                        4, you can depend on the inode map.
434
 
        
 
434
 
435
435
                        Entries that point to non-existent or free
436
436
                        inodes, and extra blocks in the directory
437
437
                        will get fixed in place in a later pass.
464
464
 
465
465
        Directories are semi-clean.  All '.' entries are good.
466
466
        Root '..' entry is good if root inode exists.  All entries
467
 
        referencing non-existent inodes, free inodes, etc. 
 
467
        referencing non-existent inodes, free inodes, etc.
468
468
 
469
469
XXX     verify that either quota inode is 0 or NULLFSINO or
470
470
        if sb quota flag is non zero, verify that quota inode
518
518
        Clear the quota inodes if the inode btree says that
519
519
        they're not in use.  The space freed will get picked
520
520
        up by phase 5.
521
 
        
 
521
 
522
522
XXX     Clear the quota inodes if the filesystem is being downgraded.
523
523
 
524
524
- Phase 5 - Build inode allocation trees, freespace trees and
528
528
        For each ag: (if no in no_modify mode)
529
529
 
530
530
        scan bitmap first to figure out number of extents.
531
 
        
 
531
 
532
532
        calculate space required for all trees.  Start with inode trees.
533
533
        Setup the btree cursor which includes the list of preallocated
534
534
        blocks.  As a by-product, this will delete the extents required
535
535
        for the inode tree from the incore extent tree.
536
 
        
 
536
 
537
537
        Calculate how many extents will be required to represent the
538
538
        remaining free extent tree on disk (twice, one for bybno and
539
539
        one for bycnt).  You have to iterate on this because consuming
549
549
        there in phase2 and phase3.  But if we cleared any inodes
550
550
        with space during phases 3 or 4, now is the time to complain.
551
551
 
552
 
XXX -   Free duplicate extent lists. ???
 
552
XXX -   Free duplicate extent lists. ???
553
553
 
554
554
Assumptions:  at this point, sim code having to do with inode
555
555
                creation/modification/deletion and space allocation
562
562
 
563
563
        Free the bitmap, the freespace tree.
564
564
 
565
 
        Flash the incore inode tree over from parent list to having
 
565
        Flash the incore inode tree over from parent list to having
566
566
        full backpointers.
567
567
 
568
568
        realtime processing, if any --
572
572
                Generate the realtime bitmap from the incore realtime
573
573
                extent map and slam the info into the realtime bitmap
574
574
                inode.  Generate summary info from the realtime extent map.
575
 
                
 
575
 
576
576
XXX             if in no_modify mode, compare contents of realtime bitmap
577
577
                inode to the incore realtime extent map.  generate the
578
578
                summary info from the incore realtime extent map.
614
614
        If no realtime inodes, make them and if necessary, slam the
615
615
                summary info into the realtime summary
616
616
                inode.  Ditto with the realtime bitmap inode.
617
 
        
 
617
 
618
618
        Make orphanage (lost+found ???).
619
619
 
620
620
        Traverse each directory from '/' (unless it was created).
715
715
I don't see how phase 6 can be run in parallel though.
716
716
 
717
717
And running Phase 8 in parallel is just silly.
718