Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 568270 - sys-fs/zfs-0.6.5.3-r1 breaks reporting of inherited user properties
Summary: sys-fs/zfs-0.6.5.3-r1 breaks reporting of inherited user properties
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Richard Yao (RETIRED)
URL: https://github.com/zfsonlinux/zfs/iss...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-14 19:27 UTC by Remy Blank
Modified: 2016-01-05 16:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Script demonstrating the issue (user-prop.sh,422 bytes, text/plain)
2015-12-14 19:29 UTC, Remy Blank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Blank 2015-12-14 19:27:28 UTC
Originally reported here: https://github.com/zfsonlinux/zfs/issues/4099

On a machine with zfs-0.6.5.3-r1, inherited user properties set on filesystems are reported as "local" on sub-filesystems. The issue doesn't happen with zfs-0.6.5.3.

Reproducible: Always

Steps to Reproduce:
1. Set a user property on filesystem pool/test.
2. List properties on pool/test/sub.
Actual Results:  
The property on pool/test/sub is reported as "local".

Expected Results:  
The property on pool/test/sub should be reported as "inherited from pool/test".

With this issue, it is impossible to know if a user property was set on a filesystem directly or was inherited from its parent. I use such a property to configure snapshotting, and with this, all sub-filesystems look as if their snapshotting was configured the same as their parent.

I'll attach a short script that demonstrates the issue.
Comment 1 Remy Blank 2015-12-14 19:29:15 UTC
Created attachment 419202 [details]
Script demonstrating the issue
Comment 2 Remy Blank 2015-12-14 19:33:11 UTC
When running the script above with 0.6.5.3-r1, the output is the following. Note that the property is erroneously identified as "local" on test-pool/test/sub.

dd if=/dev/zero of=test-pool.vol bs=1M count=64
64+0 records in
64+0 records out
67108864 bytes (67 MB) copied, 0.0663682 s, 1.0 GB/s
zpool create -R $PWD test-pool $PWD/test-pool.vol
cd test-pool
zfs create test-pool/test
zfs create test-pool/test/sub
zfs set user:prop=parent test-pool/test
zfs get user:prop test-pool/test
NAME            PROPERTY   VALUE      SOURCE
test-pool/test  user:prop  parent     local
zfs get user:prop test-pool/test/sub
NAME                PROPERTY   VALUE      SOURCE
test-pool/test/sub  user:prop  parent     local
zfs get -s inherited user:prop test-pool/test/sub
zfs get -s local user:prop test-pool/test/sub
NAME                PROPERTY   VALUE      SOURCE
test-pool/test/sub  user:prop  parent     local
cd ..
zpool export test-pool

When running it with 0.6.5.3, the output correctly shows the property as "inherited from test-pool/test".

dd if=/dev/zero of=test-pool.vol bs=1M count=64
64+0 records in
64+0 records out
67108864 bytes (67 MB) copied, 0.100981 s, 665 MB/s
zpool create -R $PWD test-pool $PWD/test-pool.vol
cd test-pool
zfs create test-pool/test
zfs create test-pool/test/sub
zfs set user:prop=parent test-pool/test
zfs get user:prop test-pool/test
NAME            PROPERTY   VALUE      SOURCE
test-pool/test  user:prop  parent     local
zfs get user:prop test-pool/test/sub
NAME                PROPERTY   VALUE      SOURCE
test-pool/test/sub  user:prop  parent     inherited from test-pool/test
zfs get -s inherited user:prop test-pool/test/sub
NAME                PROPERTY   VALUE      SOURCE
test-pool/test/sub  user:prop  parent     inherited from test-pool/test
zfs get -s local user:prop test-pool/test/sub
cd ..
zpool export test-pool
Comment 3 Richard Yao (RETIRED) gentoo-dev 2015-12-14 21:37:23 UTC
Thanks for the report. I am prioritizing this and I should have it fixed within 48 hours or less.
Comment 4 Remy Blank 2015-12-14 22:11:16 UTC
Thanks. I forgot to mention that downgrading to 0.6.5.3 fixes the issue, so there's no urgency (at least on my side).
Comment 5 iloveosxzfs 2015-12-15 07:03:35 UTC
Interestingly, it turns out to be order dependent.

openzfs ~ # zfs create o3xpool/foo2
openzfs ~ # zfs create o3xpool/foo2/bar2
openzfs ~ # zfs set myuser:myprop=myparent o3xpool/foo2
openzfs ~ # zfs get myuser:myprop o3xpool/foo2
NAME          PROPERTY       VALUE          SOURCE
o3xpool/foo2  myuser:myprop  myparent       local
openzfs ~ # zfs get myuser:myprop o3xpool/foo2/bar2
NAME               PROPERTY       VALUE          SOURCE
o3xpool/foo2/bar2  myuser:myprop  myparent       local
openzfs ~ # zfs create o3xpool/foo2/bar3
openzfs ~ # zfs get myuser:myprop o3xpool/foo2/bar3
NAME               PROPERTY       VALUE          SOURCE
o3xpool/foo2/bar3  myuser:myprop  myparent       inherited from o3xpool/foo2
Comment 6 Richard Yao (RETIRED) gentoo-dev 2016-01-04 19:24:27 UTC
Remy, I decided to batch this with some other issues after your response and neglected to post that I did confirm that I could not reproduce it on the latest code from the stable API branch after doing some other fixes:

https://github.com/zfsonlinux/zfs/pull/3907

I cannot reproduce this on 0.6.5.3-r2, which I am preparing to push out. I suspect that this is fixed there.
Comment 7 Richard Yao (RETIRED) gentoo-dev 2016-01-05 16:24:05 UTC
sys-fs/zfs-kmod-0.6.5.3-r2 was released yesterday.