Files
mirror_zfs/module/zfs
Alexander Motin 5cc1876f14 Add more constraints for block cloning.
- We cannot clone into files with smaller block size if there is
more than one block, since we can not grow the block size.
 - Block size must be power-of-2 if destination offset != 0, since
there can be no multiple blocks of non-power-of-2 size.

The first should handle the case when destination file has several
blocks but still is not bigger than one block of the source file.
The second fixes panic in dmu_buf_hold_array_by_dnode() on attempt
to concatenate files with equal but non-power-of-2 block sizes.

While there, assert that error is reported if we made no progress.

Reviewed-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Reviewed-by: Kay Pedersen <mail@mkwg.de>
Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #15251
2023-09-09 10:22:36 -07:00
..
2023-05-05 09:17:55 -07:00
2022-03-15 15:13:42 -07:00
2023-06-15 10:49:03 -07:00
2022-03-15 15:13:42 -07:00
2023-01-10 13:39:22 -08:00
2023-06-30 09:42:02 -07:00
2023-07-21 11:51:47 -07:00
2023-03-14 15:25:50 -07:00
2023-08-07 13:54:41 -07:00
2023-03-14 15:25:50 -07:00
2023-03-14 15:59:58 -07:00
2023-06-09 10:12:52 -07:00
2022-03-15 15:13:42 -07:00
2022-01-07 10:36:49 -08:00
2022-01-12 16:14:36 -08:00
2023-09-01 18:00:30 -07:00
2019-06-19 09:48:12 -07:00
2022-03-15 15:13:42 -07:00
2023-03-14 15:25:50 -07:00
2023-08-07 13:54:41 -07:00
2023-09-01 18:00:30 -07:00
2023-09-01 18:00:30 -07:00
2023-06-27 09:09:48 -07:00
2023-03-14 15:25:50 -07:00
2023-07-28 13:30:33 -07:00
2023-03-14 15:25:50 -07:00
2023-03-14 15:25:50 -07:00
2022-09-02 13:31:19 -07:00
2023-03-14 15:25:50 -07:00
2023-09-01 17:14:50 -07:00
2022-11-29 09:26:03 -08:00