Re: [PATCH 2/2] src/attr_replace_test: dynamically adjust the max xattr size

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Tue, Jun 07, 2022 at 04:15:13PM +0100, Luís Henriques wrote:
> CephFS doesn't had a maximum xattr size.  Instead, it imposes a maximum
> size for the full set of an inode's xattrs names+values, which by default
> is 64K but it can be changed by a cluster admin.
> 
> Test generic/486 started to fail after fixing a ceph bug where this limit
> wasn't being imposed.  Adjust dynamically the size of the xattr being set
> if the error returned is -ENOSPC.

Ah, this shouldn't be getting anywhere near the 64kB limit unless
ceph is telling userspace it's block size is > 64kB:

size = sbuf.st_blksize * 3 / 4;
.....
size = MIN(size, XATTR_SIZE_MAX);

Regardless, the correct thing to do here is pass the max supported
xattr size from the command line (because fstests knows what that it
for each filesystem type) rather than hard coding
XATTR_SIZE_MAX in the test.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux