Re: [Ext2-devel] ext2 inode size (on-disk)

2001-04-19 Thread Theodore Tso
On Thu, Apr 19, 2001 at 11:35:40PM -0600, Andreas Dilger wrote: > I don't _think_ that there is a requirement for a multiple-of-8 inodes > per group. OK, looking into mke2fs (actually lib/ext2fs/initialize.c) > it _does_ show that it needs to be a multiple of 8, but I'm not sure > exactly what th

Re: [Ext2-devel] ext2 inode size (on-disk)

2001-04-19 Thread Theodore Tso
On Thu, Apr 19, 2001 at 10:23:39PM -0400, Alexander Viro wrote: > > I'm somewhat concerned about the following: last block of inode table > fragment may have less inodes than the rest. Reason: number of inodes > per group should be a multiple of 8 and with inodes bigger than 128 > bytes it may gi

Re: [Ext2-devel] ext2 inode size (on-disk)

2001-04-19 Thread Theodore Tso
On Thu, Apr 19, 2001 at 04:29:52PM -0400, Jeff Garzik wrote: > [EMAIL PROTECTED] wrote: > > In the long run, it probably makes sense to adjust the algorithms to > > allow for non-power-of-two inode sizes, > > If you don't mind, does that imply packing inodes across block > boundaries? No, it mea

Re: [Ext2-devel] ext2 inode size (on-disk)

2001-04-19 Thread Andreas Dilger
Al writes: > I don't think that it's needed - old kernels (up to -CURRENT ;-) will > simply refuse to mount if ->s_inode_size != 128. Old utilites may be > trickier, though... Probably would need an incompat flag for changing the inode size anyways, so old utilities wouldn't set that anyways. >

Re: [Ext2-devel] ext2 inode size (on-disk)

2001-04-19 Thread Alexander Viro
On Thu, 19 Apr 2001 [EMAIL PROTECTED] wrote: > This was a project that was never completed. I thought at one point > of allowing the inode size to be not a power of 2, but if you do that, > you really want to avoid letting an inode cross a block boundary --- > for reliability and performance r

Re: ext2 inode size (on-disk)

2001-04-19 Thread Alexander Viro
On Thu, 19 Apr 2001, Andreas Dilger wrote: > Strange, I run "mke2fs -I 192 /dev/hdc2" and do not have a segfault or any > problems with e2fsck or debugfs on the resulting filesystem. I'm running > 1.20-WIP, but I don't think anything was changed in this area for some time. May depend on the

Re: [Ext2-devel] ext2 inode size (on-disk)

2001-04-19 Thread Jeff Garzik
[EMAIL PROTECTED] wrote: > In the long run, it probably makes sense to adjust the algorithms to > allow for non-power-of-two inode sizes, If you don't mind, does that imply packing inodes across block boundaries? Regards, Jeff -- Jeff Garzik | "The universe is like a safe to wh

Re: [Ext2-devel] ext2 inode size (on-disk)

2001-04-19 Thread tytso
On Thu, Apr 19, 2001 at 07:55:20AM -0400, Alexander Viro wrote: > Erm... Folks, can ->s_inode_size be not a power of 2? Both > libext2fs and kernel break in that case. This was a project that was never completed. I thought at one point of allowing the inode size to be not a power of 2, bu

Re: ext2 inode size (on-disk)

2001-04-19 Thread Andreas Dilger
Al writes: > > I had always assumed that it would be a power-of-two size, but since it > > is an undocumented option to mke2fs, I suppose it was never really > > intended to be used. It appears, however, that the mke2fs code > > doesn't do ANY checking on the parameter, so you could concievably m

Re: ext2 inode size (on-disk)

2001-04-19 Thread Alexander Viro
On Thu, 19 Apr 2001, Andreas Dilger wrote: > Al, you write: > > Erm... Folks, can ->s_inode_size be not a power of 2? Both > > libext2fs and kernel break in that case. Example: > > > > dd if=/dev/zero of=foo bs=1024 count=20480 > > mkfs -I 192 foo > > I had always assumed that it would be

Re: ext2 inode size (on-disk)

2001-04-19 Thread Andreas Dilger
Al, you write: > Erm... Folks, can ->s_inode_size be not a power of 2? Both > libext2fs and kernel break in that case. Example: > > dd if=/dev/zero of=foo bs=1024 count=20480 > mkfs -I 192 foo I had always assumed that it would be a power-of-two size, but since it is an undocumented option

ext2 inode size (on-disk)

2001-04-19 Thread Alexander Viro
Erm... Folks, can ->s_inode_size be not a power of 2? Both libext2fs and kernel break in that case. Example: dd if=/dev/zero of=foo bs=1024 count=20480 mkfs -I 192 foo corrupts memory and segfaults. Reason: ext2_read_inode() (same problem is present in the kernel version of said beast) f