Filipe Manana
b672f4bf9d
Btrfs: send, fix issuing write op when processing hole in no data mode
...
[ Upstream commit d4dfc0f4d39475ccbbac947880b5464a74c30b99 ]
When doing an incremental send of a filesystem with the no-holes feature
enabled, we end up issuing a write operation when using the no data mode
send flag, instead of issuing an update extent operation. Fix this by
issuing the update extent operation instead.
Trivial reproducer:
$ mkfs.btrfs -f -O no-holes /dev/sdc
$ mkfs.btrfs -f /dev/sdd
$ mount /dev/sdc /mnt/sdc
$ mount /dev/sdd /mnt/sdd
$ xfs_io -f -c "pwrite -S 0xab 0 32K" /mnt/sdc/foobar
$ btrfs subvolume snapshot -r /mnt/sdc /mnt/sdc/snap1
$ xfs_io -c "fpunch 8K 8K" /mnt/sdc/foobar
$ btrfs subvolume snapshot -r /mnt/sdc /mnt/sdc/snap2
$ btrfs send /mnt/sdc/snap1 | btrfs receive /mnt/sdd
$ btrfs send --no-data -p /mnt/sdc/snap1 /mnt/sdc/snap2 \
| btrfs receive -vv /mnt/sdd
Before this change the output of the second receive command is:
receiving snapshot snap2 uuid=f6922049-8c22-e544-9ff9-fc6755918447...
utimes
write foobar, offset 8192, len 8192
utimes foobar
BTRFS_IOC_SET_RECEIVED_SUBVOL uuid=f6922049-8c22-e544-9ff9-...
After this change it is:
receiving snapshot snap2 uuid=564d36a3-ebc8-7343-aec9-bf6fda278e64...
utimes
update_extent foobar: offset=8192, len=8192
utimes foobar
BTRFS_IOC_SET_RECEIVED_SUBVOL uuid=564d36a3-ebc8-7343-aec9-bf6fda278e64...
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:50:33 +02:00
..
2017-11-30 08:39:05 +00:00
2016-10-10 20:16:43 -07:00
2018-05-30 07:50:16 +02:00
2017-12-20 10:07:25 +01:00
2018-04-24 09:34:18 +02:00
2016-10-15 12:09:13 -07:00
2016-10-10 23:02:51 -04:00
2018-05-30 07:50:33 +02:00
2016-10-10 20:16:43 -07:00
2018-05-30 07:50:32 +02:00
2018-05-30 07:50:25 +02:00
2017-11-24 08:33:42 +01:00
2017-06-24 07:11:12 +02:00
2017-11-30 08:39:11 +00:00
2017-08-06 18:59:43 -07:00
2016-10-10 20:16:43 -07:00
2017-09-09 17:39:40 +02:00
2018-05-30 07:50:16 +02:00
2016-10-10 20:16:43 -07:00
2016-10-27 18:43:43 -07:00
2016-10-06 09:07:44 -04:00
2018-05-30 07:50:16 +02:00
2018-05-30 07:50:16 +02:00
2018-05-30 07:50:16 +02:00
2017-03-15 10:02:52 +08:00
2017-10-27 10:38:11 +02:00
2017-11-02 09:49:13 +01:00
2017-12-20 10:07:30 +01:00
2016-10-10 20:16:43 -07:00
2018-05-25 16:12:59 +02:00
2016-10-10 20:16:43 -07:00
2016-10-10 20:16:43 -07:00
2017-10-08 10:26:09 +02:00
2017-11-30 08:39:04 +00:00
2018-05-01 15:13:03 -07:00
2018-05-30 07:50:22 +02:00
2018-05-30 07:50:16 +02:00
2018-02-17 13:21:15 +01:00
2018-05-19 10:27:00 +02:00
2016-10-10 20:16:43 -07:00
2016-10-10 20:16:43 -07:00
2018-03-28 18:39:23 +02:00
2018-05-30 07:50:20 +02:00
2018-02-03 17:05:38 +01:00
2018-03-28 18:39:21 +02:00
2018-05-30 07:50:16 +02:00
2018-04-24 09:34:18 +02:00
2016-10-30 13:09:42 -04:00
2018-05-30 07:50:23 +02:00
2016-10-10 20:16:43 -07:00
2016-09-27 21:06:21 -04:00
2018-05-30 07:50:16 +02:00
2018-04-13 19:48:12 +02:00
2018-05-30 07:50:26 +02:00
2017-08-06 18:59:43 -07:00
2018-02-03 17:05:39 +01:00
2016-10-10 20:16:43 -07:00
2018-05-30 07:50:16 +02:00
2017-06-17 06:41:56 +02:00
2016-10-07 21:48:36 -04:00
2017-04-12 12:41:11 +02:00
2016-10-10 20:16:43 -07:00
2016-09-27 21:06:21 -04:00
2018-04-24 09:34:08 +02:00
2018-05-30 07:50:16 +02:00
2018-05-30 07:50:16 +02:00
2018-05-09 09:50:21 +02:00
2018-05-30 07:50:16 +02:00
2016-10-10 20:16:43 -07:00
2017-01-09 08:32:24 +01:00
2016-07-25 16:51:49 +10:00
2017-07-21 07:42:21 +02:00
2016-08-02 19:35:15 -04:00
2016-07-28 13:29:12 +10:00
2016-09-27 21:06:22 -04:00
2017-10-18 09:35:39 +02:00
2017-06-14 15:06:00 +02:00
2016-08-23 22:58:51 -07:00
2018-02-25 11:05:55 +01:00
2018-04-08 12:12:44 +02:00
2016-09-27 21:20:53 -04:00
2017-07-05 14:40:26 +02:00
2018-02-28 10:18:33 +01:00
2018-05-30 07:50:30 +02:00
2017-10-18 09:35:41 +02:00
2017-09-07 08:35:41 +02:00
2017-07-21 07:42:22 +02:00
2018-01-31 12:55:52 +01:00
2016-09-27 18:47:38 -04:00
2018-05-16 10:08:42 +02:00
2017-09-20 08:20:01 +02:00
2017-09-20 08:20:01 +02:00
2016-09-15 13:29:52 -07:00
2017-09-20 08:19:59 +02:00
2016-10-07 18:46:29 -07:00
2016-08-12 16:47:05 +01:00
2017-12-09 22:01:51 +01:00
2016-10-18 12:21:28 +02:00
2018-02-22 15:43:48 +01:00
2017-07-21 07:42:22 +02:00
2017-10-18 09:35:39 +02:00
2018-04-20 08:21:07 +02:00
2018-04-24 09:34:18 +02:00
2018-02-17 13:21:15 +01:00
2017-07-12 15:01:02 +02:00
2018-02-17 13:21:18 +01:00
2017-07-21 07:42:22 +02:00
2017-03-15 10:02:43 +08:00
2017-01-26 08:24:37 +01:00
2017-10-12 11:51:26 +02:00
2016-10-11 15:06:30 -07:00
2016-10-07 18:46:30 -07:00
2017-02-23 17:44:35 +01:00
2017-06-14 15:06:01 +02:00
2018-03-03 10:23:21 +01:00
2017-05-08 07:47:54 +02:00
2017-12-20 10:07:18 +01:00
2016-10-08 11:06:08 -04:00
2017-10-12 11:51:19 +02:00