mbox series

[v3,0/4] : generic/020: fix MAX_ATTRVAL_SIZE values

Message ID 20220413164422.30077-1-ddiss@suse.de (mailing list archive)
Headers show
Series : generic/020: fix MAX_ATTRVAL_SIZE values | expand

Message

David Disseldorp April 13, 2022, 4:44 p.m. UTC
MAX_ATTRVAL_SIZE provides a per-filesystem maximum xattr value length
limit. There are a few problems with the current values:
- XFS, UDF and Btrfs are incorrectly hardcoded to use 64 bytes
  + This is a regression from the larger value used prior to fff4359d
  + Btrfs's should be calculated using nodesize and xattr name length
- NFS currently uses a 64K limit
  + This may be above the server's underlying failsystem limit, so use
    a conservative estimate instead

The changes are split into four patches to ease review, but feel free
to squash as deemed necessary.

Changes since v2:
- move _attr_get_max() helper into generic/020 and use test-local
  $max_attrs / $max_attrval_size variables
- minor commit message changes

 common/attr           |  75 ---------------------------
 tests/generic/020     | 116 +++++++++++++++++++++++++++++++++++++++---
 tests/generic/020.out |   2 +-
 3 files changed, 109 insertions(+), 84 deletions(-)