Thread (44 messages) 44 messages, 2 authors, 2012-09-17

Re: [PATCH 06/36 v4] libext2fs: add data structures for inline data feature

From: Theodore Ts'o <tytso@mit.edu>
Date: 2012-08-07 18:50:56

On Tue, Jul 31, 2012 at 07:47:59PM +0800, Zheng Liu wrote:
+struct ext2_ext_attr_ibody_header {
+	__u32	h_magic;
+};
+
I've searched through the entire patch series, and I don't find any
usage of h_magic, and in fact the only place this structure definition
is used is in ext2fs_get_inline_xattr_pos().

So that's a bit worrying; if this is a magic number, then it should be
checked (and an error returned if the magic number is not what we
expect it tobe).  Add checks into e2fsck would also be a really good
idea.  Also, what is the value that h_magic is epxected to be?  It
needs to be defined here.

It's also clear from looking at this function that this patch
significantly changes the layout of the extended attribute block of
data.  It would be a really good idea to add some ascii art to
document exactly what is going on.  A diagram so it's obvious to
future developers about the data layout is really needed.

Regards,

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