You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tmpfs,xattr: enable limited user extended attributes
JIRA: https://issues.redhat.com/browse/RHEL-65718
Upstream status: Linus
Conflicts: In mm/shmem.c there were 3 rejects:
1) hunk #5 due to missing upstream commit a2e4595
("shmem: stable directory offsets") which added a call to
function simple_offset_add() which is not added.
2) hunk #9 due to existing CentOS Stream commit 79e59ae
("shmem: convert to ctime accessor functions") which required
the hunk to be applied manually.
3) hunk #10 due to missing Upstream commit 0c95c02 ("fs:
drop unused posix acl handlers") which needed to be applied
manually to allow for the differences.
Also in mm/shmem.c there was a fuzz 2 in hunk #4 due to a white
space difference and fuzz 2 in hunk #6 due to existing CentOS
Stream commit 79e59ae ("shmem: convert to ctime accessor
functions").
commit 2daf18a
Author: Hugh Dickins <[email protected]>
Date: Tue Aug 8 21:33:56 2023 -0700
tmpfs,xattr: enable limited user extended attributes
Enable "user." extended attributes on tmpfs, limiting them by tracking
the space they occupy, and deducting that space from the limited ispace
(unless tmpfs mounted with nr_inodes=0 to leave that ispace unlimited).
tmpfs inodes and simple xattrs are both unswappable, and have to be in
lowmem on a 32-bit highmem kernel: so the ispace limit is appropriate
for xattrs, without any need for a further mount option.
Add simple_xattr_space() to give approximate but deterministic estimate
of the space taken up by each xattr: with simple_xattrs_free() outputting
the space freed if required (but kernfs and even some tmpfs usages do not
require that, so don't waste time on strlen'ing if not needed).
Security and trusted xattrs were already supported: for consistency and
simplicity, account them from the same pool; though there's a small risk
that a tmpfs with enough space before would now be considered too small.
When extended attributes are used, "df -i" does show more IUsed and less
IFree than can be explained by the inodes: document that (manpage later).
xfstests tests/generic which were not run on tmpfs before but now pass:
020 037 062 070 077 097 103 117 337 377 454 486 523 533 611 618 728
with no new failures.
Signed-off-by: Hugh Dickins <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Carlos Maiolino <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Signed-off-by: Ian Kent <[email protected]>
0 commit comments