]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: allow SECURE namespace xattrs to use reserved block pool
authorEric Sandeen <sandeen@redhat.com>
Tue, 23 Jul 2024 17:26:10 +0000 (12:26 -0500)
committerChandan Babu R <chandanbabu@kernel.org>
Mon, 29 Jul 2024 03:56:20 +0000 (09:26 +0530)
commit39c1ddb064fd38e28571c853f067b134d17cffb2
treec6139c6992b236405810e468101bba54077a8c47
parent80d3d33cdf4b0494b465087eb34d2e29d86e290e
xfs: allow SECURE namespace xattrs to use reserved block pool

We got a report from the podman folks that selinux relabels that happen
as part of their process were returning ENOSPC when the filesystem is
completely full. This is because xattr changes reserve about 15 blocks
for the worst case, but the common case is for selinux contexts to be
the sole, in-inode xattr and consume no blocks.

We already allow reserved space consumption for XFS_ATTR_ROOT for things
such as ACLs, and SECURE namespace attributes are not so very different,
so allow them to use the reserved space as well.

Code-comment-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
V2: Remove local variable, add comment.
V3: Add Dave's preferred comment
V4: Spelling and comment beautification
fs/xfs/xfs_xattr.c