Skip to content

Setting NFS4 ACLs on exported zfs dataset fails with EIO on linux-5.12 #12076

@BtbN

Description

@BtbN

System information

Type Version/Name
Distribution Name Gentoo
Distribution Version latest
Linux Kernel 5.12.4
Architecture x86_64
ZFS Version 2.1.0_rc5
SPL Version 2.1.0_rc5

Describe the problem you're observing

Setting an nfs4 acl on an nfs client fails with EIO if the server is exporting from ZFS.
This started happening after upgrading Linux from 5.10 to 5.12, and ZFS to 2.1.0_rc5 alongside it.

I downgraded Linux back to 5.10 afterwards, keeping ZFS 2.1.0_rc5, and the problem disappeared.
I also tested an ext4 based NFS export on Linux 5.12 and could not observe the issue either.
So this specifically happens with ZFS on Linux 5.12.

Looking at strace on failing application on the NFS client, it's specifically the setxattr() syscall that returns EIO.
Though on the NFS server, the file in question does not have any xattrs, since NFS probably is translating the NFS ACL to a posix one.

Describe how to reproduce the problem

Run nfs4_editfacl on any file on the export on the NFS client, and make any random change and save. It will fail with EIO.

Can also be reproduced with pure python:
python3 -c 'import os, shutil; print(repr(os.listxattr("testfile"))); shutil.copystat("testfile", "testfile.copy")'

Should first print at least the system.nfs4_acl xattr, and then fail in shutil with EIO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Triage NeededNew issue which needs to be triagedType: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions