Goswin von Brederlow wrote:
> Nathanael Nerode <[EMAIL PROTECTED]> writes:
> 
> 
>>Package: defrag
>>Version: 0.73pjm1-7
>>Severity: important
>>
>>So, e2defrag thinks I have an ext3 filesystem when it's ext2.
>>
>>doctormoo:/home/neroden# e2defrag /dev/hda7
>>
>>e2defrag (/dev/hda7): ext3 filesystems not (yet) supported
>>doctormoo:/home/neroden# dumpe2fs /dev/hda7
>>Filesystem volume name:   <none>
>>Last mounted on:          <not available>
>>Filesystem UUID:          effbe1b8-36fc-4c3d-b8d0-710ff1fb95d6
>>Filesystem magic number:  0xEF53
>>Filesystem revision #:    1 (dynamic)
>>Filesystem features:      dir_index filetype sparse_super
>>Default mount options:    (none)
>>Filesystem state:         clean
>>....
>>
>>This renders it kind of unusable.
>>
>>What's going on here?
> 
> 
> I haven't checked the code but my guess is the dir_index flag causes
> this. If I'm right the error message should be rephrased but the
> failure is valid.
I think you're right about the source of the error.  After turning off
dir_index, it works.  Looking at the code, there's supposed to be a
separate error message for that sort of thing; it's supposed to die with
"filesystem has unsupported features".

*However*, it's also indicated that it shouldn't actually have any
trouble with dir_index, or any other ext2 "compat" feature; these are
the features which the kernel will happily read *and write* if it
doesn't understand them, so it's probably fine for defrag (a program
with massive warnings attached) to do the same.

In addition, the failure is caused by an accidentally defective
Debian-specific patch, and is not present upstream!
debian/patches/ext3-notwork.dpatch contains a completely wrong patch.

+    /*
+     * Added by Timshel Knoll <[EMAIL PROTECTED]>, 27/10/02
+     * e2defrag doesn't support ext3 journals (yet)
+     */
+    if(Super.s_feature_compat & ~EXT3_FEATURE_COMPAT_HAS_JOURNAL)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+      die("ext3 filesystems not (yet) supported");
+
The logic here is exactly backwards.  It bails out on any feature in the
"compat" list *except* has_journal.  With has_journal, it happily
continues (even though that's the broken case).

You want the patch to say:
+    if(Super.s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL)
+      die("ext3 filesystems not (yet) supported");

> e2defrag needs some major source changes (variable type but not code)
> to compile on !i386 archs that I have pending for after sarge and I'm
> realy busy with work and amd64 currently. I hope you can wait a while
> for this.
Sure.  It might go much much quicker now that I've identified the bug
and demonstrated the appropriate change, though.  :-)

> 
> MfG
>         Goswin
> 
> PS: can you reproduce this with a freshly amde fs?
> mke2fs [--some-options] /dev/ram0; e2defrag /dev/ram0?
Yes, but only because dir_index is set by default.  :-/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to