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
Switching between xattr=dir and xattr=sa then updating/removing xattrs been previously set with the other xattr=[dir|sa] style causes problems.
E.g.:
#
# Start with xattr=dir
#
zfs create -o xattr=dir pool/test
touch /pool/test/foo
setfattr -n user.foo -v one /pool/test/foo
getfattr -n user.foo /pool/test/foo
getfattr: Removing leading '/' from absolute path names
# file: pool/test/foo
user.foo="one"
#
# Switch to xattr=sa
#
zfs set xattr=sa pool/test
#
# previous xattr is still readable
#
getfattr -n user.foo /pool/test/foo
getfattr: Removing leading '/' from absolute path names
# file: pool/test/foo
user.foo="one"
#
# Setting a different value on the old xattr is ok
#
setfattr -n user.foo -v two /pool/test/foo
getfattr -n user.foo /pool/test/foo
getfattr: Removing leading '/' from absolute path names
# file: pool/test/foo
user.foo="two"
#
# Deleting the old xattr doesn't work
# (Note: normal getfattr output would be "No such attribute")
#
setfattr -x user.foo /pool/test/foo
getfattr -n user.foo /pool/test/foo
/pool/test/foo: user.foo: Invalid argument
#
# Trying to set it again also fails
#
setfattr -n user.foo -v three /pool/test/foo
setfattr: /pool/test/foo: Invalid argument
#
# Go back to xattr=dir
#
zfs set xattr=dir pool/test
#
# Reading the xattr fails
#
getfattr -n user.foo /pool/test/foo
/pool/test/foo: user.foo: Invalid argument
#
# Trying to set it again fails
#
setfattr -n user.foo -v four /pool/test/foo
setfattr: /pool/test/foo: Invalid argument
#
# Trying to delete it fails
#
# setfattr -x user.foo /pool/test/foo
setfattr: /pool/test/foo: Invalid argument
And in the other direction, i.e. xattr=sa to xattr=dir
#
# Start with xattr=sa
#
zfs create -o xattr=sa pool/test
touch /pool/test/foo
setfattr -n user.foo -v one /pool/test/foo
getfattr -n user.foo /pool/test/foo
getfattr: Removing leading '/' from absolute path names
# file: pool/test/foo
user.foo="one"
#
# Switch to xattr=dir
#
zfs set xattr=dir pool/test
#
# previous xattr is still readable
#
getfattr -n user.foo /pool/test/foo
getfattr: Removing leading '/' from absolute path names
# file: pool/test/foo
user.foo="one"
#
# Setting a different value on the old xattr doesn't
# complain, but also doesn't work
#
setfattr -n user.foo -v two /pool/test/foo
getfattr -n user.foo /pool/test/foo
getfattr: Removing leading '/' from absolute path names
# file: pool/test/foo
user.foo="one"
#
# And in fact we now have two copies of the old xattr??
#
getfattr -d /pool/test/foo
getfattr: Removing leading '/' from absolute path names
# file: pool/test/foo
user.foo="one"
user.foo="one"
#
# Deleting the xattr leaves one copy
#
setfattr -x user.foo /pool/test/foo
getfattr -d /pool/test/foo
getfattr: Removing leading '/' from absolute path names
# file: pool/test/foo
user.foo="one"
#
# Deleting the 2nd copy of the xattr doesn't work
#
setfattr -x user.foo /pool/test/foo
getfattr -d /pool/test/foo
getfattr: Removing leading '/' from absolute path names
# file: pool/test/foo
user.foo="one"
The text was updated successfully, but these errors were encountered:
This reverts commit ec2626a which
caused consistency problems between the shared and private handles.
Reverting this change should resolve issues openzfs#709 and openzfs#727. It
will also reintroduce an arc_anon memory leak which is addressed
by the next commit.
Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#709
Issue openzfs#727
Switching between xattr=dir and xattr=sa then updating/removing xattrs been previously set with the other xattr=[dir|sa] style causes problems.
E.g.:
And in the other direction, i.e. xattr=sa to xattr=dir
The text was updated successfully, but these errors were encountered: