On Apr 07, 2009 13:41 -0400, Oleg Drokin wrote: > On Apr 7, 2009, at 1:32 PM, Jamie Lokier wrote: >> If an "extensible" attribute is not asked for, the kernel must not >> fill in that field of the structure as the app may be not have >> allocated space for it. Or it must use a tag-length-value sort of >> structure for the result, similar to network CMSGs. > > The app allocates struct stat, whatever it is, I presume. There is a > huge benefit to actually reuse existing struct stat, I believe. The point is that if the application is asking for specific fields, it will also have allocated a stat struct that will have room for those fields (sizeof(struct stat) would of course have to match the AT_STAT_* flags that are available to the application). New fields (as opposed to using the reserved fields) would always be added at the end. If some flags are not set then it doesn't matter whether the user struct is large enough because the fields will not be touched. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html