On 17.07.19 г. 20:39 ч., Andrei Borzenkov wrote:
> 17.07.2019 14:19, Nikolay Borisov пишет:
>>
>> This is really odd... So this indeed seems to be a userspace problem.
>
>
> Of course it is user space problem.
>
> commit 0a0a03554aaf56a6e7245e74fa7d8b3c53f1c20f
> Author: Misono Tomohiro <[email protected]>
> Date: Fri Mar 23 17:16:49 2018 +0900
>
> btrfs-progs: mkfs: add uuid and otime to ROOT_ITEM of, FS_TREE
>
> Currently, the top-level subvolume lacks the UUID. As a result, both
> non-snapshot subvolume and snapshot of top-level subvolume do not have
> Parent UUID and cannot be distinguisued. Therefore "fi show" of
> top-level lists all the subvolumes which lacks the UUID in
> "Snapshot(s)" filed. Also, it lacks the otime information.
>
> Fix this by adding the UUID and otime at the mkfs time. As a
> consequence, snapshots of top-level subvolume now have a Parent UUID and
> UUID tree will create an entry for top-level subvolume at mount time.
> This should not cause the problem for current kernel, but user program
> which relies on the empty Parent UUID may be affected by this change.
>
>
> What about the question - is there tool to fix existing filesystem by
> adding this information?
Short answer - no. Long answer - it would be trivial to add something
like that to btrfstune but this will only work for root volumes. Because
for snapshots you'd have to iterate all snapshots for a subvol, ensure
they haven't really changed i.e. are real snapshosts and then populate
their Parent UUID to that of the newly set UUID of their respective parent.
>