Re: Is EXT4_FITS_IN_INODE() broken?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Howells <dhowells@xxxxxxxxxx> wrote:

> Is EXT4_FITS_IN_INODE() broken?  It makes use of i_extra_isize - which is an
> optional field and doesn't exist if the filesystem was made with "-I 128".
> 
> 	(gdb) p &((struct ext4_inode *)0)->i_extra_isize
> 	$2 = (__le16 *) 0x80 <irq_stack_union+128>
> 
> Should EXT4_FITS_IN_INODE():
> 
> 	#define EXT4_FITS_IN_INODE(ext4_inode, einode, field)	\
> 		((offsetof(typeof(*ext4_inode), field) +	\
> 		  sizeof((ext4_inode)->field))			\
> 		<= (EXT4_GOOD_OLD_INODE_SIZE +			\
> 		    (einode)->i_extra_isize))			\
> 
> be using EXT4_INODE_SIZE() and consulting the superblock instead?

Actually, it's not a problem - it's using i_extra_isize from the einode, not
the raw inode.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux