Thread (3 messages) 3 messages, 2 authors, 2015-11-06

Is EXT4_FITS_IN_INODE() broken?

From: David Howells <dhowells@redhat.com>
Date: 2015-11-05 17:19:00

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?

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help