Thank you so much to everyone....
Carlo, i'm trying to understand how
ext3 works before try to modify source code...
Thanks
Davide
----
Messaggio originale----
Da: ca...@alinoe.com
Data: 11-mag-2008 18.59
A:
<ext3grep@googlegroups.com>
Ogg: [ext3grep] Re: s_journal_dev == 0
On
Sun, May 11, 2008 at 10:10:36AM -0400, Theodore Tso wrote:
> In any
case, if ext3grep doesn't want to support external journals, it
> can
ignore s_journal_dev and s_journal_uuid. The only field it needs
> to
pay attention to is s_journal_inum, and to have it give a message
> of
recorded sorrow ("very sorry, we don't support external journals")
> if
s_journal_inum is zero.
Thanks... I went ahead and wrote a minimal
patch to use s_journal_inum
instead of s_journal_dev in order to
correct this error of me.
It is already committed to SVN (rev 95)
Index: ext3grep.cc
===================================================================
---
ext3grep.cc (revision 94)
+++ ext3grep.cc (working copy)
@@ -1377,7
+1377,7 @@
feature_incompat_filetype = super_block.
s_feature_incompat & EXT3_FEATURE_INCOMPAT_FILETYPE;
// Do we have
a journal?
- if (super_block.s_journal_dev == 0)
+ if (super_block.
s_journal_inum != 0)
{
InodePointer journal_inode = get_inode
(super_block.s_journal_inum);
int first_block = journal_inode-
>block()[0];
@@ -1401,10 +1401,10 @@
}
// Check commandline
options against superblock contents.
- if (commandline_journal &&
super_block.s_journal_dev)
+ if (commandline_journal && !super_block.
s_journal_inum)
{
std::cout << std::flush;
- std::cerr <<
progname << ": --journal: The journal appears to be external." << std::
endl;
+ std::cerr << progname << ": --journal: The journal is on an
external device. Please add support for it." << std::endl;
exit
(EXIT_FAILURE);
}
if (commandline_inode != -1)
@@ -4219,7 +4219,7
@@
static bool is_journal(int blocknr)
{
- if (super_block.
s_journal_dev)
+ if (!super_block.s_journal_inum)
{
ASSERT(!
commandline_journal);
return false;
--
Carlo Wood <carlo@alinoe.
com>
--~--~---------~--~----~------------~-------~--~----~
To post to
this group, send email to ext3grep@googlegroups.com
To unsubscribe from
this group, send email to ext3grep-unsubscribe@googlegroups.com
For
more options, visit this group at http://groups.google.
com/group/ext3grep?hl=en
-~----------~----~----~----~------~----~------
~--~---