mirror of
https://github.com/bobranten/Ext4Fsd.git
synced 2025-10-29 21:18:30 -05:00
improved the printing of error messages
This commit is contained in:
@@ -105,8 +105,6 @@ Ext2RecoverJournal(
|
||||
journal_t * journal = NULL;
|
||||
struct ext3_super_block *esb;
|
||||
|
||||
DbgPrint("Ext2RecoverJournal begin\n");
|
||||
|
||||
ExAcquireResourceExclusiveLite(&Vcb->MainResource, TRUE);
|
||||
|
||||
/* check journal inode number */
|
||||
@@ -130,7 +128,7 @@ Ext2RecoverJournal(
|
||||
|
||||
/* initialzation succeeds ? */
|
||||
if (!journal) {
|
||||
DbgPrint("jbd2_journal_init_inode failed\n");
|
||||
DEBUG(DL_ERR, ( "jbd2_journal_init_inode failed\n"));
|
||||
iput(ji);
|
||||
rc = -8;
|
||||
goto errorout;
|
||||
@@ -141,8 +139,8 @@ Ext2RecoverJournal(
|
||||
rc = jbd2_journal_load(journal);
|
||||
|
||||
if (0 != rc) {
|
||||
DbgPrint("Ext2Fsd: recover_journal: failed "
|
||||
"to recover journal data. rc=%d\n", rc);
|
||||
DEBUG(DL_ERR, ( "Ext2Fsd: recover_journal: failed "
|
||||
"to recover journal data. rc=%d\n", rc));
|
||||
rc = -9;
|
||||
//goto errorout;
|
||||
}
|
||||
@@ -180,7 +178,5 @@ errorout:
|
||||
|
||||
ExReleaseResourceLite(&Vcb->MainResource);
|
||||
|
||||
DbgPrint("Ext2RecoverJournal end\n");
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ int ext4_inode_csum_verify(struct inode *inode, struct ext4_inode *raw,
|
||||
calculated &= 0xFFFF;
|
||||
|
||||
if (provided != calculated)
|
||||
DbgPrint("checksum verify failed on inode %u: %lx != %lx\n", inode->i_ino, provided, calculated);
|
||||
DEBUG(DL_ERR, ( "checksum verify failed on inode %u: %lx != %lx\n", inode->i_ino, provided, calculated));
|
||||
|
||||
return provided == calculated;
|
||||
}
|
||||
@@ -437,7 +437,6 @@ void ext4_inode_csum_set(struct inode *inode, struct ext4_inode *raw,
|
||||
if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE &&
|
||||
offsetof(struct ext4_inode, i_checksum_hi) + sizeof(raw->i_checksum_hi) <= EXT4_GOOD_OLD_INODE_SIZE + raw->i_extra_isize)
|
||||
raw->i_checksum_hi = cpu_to_le16(csum >> 16);
|
||||
//DbgPrint("set checksum on inode %u: csum == %lx\n", inode->i_ino, csum);
|
||||
ext4_inode_csum_verify(inode, raw, unused);
|
||||
}
|
||||
|
||||
@@ -547,7 +546,7 @@ int ext4_dirent_csum_verify(struct inode *inode, struct ext4_dir_entry *dirent)
|
||||
|
||||
t = get_dirent_tail(inode, dirent);
|
||||
if (!t) {
|
||||
DbgPrint("No space for directory leaf checksum. Please run e2fsck -D.\n");
|
||||
DEBUG(DL_ERR, ( "No space for directory leaf checksum. Please run e2fsck -D.\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -568,7 +567,7 @@ void ext4_dirent_csum_set(struct inode *inode,
|
||||
|
||||
t = get_dirent_tail(inode, dirent);
|
||||
if (!t) {
|
||||
DbgPrint("No space for directory leaf checksum. Please run e2fsck -D.\n");
|
||||
DEBUG(DL_ERR, ( "No space for directory leaf checksum. Please run e2fsck -D.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -633,14 +632,14 @@ int ext4_dx_csum_verify(struct inode *inode,
|
||||
|
||||
c = get_dx_countlimit(inode, dirent, &count_offset);
|
||||
if (!c) {
|
||||
DbgPrint("dir seems corrupt? Run e2fsck -D.");
|
||||
DEBUG(DL_ERR, ( "dir seems corrupt? Run e2fsck -D."));
|
||||
return 0;
|
||||
}
|
||||
limit = le16_to_cpu(c->limit);
|
||||
count = le16_to_cpu(c->count);
|
||||
if (count_offset + (limit * sizeof(struct dx_entry)) >
|
||||
EXT4_BLOCK_SIZE(inode->i_sb) - sizeof(struct dx_tail)) {
|
||||
DbgPrint("warn_no_space_for_csum in inode\n");
|
||||
DEBUG(DL_ERR, ( "warn_no_space_for_csum in inode\n"));
|
||||
return 0;
|
||||
}
|
||||
t = (struct dx_tail *)(((struct dx_entry *)c) + limit);
|
||||
@@ -659,14 +658,14 @@ void ext4_dx_csum_set(struct inode *inode, struct ext4_dir_entry *dirent)
|
||||
|
||||
c = get_dx_countlimit(inode, dirent, &count_offset);
|
||||
if (!c) {
|
||||
DbgPrint("dir seems corrupt? Run e2fsck -D.");
|
||||
DEBUG(DL_ERR, ( "dir seems corrupt? Run e2fsck -D."));
|
||||
return;
|
||||
}
|
||||
limit = le16_to_cpu(c->limit);
|
||||
count = le16_to_cpu(c->count);
|
||||
if (count_offset + (limit * sizeof(struct dx_entry)) >
|
||||
EXT4_BLOCK_SIZE(inode->i_sb) - sizeof(struct dx_tail)) {
|
||||
DbgPrint("warn_no_space_for_csum in inode\n");
|
||||
DEBUG(DL_ERR, ( "warn_no_space_for_csum in inode\n"));
|
||||
return;
|
||||
}
|
||||
t = (struct dx_tail *)(((struct dx_entry *)c) + limit);
|
||||
|
||||
@@ -2225,7 +2225,7 @@ Ext2MountVolume (IN PEXT2_IRP_CONTEXT IrpContext)
|
||||
}
|
||||
|
||||
if (!ext4_superblock_csum_verify(&Vcb->sb, Ext2Sb)) {
|
||||
DbgPrint("Found ext4 filesystem with invalid superblock checksum. Run e2fsck?\n");
|
||||
DEBUG(DL_ERR, ( "Found ext4 filesystem with invalid superblock checksum. Run e2fsck?\n"));
|
||||
}
|
||||
|
||||
SetLongFlag(Vcb->Flags, VCB_MOUNTED);
|
||||
|
||||
1674
Ext4Fsd/init.c
1674
Ext4Fsd/init.c
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@ About
|
||||
still install the oficial release and then copy this driver over the old in \windows\system32\drivers.
|
||||
The current status of the development is that all metadata checksums is implemented and jbd2 is
|
||||
ported to support 64-bit blocknumbers.
|
||||
The driver is now ready to be tested!
|
||||
This work is dedicated to my mother Berit Ingegerd Branten.
|
||||
Bo Branten <bosse@acc.umu.se>
|
||||
|
||||
@@ -35,6 +36,9 @@ Active Developers
|
||||
|
||||
KaHo Ng : http://github.com/ngkaho1234
|
||||
|
||||
Bo Branten : http://github.com/bobranten
|
||||
http://www.acc.umu.se/~bosse
|
||||
|
||||
|
||||
Supported Features by Ext3Fsd
|
||||
-----------------------------
|
||||
|
||||
Reference in New Issue
Block a user