Changeset 801

Show
Ignore:
Timestamp:
07/14/08 20:34:15 (3 months ago)
Author:
mwhitworth
Message:

Add comments mostly.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/fs/fs/journal/commit.c

    r788 r801  
    4545                WakeUp(&journal->commitWait); 
    4646                WaitAddToQueue(&journal->commitWaitDone, &waitEntry); 
    47                 KePrint("%d %d\n", id, journal->commitSequence); 
    4847                ThrSuspendThread(currThread); 
    4948                ThrSchedule(); 
     
    132131                        int i; 
    133132                         
    134                         KePrint("Submitting %d buffers\n", bufIndex); 
     133//                      KePrint("Submitting %d buffers\n", bufIndex); 
    135134                        tag->flags|=CpuToBe32(JOURN_FLAG_LAST_TAG); 
    136135                         
     
    160159                struct Buffer* buffer; 
    161160                 
     161                /* Wait for the I/O to complete and free the header. */ 
    162162                buffer=JournHeadToBuffer(curr); 
    163163                WaitForBuffer(buffer); 
    164164                JournalUnfileBuffer(curr); 
     165                JournalRemoveHeader(curr); 
    165166                 
    166167                /* Get the corresponding shadow buffer, and file that to a checkpoint list. */ 
    167168                shadow2=ListEntry(shadow->next.next, struct JournalHead, next); 
    168                 KePrint("Filing %u\n", JournHeadToBuffer(shadow)->blockNum);             
     169                         
     170//              KePrint("Filing %u\n", JournHeadToBuffer(shadow)->blockNum); 
    169171                JournalFileBuffer(shadow, commitTrans, JOURN_FORGET); 
    170172                WakeUp(&shadow->wait); 
     
    205207        struct JournalTrans* commitTrans; 
    206208 
    207         JournalLock(journal); 
     209        JournalLock(journal); /* The journal is unlocked in WriteCommitRecord. */ 
    208210 
    209211        commitTrans=journal->currTransaction; 
     
    211213        KePrint(KERN_DEBUG "Committing %d, %d\n", commitTrans->transId, commitTrans->updates); 
    212214         
    213         commitTrans->state=JTRANS_COMMIT; 
     215        commitTrans->state=JTRANS_LOCKED; 
    214216 
    215217        while (commitTrans->updates) 
     
    242244         
    243245        /* Make sure the descriptor records are written to disk */ 
    244  
    245246        ListAddTail(&commitTrans->next, &journal->checkpointTrans); 
    246247