Changeset 801
- Timestamp:
- 07/14/08 20:34:15 (3 months ago)
- Files:
-
- 1 modified
-
Whitix/branches/fs/fs/journal/commit.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/fs/fs/journal/commit.c
r788 r801 45 45 WakeUp(&journal->commitWait); 46 46 WaitAddToQueue(&journal->commitWaitDone, &waitEntry); 47 KePrint("%d %d\n", id, journal->commitSequence);48 47 ThrSuspendThread(currThread); 49 48 ThrSchedule(); … … 132 131 int i; 133 132 134 KePrint("Submitting %d buffers\n", bufIndex);133 // KePrint("Submitting %d buffers\n", bufIndex); 135 134 tag->flags|=CpuToBe32(JOURN_FLAG_LAST_TAG); 136 135 … … 160 159 struct Buffer* buffer; 161 160 161 /* Wait for the I/O to complete and free the header. */ 162 162 buffer=JournHeadToBuffer(curr); 163 163 WaitForBuffer(buffer); 164 164 JournalUnfileBuffer(curr); 165 JournalRemoveHeader(curr); 165 166 166 167 /* Get the corresponding shadow buffer, and file that to a checkpoint list. */ 167 168 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); 169 171 JournalFileBuffer(shadow, commitTrans, JOURN_FORGET); 170 172 WakeUp(&shadow->wait); … … 205 207 struct JournalTrans* commitTrans; 206 208 207 JournalLock(journal); 209 JournalLock(journal); /* The journal is unlocked in WriteCommitRecord. */ 208 210 209 211 commitTrans=journal->currTransaction; … … 211 213 KePrint(KERN_DEBUG "Committing %d, %d\n", commitTrans->transId, commitTrans->updates); 212 214 213 commitTrans->state=JTRANS_ COMMIT;215 commitTrans->state=JTRANS_LOCKED; 214 216 215 217 while (commitTrans->updates) … … 242 244 243 245 /* Make sure the descriptor records are written to disk */ 244 245 246 ListAddTail(&commitTrans->next, &journal->checkpointTrans); 246 247
