All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Bankett <chaosman@ontika.net>
To: linux-fsdevel@vger.kernel.org
Subject: [PATCH]QNX6 filesystem (RO) driver
Date: Wed, 01 Feb 2012 21:41:35 +0100	[thread overview]
Message-ID: <4F29A37F.6070909@ontika.net> (raw)

Hi,

Onhttp://a6.ontika.net/patches/patch-3.2.2-qnx6.gz  you find a patch for
adding QNX6 FS readonly support (against 3.2.2) to the linux kernel.
(well, at least I would like to open the discussion about it ... ;))

It's the first linux kernel driver I wrote, so please be kind to me in
case some of my design decisions do violate some "common practice" well
known to any regular reader of this list.
I am very happy to work on the source in the "right" direction, if you
suggest me the direction.
So, suggestions, feedback, input, testing is highly welcome!

I reverse engineered - I would say - whole QNX6 Filesystem from ground
up. (hexedit, from superblock identification to adressing scheme to node
kinds etc.)
Successfully completed writing a FS resizing application before starting
work on this kernel driver.
(so you can expect more than just readonly to come ...)

Some sidenotes worth mentioning:
- Audi MMI FS support
I've included support for the Audi MMI HDD filesystem (who's driving a
recent Audi with 3G or 3G+ HDD multimedia system?)
So I've added a "mmi_fs" mount option to tell the driver to use the
right superblock layout and -offset for mounting that "modified" or "old
development state" QNX6 derivate filesystem.
Not sure if a mount option is the usual approach, but it workes well -
at least for me.
I took the decision to make that specific driver support configurable
via kernel config.

- Endianness support
QNX6 offers to create filesystems either little- or big endian. That's
an advantage if the created filesystem later is used on an architecture
that got a different endianness.
I introduced some TO_CPUxx() macros and a superblock detection mechanism
for detecting the FS endianness.
Could not test it on a different architecture than x86 and therefore I'm
unsure if it works on a different endian linux system, but from (my)
theory it should do.
At least on x86 it's no problem to mount a different endian QNX6 FS and
read from it - that's what I've tested.
If the macros are the right approach ... well, happy to receive feedback ;)

I also made the endianness support configurable - just to be on the safe
side.

- Checksums
Superblock checksums are validated.
Longfilenames in a qnx6fs got a checksum in the directory inode.
That checksum algorithm is also build in, but just logs to the kernel
log if it detects a wrong checksum.
(so it's not a hard check)
mmi_fs does not have that longfilename protection, so it's switched off
there.

So much for now ...

Kai


             reply	other threads:[~2012-02-01 20:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01 20:41 Kai Bankett [this message]
2012-02-12  4:56 ` [PATCH]QNX6 filesystem (RO) driver Al Viro
2012-02-12 22:14   ` Kai Bankett
2012-02-12 22:43     ` Al Viro
2012-02-15  2:52       ` Kai Bankett
2012-02-15  6:10         ` Al Viro
2012-02-15  6:14           ` Al Viro
2012-02-15  6:47           ` Al Viro
2012-02-15  7:11             ` Al Viro
2012-02-15  7:57               ` Al Viro
2012-02-15 14:40                 ` Al Viro
2012-02-15 16:27                   ` Kai Bankett
2012-02-15 21:35                     ` Al Viro
2012-02-16 10:00                   ` Al Viro
2012-02-17 15:06                     ` Kai Bankett
2012-02-17 16:20                       ` Al Viro
2012-02-17 17:53                         ` Kai Bankett
2012-02-17 18:35                           ` Al Viro
2012-02-17 18:53                             ` Al Viro
2012-02-17 21:38                               ` Kai Bankett
2012-02-21 22:04                                 ` Al Viro
2012-02-21 22:09                                   ` Al Viro
2012-02-22 11:58                                     ` Kai Bankett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F29A37F.6070909@ontika.net \
    --to=chaosman@ontika.net \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.