[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080709213048.GC8517@mit.edu>
Date: Wed, 9 Jul 2008 17:30:48 -0400
From: Theodore Tso <tytso@....edu>
To: Jan Willem van den Brand <janwillem.dev@...glemail.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [RFC] ext3/jbd, kernel 2.6.13, make ext3 mountable as ext2
when journal is empty.
On Wed, Jul 09, 2008 at 11:04:28PM +0200, Jan Willem van den Brand wrote:
> First of all, I totally agree that this should never be default. The
> patch is usefull for us because the SD-card with ext3 file system is
> (possibly unsafely) pulled out of our TomTom device (which is built
> into a car) and then inserted in a Windows PC which only supports
> ext2. We are also considering ext3 on Windows or running e2fsck to
> replay the journal and then continue as ext2. But for now we are
> accessing the file system as ext2.
Ah, that was the missing piece. You have an ext2-only driver under
Windows, and the SD card has to be usable there. It makes *much* more
sense now. :-)
I'll note that the code to run the journal is available in userspace,
and while I didn't originally write it so I can only offer it to you
under GPL, it wouldn't be that hard to make it work under Windows. At
various times I've taken patches to make parts of e2fsprogs work under
Windows. (In fact, the original version of resize2fs was paid for by
the folks who make PartitionMagic program, and helped pay for the down
payment on my house. :-) Check out lib/ext2fs/dosio.c in the
e2fsprogs sources. I don't think anyone has tried building e2fsprogs
on a Windows/Dos environment in quite some time, so I'm sure some
patches will be necessary, but it maybe quite a bit easier than you
think. (As part of the PartitionMagic contract I also made parts of
e2fsck and mke2fs work on Windows as well, although that was over ten
years ago by now.)
That being said, I have to ask the question --- if the goal is Windows
compatibility, why aren't you using FAT? Is the performance benefit
critical for your application? Or do you need a POSIX-compliant
filesystem?
> The amount of writing is indeed limited. We actually considered
> unmounting and then mounting again but dropped that idea because we do
> not want to close files that are opened for reading. I thought that
> remounting ro did not flush the journal and reset the INCOMPAT_RECOVER
> flag. I will experiment with remounting, thanks!
Yes, remounting read/only will flush the journal and clear the
INCOMPAT_RECOVER bit.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists