btrfs: test writing into unwritten extent right before snapshotting

Test that if we write into an unwritten extent of a file when there
is no more space left to allocate in the filesystem and then
snapshot the file's subvolume, after a clean shutdown the data was
not lost.

This test is motivated by a bug found by Robbie Ko for which there
is a fix whose patch title is:

  "Btrfs: fix unexpected failure of nocow buffered writes after
   snapshotting when low on space"

Reported-by: Robbie Ko <robbieko@synology.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Filipe Manana
2018-08-06 09:08:39 +01:00
committed by Eryu Guan
parent 3a64a884c4
commit 7931e0696c
3 changed files with 84 additions and 0 deletions
+1
View File
@@ -172,3 +172,4 @@
167 auto quick replace volume
168 auto quick send
169 auto quick send
170 auto quick snapshot