From: Andreas Dilger Date: Fri, 28 Jun 2019 00:53:04 +0000 (-0600) Subject: LU-12481 osd-ldiskfs: allow full 64KB xattr size X-Git-Tag: 2.12.56~7 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F52%2F35352%2F2;p=fs%2Flustre-release.git LU-12481 osd-ldiskfs: allow full 64KB xattr size 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 Change-Id: I1320c32af98ab0feeeb147d8dbbc66ec7d1b8e1f Reviewed-on: https://review.whamcloud.com/35352 Tested-by: jenkins Reviewed-by: Patrick Farrell Tested-by: Maloo Reviewed-by: Wang Shilong Reviewed-by: Oleg Drokin --- diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 0b6a85c..0a7cdee 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -2319,8 +2319,8 @@ static void osd_conf_get(const struct lu_env *env, #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 diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index cafcadc..79cec18 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -4572,7 +4572,7 @@ test_61() { # LU-80 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"