btrfs: regression in 3.16 with renaming of directory in between two snapshots
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Low
|
Colin Ian King | ||
Utopic |
Fix Released
|
Undecided
|
Colin Ian King |
Bug Description
SRU Justification: (Utopic)
[Impact]
If between two snapshots we rename an existing directory named X to Y and
make it a child (direct or not) of a new inode named X, we were delaying
the move/rename of the former directory unnecessarily, which would result
in attempting to rename the new directory from its orphan name to name X
prematurely.
[Fix]
upstream commit bf8e8ca6fd4ac6e
"Btrfs: send, don't delay dir move if there's a new parent inode"
this is a simple one-liner, risk is low to zero.
[Testcase]
As from the commit:
$ mkfs.btrfs -f /dev/vdd
$ mount /dev/vdd /mnt
$ mkdir -p /mnt/merlin/
$ btrfs subvolume snapshot -r /mnt /mnt/mysnap1
$ mkdir /mnt/OSD
$ mv /mnt/merlin/RC/OSD /mnt/OSD/
$ mv /mnt/OSD /mnt/merlin/RC
$ btrfs subvolume snapshot -r /mnt /mnt/mysnap2
$ btrfs send /mnt/mysnap1 -f /tmp/1.snap
$ btrfs send -p /mnt/mysnap1 /mnt/mysnap2 -f /tmp/2.snap
$ mkfs.btrfs -f /dev/vdc
$ mount /dev/vdc /mnt2
$ btrfs receive /mnt2 -f /tmp/1.snap
$ btrfs receive /mnt2 -f /tmp/2.snap
The second receive (from an incremental send) failed with the following
error message: "rename o261-7-0 -> merlin/RC/OSD failed".
This is a regression introduced in the 3.16 kernel.
Changed in linux (Ubuntu): | |
importance: | Undecided → Low |
status: | New → In Progress |
assignee: | nobody → Colin Ian King (colin-king) |
Changed in linux (Ubuntu Utopic): | |
status: | New → Fix Committed |
Changed in linux (Ubuntu Utopic): | |
assignee: | nobody → Colin Ian King (colin-king) |
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Released |
This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification- needed- utopic' to 'verification- done-utopic' .
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Thank you!