[lkml]   [2001]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Re: How to add ntfs support]
Date said:
> So you are constructing a improved NTFS file driver. So
> when you have to check your written codes of file driver, will u
> recompile the whole kernel ? . That is what I am asking. I am in a way
> to build a new file system.

In general, it is not necessary to rebuild the kernel when you enable and
compile (or indeed write) a new module.

Places where the code in the kernel itself actually depends on the value of
CONFIG_blah_MODULE are thankfully relatively rare, although this ugliness
does happen at times. The filesystem code is fairly sane in this respect,
though, so you shouldn't have problems.

The main thing you have to watch when loading a new filesystem is the size
of the inode and superblock unions. If you are adding your
shinynewfs_inode_info to the inode union, and it's _larger_ than the
previous size of the inode union, then you would have to recompile the
kernel (or allocate it separately, which you're probably going to have to
do in 2.5 anyway).

Note that this isn't particularly likely to be a problem - the inode union
has space for _all_ the filesystems, not just the ones you said 'y' or 'm'
to, and some of them are quite large. But it's worth checking.

Most of the JFFS2 development was done without recompiling kernels. I
didn't even touch the kernel build tree - just
make -C /usr/src/linux SUBDIRS=`pwd` modules

For safety, I put the following in the module init routine during development:

/* sanity checks. Could we do these at compile time? */
if (sizeof(struct jffs2_sb_info) > sizeof (((struct super_block *)NULL)->u)) {
printk(KERN_ERR "JFFS2 error: struct jffs2_sb_info (%d bytes) doesn't fit in the super_block union (%d bytes)\n",
sizeof(struct jffs2_sb_info), sizeof (((struct super_block *)NULL)->u));
return -EIO;

if (sizeof(struct jffs2_inode_info) > sizeof (((struct inode *)NULL)->u)) {
printk(KERN_ERR "JFFS2 error: struct jffs2_inode_info (%d bytes) doesn't fit in the inode union (%d bytes)\n",
sizeof(struct jffs2_inode_info), sizeof (((struct inode *)NULL)->u));
return -EIO;


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:54    [W:0.063 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site