From: Al Viro <viro@ZenIV.linux.org.uk>
To: Kai Bankett <chaosman@ontika.net>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH]QNX6 filesystem (RO) driver
Date: Sun, 12 Feb 2012 22:43:58 +0000 [thread overview]
Message-ID: <20120212224358.GW23916@ZenIV.linux.org.uk> (raw)
In-Reply-To: <4F3839CE.8040805@ontika.net>
On Sun, Feb 12, 2012 at 11:14:38PM +0100, Kai Bankett wrote:
re junk removal from qnx4 - sure, just make is a separate patch.
> >qnx6_iget() - what, they really don't allow named pipes/sockets/device
> >nodes on the filesystem? If not, you can just use init_special_inode()
> >instead of that printk+iget_failed().
> At least so far I could not find any additional extras.
> I followed your advise and used init_special_inode() to get rid of
> that printk+stuff.
Umm... How does qnx encode device numbers for block/character devices?
> Yes, I have the name length in the directory entry, but only for
> short filenames.
> For long filenames the length field in the directory entry is always 0xff.
> I just moved the length check up by one if-clause.
> Personally I don't think that moving it around further makes that
> much sense, as the length for short filenames is also checked before
> copying the filename.
> The way it currently is it's at least symmetrical between short und
> long filename handling code.
>
> I hope I got all the points and fixes right?
A few more things:
* duplicating di_block_ptr[] array seems to be pointless
* qnx6_get_inode_loc(), qnx6_dir_lfile_block() and qnx6_block_map()
seem to have a lot of duplicated code, at the very least. Looks like
a missing helper function... Incidentally, I'd switched qnx6_get_devblock()
and qnx6_check_blockptr() to __fs32 argument, along with making QNX6_PTR_UNSET
(~(__fs32)0)
* what is actually stored in ->de_size for long entries in case
of big-endian fs? 4 bytes of de_inode - fine, as as for short ones, but
then what? If it's really 32bit big-endian 0xff, it will have the first byte
equal to 0, which would confuse the living hell out of your code. Or is
it actually __u8 + 3 bytes of padding? Then it would be compatible with
short dir entries, but conversions would be the wrong thing to do there...
* I seriously suspect that you want to cook yourself a couple of
unhashed in-core struct inode for Longfile and Inode ones; then get_inode_loc(),
dir_lfile_block() and block_map() would become identical *and* you just might
be able to use page cache instead of all that messing with buffer_heads in
readdir et.al. Just do new_inode() and fill di_block_ptr/levels/i_mode/i_size
and ->a_ops. iput() both in ->put_super() and that's it... For directories
in pagecache see how e.g. ext2 is doing it - or minixfs, for that matter.
* mmu_private is never used. Just lose it...
next prev parent reply other threads:[~2012-02-12 22:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 20:41 [PATCH]QNX6 filesystem (RO) driver Kai Bankett
2012-02-12 4:56 ` Al Viro
2012-02-12 22:14 ` Kai Bankett
2012-02-12 22:43 ` Al Viro [this message]
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=20120212224358.GW23916@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).