Hi, While writing unit tests for chain_xattr.cc I tried to understand how to create the conditions to trigger this part of the chain_fsetxattr function:
/* if we're exactly at a chunk size, remove the next one (if wasn't removed
before) */
if (ret >= 0 && chunk_size == CHAIN_XATTR_MAX_BLOCK_LEN) {
get_raw_xattr_name(name, i, raw_name, sizeof(raw_name));
int r = sys_fremovexattr(fd, raw_name);
if (r < 0 && r != -ENODATA)
ret = r;
}
I suspect this cleans up extra empty attributes created as a side effect of a
previous version of the function. Or I just don't understand the case it
addresses.
I'd very much appreciate a hint :-)
--
Loïc Dachary, Artisan Logiciel Libre
signature.asc
Description: OpenPGP digital signature
