When the 'ea_inode' feature is enabled, allow the full 64KB xattr
size, since the xattr data is stored directly in the ea_inode data
blocks, while the ext4_xattr_entry and ext4_xattr_hdr structures are
stored separately in the parent inode or external xattr block.
This avoids errors on the client trying to set a full-sized inode:
setfattr: /mnt/lustre/f61.conf-sanity: Argument list too long
Fixes:
3ec712bd183a ("LU-11868 osd: Set max ea size to XATTR_SIZE_MAX")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1320c32af98ab0feeeb147d8dbbc66ec7d1b8e1f
Reviewed-on: https://review.whamcloud.com/35352
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
#endif
param->ddp_max_ea_size = sb->s_blocksize - ea_overhead;
- if (param->ddp_max_ea_size > OBD_MAX_EA_SIZE - ea_overhead)
- param->ddp_max_ea_size = OBD_MAX_EA_SIZE - ea_overhead;
+ if (param->ddp_max_ea_size > OBD_MAX_EA_SIZE)
+ param->ddp_max_ea_size = OBD_MAX_EA_SIZE;
/*
* Preferred RPC size for efficient disk IO. 4MB shows good
local small_value="bar"
local name="trusted.big"
- log "save large xattr $name on $file"
+ log "save large xattr of $(max_xattr_size) bytes on $name on $file"
setfattr -n $name -v $large_value $file ||
error "saving $name on $file failed"