Filipe Manana
8ee1d4d281
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:49:03 +02:00
..
2017-11-30 08:37:22 +00:00
2018-05-30 07:48:51 +02:00
2017-12-20 10:04:56 +01:00
2018-04-24 09:32:11 +02:00
2018-05-30 07:49:03 +02:00
2015-11-16 20:38:43 -05:00
2017-12-20 10:04:52 +01:00
2018-05-30 07:48:56 +02:00
2017-11-24 08:32:25 +01:00
2017-06-26 07:13:08 +02:00
2017-08-06 19:19:42 -07:00
2016-08-16 09:30:49 +02:00
2017-09-13 14:09:45 -07:00
2018-05-30 07:48:52 +02:00
2016-03-03 15:07:09 -08:00
2015-12-12 10:15:34 -08:00
2018-05-30 07:48:52 +02:00
2018-05-30 07:48:52 +02:00
2018-05-30 07:48:52 +02:00
2017-03-15 09:57:15 +08:00
2017-10-27 10:23:18 +02:00
2017-11-02 09:40:49 +01:00
2017-12-20 10:04:59 +01:00
2018-05-26 08:49:01 +02:00
2016-09-30 10:18:39 +02:00
2016-06-01 12:15:54 -07:00
2017-06-26 07:13:11 +02:00
2017-11-30 08:37:20 +00:00
2018-05-02 07:53:38 -07:00
2018-05-30 07:48:54 +02:00
2018-05-30 07:48:52 +02:00
2018-02-16 20:09:42 +01:00
2018-05-26 08:48:50 +02:00
2015-11-06 17:50:42 -08:00
2018-03-28 18:40:15 +02:00
2018-05-30 07:48:53 +02:00
2018-02-03 17:04:28 +01:00
2018-03-24 10:58:48 +01:00
2018-05-30 07:48:52 +02:00
2018-04-24 09:32:11 +02:00
2015-11-06 17:50:42 -08:00
2018-05-30 07:48:55 +02:00
2018-04-13 19:50:14 +02:00
2018-05-30 07:48:56 +02:00
2017-08-06 19:19:43 -07:00
2018-02-03 17:04:28 +01:00
2015-10-16 11:42:28 -07:00
2018-05-30 07:48:52 +02:00
2017-06-17 06:39:38 +02:00
2015-11-13 20:34:33 -05:00
2017-04-12 12:38:33 +02:00
2015-11-23 21:11:08 -05:00
2015-11-04 22:13:45 -05:00
2018-04-24 09:32:05 +02:00
2018-05-30 07:48:52 +02:00
2018-05-30 07:48:52 +02:00
2018-05-30 07:48:52 +02:00
2018-05-30 07:48:51 +02:00
2016-10-22 12:26:56 +02:00
2015-11-10 12:07:22 -08:00
2017-07-21 07:44:57 +02:00
2017-05-20 14:27:01 +02:00
2017-06-14 13:16:24 +02:00
2018-02-25 11:03:51 +01:00
2018-04-08 11:51:57 +02:00
2017-07-05 14:37:20 +02:00
2015-11-16 23:54:45 -08:00
2018-05-30 07:48:52 +02:00
2017-10-18 09:20:42 +02:00
2017-09-07 08:34:10 +02:00
2017-07-21 07:44:57 +02:00
2018-01-31 12:06:11 +01:00
2016-04-12 09:08:58 -07:00
2015-11-05 23:05:32 -08:00
2018-05-16 10:06:51 +02:00
2018-02-16 20:09:38 +01:00
2015-11-16 23:54:45 -08:00
2018-01-17 09:35:27 +01:00
2015-10-15 10:33:21 -04:00
2017-07-21 07:44:57 +02:00
2017-06-14 13:16:24 +02:00
2018-04-24 09:32:04 +02:00
2018-04-24 09:32:11 +02:00
2018-02-16 20:09:43 +01:00
2017-07-15 11:57:44 +02:00
2018-05-26 08:48:51 +02:00
2017-07-21 07:44:58 +02:00
2017-04-30 05:49:28 +02:00
2017-01-26 08:23:47 +01:00
2016-04-12 09:08:55 -07:00
2017-10-05 09:41:45 +02:00
2018-01-31 12:06:09 +01:00
2017-08-06 19:19:42 -07:00
2017-02-23 17:43:09 +01:00
2017-06-14 13:16:24 +02:00
2018-03-03 10:19:41 +01:00
2015-11-06 17:50:42 -08:00
2017-05-08 07:46:01 +02:00
2017-12-20 10:04:53 +01:00
2016-10-22 12:26:56 +02:00
2017-10-12 11:27:32 +02:00