Changeset 775 for Whitix/branches
- Timestamp:
- 07/10/08 00:14:48 (5 months ago)
- Location:
- Whitix/branches/fs/fs/journal
- Files:
-
- 3 modified
-
commit.c (modified) (4 diffs)
-
journals.c (modified) (1 diff)
-
transaction.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/fs/fs/journal/commit.c
r763 r775 52 52 } 53 53 54 int JournalCommitMetadata(struct Journal* journal)54 struct JournalHead* JournalCommitMetadata(struct Journal* journal, struct JournalTrans* commitTrans) 55 55 { 56 #if 0 57 ListForEachEntry(head, &commitTrans->metaDataList, next) 56 struct JournalHead* curr, *newHead; 57 struct JournalHead* descriptor=NULL; /* On-disk structure. */ 58 struct JournalHeader* dHeader; 59 struct Buffer* buffers[64]; 60 int bufIndex=0; 61 int firstTag=0; 62 struct JournalBlockTag* tag; 63 char* tagPointer=NULL; 64 int spaceLeft=-1; 65 DWORD blockNo; 66 67 ListForEachEntry(curr, &commitTrans->metaDataList, next) 58 68 { 59 69 if (!descriptor) … … 69 79 dHeader->blockType=CpuToBe32(JFS_DESC_BLOCK); 70 80 dHeader->sequence=CpuToBe32(commitTrans->transId); 81 82 tagPointer=&buffer->data[sizeof(struct JournalHeader)]; 83 spaceLeft=journal->sectorSize-sizeof(struct JournalHeader); 84 firstTag=1; 85 86 buffers[bufIndex++]=buffer; 87 88 JournalFileBuffer(descriptor, commitTrans, JOURN_LOGCTL); 71 89 } 90 91 JournalNextLogBlock(journal, &blockNo); 92 93 JournalWriteMetadataBuffer(commitTrans, curr, &newHead, blockNo); 94 72 95 } 73 #endif 96 97 return descriptor; 74 98 } 75 99 … … 79 103 { 80 104 struct JournalTrans* commitTrans; 81 struct JournalHead* head;82 struct JournalHead* descriptor=NULL; /* On-disk structure. */83 struct JournalHeader* dHeader;84 105 85 106 JournalLock(journal); … … 105 126 106 127 /* Write out metadata to the journal. */ 107 JournalCommitMetadata(journal );128 JournalCommitMetadata(journal, commitTrans); 108 129 109 130 JournalUnlock(journal); -
Whitix/branches/fs/fs/journal/journals.c
r759 r775 120 120 } 121 121 122 int JournalWriteMetadataBuffer(struct JournalTrans* commmitTrans, struct JournalHead* old, 123 struct JournalHead* new, DWORD blockNo) 124 { 125 KePrint("JournalWriteMetadataBuffer\n"); 126 127 return 0; 128 } 129 122 130 int JournalNextLogBlock(struct Journal* journal, DWORD* ret) 123 131 { -
Whitix/branches/fs/fs/journal/transaction.c
r759 r775 57 57 INIT_LIST_HEAD(&ret->reservedList); 58 58 INIT_LIST_HEAD(&ret->metaDataList); 59 INIT_LIST_HEAD(&ret->logControlList); 59 60 60 61 /* TODO: Set up timer. */ … … 212 213 break; 213 214 215 case JOURN_LOGCTL: 216 list=&trans->logControlList; 217 break; 218 214 219 default: 215 220 KePrint("FileBuffer: handle %d!\n", type);