Skip to content

hfsplus: preserve FinderInfo when listing extended attributes - #2953

Closed
vfsci-bot[bot] wants to merge 1 commit into
vfs.base.cifrom
pw/1191176/vfs.base.ci
Closed

vfsci-bot[bot] wants to merge 1 commit into
vfs.base.cifrom
pw/1191176/vfs.base.ci

Conversation

@vfsci-bot

@vfsci-bot vfsci-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1191176
Submitter: Hengyu Liang
Version: 2
Patches: 1/1
Message-ID: <20261022094058.1169039-1-hengyul@cs.unc.edu>
Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/20261022094058.1169039-1-hengyul@cs.unc.edu


Automated by ml2pr

Commit aef5078 ("hfsplus: fix generic/062 xfstests failure") made
hfsplus_listxattr() return zero when the inode has no records in the
attributes B-tree.

However, osx.com.apple.FinderInfo is stored in the catalog record, and
hfsplus_listxattr() has already added it to the result at that point.
Setting the result to zero drops it. As of now, a file whose only
extended attribute is FinderInfo gets an empty list on a volume with
an attributes B-tree, which mkfs.hfsplus creates by default. getxattr()
still returns the value.

The issue can be reproduced with:

    truncate -s 64M hfs.img
    mkfs.hfsplus hfs.img
    mount -o loop hfs.img /mnt
    touch /mnt/file
    v=0x54455854$(printf %056d 0)
    setfattr -n osx.com.apple.FinderInfo -v $v /mnt/file
    getfattr -m - /mnt/file

Without this patch, getfattr prints nothing. With this patch, it lists
the FinderInfo entry.

This patch keeps the result of hfsplus_listxattr_finder_info() when no
attributes B-tree records are found, as is already done when the
volume has no attributes B-tree. A file without extended attributes
still gets an empty list.

Fixes: aef5078 ("hfsplus: fix generic/062 xfstests failure")
Cc: stable@vger.kernel.org
Signed-off-by: Hengyu Liang <hengyul@cs.unc.edu>
@vfsci-bot

vfsci-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown
Author

Superseded by series 1190716 (v1). Closing automatically.


Automated by ml2pr

@vfsci-bot vfsci-bot Bot closed this Oct 22, 2026
@vfsci-bot
vfsci-bot Bot deleted the pw/1191176/vfs.base.ci branch October 22, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant