Summary: | Move operations from one btrfs subvolume to another do not preserve xattr data | ||
---|---|---|---|
Product: | [Unmaintained] kio | Reporter: | David M <davidmarch007> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | ct.gsk, emmanuelpescosta099, ict, nate, pascal |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
David M
2014-12-23 12:32:16 UTC
Is the issue also visible when using "kioclient move src dest" in Konsole? Yes. It appears the issue is still present when using "kioclient move src dest" in Konsole: --- $ touch test (my note: at this point I then rated the file 4 stars in Dolphin) $ getfattr -d test # file: test user.baloo.rating="8" $ kioclient move ./test /mnt/archbtrfs/home/david/ $ getfattr -d /mnt/archbtrfs/home/david/ $ ls -l /mnt/archbtrfs/home/david/ total 0 drwxr-xr-x 1 david users 0 Dec 23 09:37 Desktop -rw-r--r-- 1 david david 0 Dec 23 16:58 test (my note: At this point I also verified on the destination subvolume the file appears with no rating) --- Also I should probably add that although these are separate subvolumes they are still on the same btrfs disk array itself. In other words there is one default root (id=5) subvolume and another subvolume below that called 'gentoo'. I have also verified that 'cp -a --preserve=xattr <source> <dest>' is indeed able to preserve the xattr data (which holds baloo ratings and tags) across btrfs subvolumes. So it appears likely the issue is something related to Dolphin and not just due to the btrfs filesystem. Please see below. ---- $ touch testfile $ ls -l testfile -rw-r--r-- 1 david david 0 Dec 26 11:21 testfile [my note: at this point I rated 'testfile' five stars in Dolphin] $ getfattr -d testfile # file: testfile user.baloo.rating="10" $ cp -a --preserve=xattr ./testfile /mnt/archbtrfs/home/david/ $ getfattr -d /mnt/archbtrfs/home/david/testfile getfattr: Removing leading '/' from absolute path names # file: mnt/archbtrfs/home/david/testfile user.baloo.rating="10" ----- Thanks for the bug report! KIO doesn't preserve extended attributes (yet). It seems like KIO preserves xattrs when moving files between locations on same mount point. This also seems to be unrelated to btrfs. But when moving between mount points, xattrs are lost. This also happens, if mount points are mounting the same block device. For example xattrs gets preserved, when movin a file from one directory to another on /home partition: $ xattr -l /home/A/test.txt user.xdg.tags: testtag $ kioclient move /home/A/test.txt /home/B/test.txt $ xattr -l /home/B/test.txt user.xdg.tags: testtag But when remounting the /home partition to /mnt, xattrs gets lost: $ mount | grep /home /dev/sda8 on /home type ext4 (rw,relatime,data=ordered) $ mount /dev/sda8 /mnt $ xattr -l /home/A/test.txt user.xdg.tags: testtag $ kioclient move /home/A/test.txt /mnt/B/test.txt $ xattr -l /mnt/B/test.txt => tag is gone. Tested on Kubuntu 15.04 with updates from kubuntu-ppa/backports: $ kioclient --version Qt: 4.8.6 KDE: 4.14.8 KIO-Client: 2.0 This bug is fairly serious. It results in unexpected data loss when simply moving files. It occurs on ext file systems too. *** This bug has been marked as a duplicate of bug 116617 *** *** This bug has been confirmed by popular vote. *** |