Page MenuHomeFreeBSD

vfs_vnops.c: Modify the O_NAMEDATTR check for Solaris compatibility
AcceptedPublic

Authored by rmacklem on Fri, Apr 18, 11:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 19, 3:12 AM
Unknown Object (File)
Sat, Apr 19, 2:40 AM
Unknown Object (File)
Sat, Apr 19, 2:05 AM
Subscribers

Details

Reviewers
kib
Summary

The Solaris semantics for their O_XATTR flag is to use it
for a file object in the file system's namespace to indicate
that a named attribute for the file object should be open'd.

To do this, the O_NAMEDATTR flag must be allowed with a
non-named attribute directory. This patch changes vfs_vnops_cred()
to allow this.

This patch fixes 2ec2ba7e232d so that Solaris compatible
semantics can be implemented by patched ZFS code.

Test Plan

Tested with ZFS patched to support named attributes
in a Solaris compatible way.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Could you, please, add the description of the behavior you aiming to in the patch, to the summary and commit message?

sys/kern/vfs_vnops.c
287–288

Why not remove the if () check there, and move the vp = XXX; goto bad; block under the prev. condition? There is only one possibility to get error != 0 there, after the removal of ENOENT.

rmacklem marked an inline comment as done.
rmacklem edited the summary of this revision. (Show Details)

Cleaned up the "if" as suggested by kib@.

This revision is now accepted and ready to land.Sat, Apr 19, 10:21 PM