Qu Wenruo
e98bf64f7a
btrfs: add extra sanity checks for create_io_em()
...
The function create_io_em() is called before we submit an IO, to update
the in-memory extent map for the involved range.
This patch changes the following aspects:
- Does not allow BTRFS_ORDERED_NOCOW type
For real NOCOW (excluding NOCOW writes into preallocated ranges)
writes, we never call create_io_em(), as we does not need to update
the extent map at all.
So remove the sanity check allowing BTRFS_ORDERED_NOCOW type.
- Add extra sanity checks
* PREALLOC
- @block_len == len
For uncompressed writes.
* REGULAR
- @block_len == @orig_block_len == @ram_bytes == @len
We're creating a new uncompressed extent, and referring all of it.
- @orig_start == @start
We haven no offset inside the extent.
* COMPRESSED
- valid @compress_type
- @len <= @ram_bytes
This is to co-operate with encoded writes, which can cause a new
file extent referring only part of a uncompressed extent.
Reviewed-by: Filipe Manana <fdmanana@suse.com >
Signed-off-by: Qu Wenruo <wqu@suse.com >
Reviewed-by: David Sterba <dsterba@suse.com >
Signed-off-by: David Sterba <dsterba@suse.com >
2024-05-07 21:31:08 +02:00
..
2024-05-07 21:31:07 +02:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:52 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:53 +01:00
2024-03-04 16:24:52 +01:00
2024-03-04 16:24:49 +01:00
2024-03-26 16:42:39 +01:00
2024-03-05 17:13:23 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:07 +02:00
2024-05-07 21:31:06 +02:00
2024-05-07 21:31:02 +02:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:53 +01:00
2024-05-07 21:31:05 +02:00
2024-05-07 21:31:05 +02:00
2024-03-12 12:28:34 -07:00
2024-03-04 16:24:49 +01:00
2023-10-12 16:44:07 +02:00
2024-03-04 16:24:49 +01:00
2023-06-19 13:59:25 +02:00
2023-06-19 13:59:25 +02:00
2024-05-07 21:31:07 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:07 +02:00
2024-05-07 21:31:07 +02:00
2024-05-07 21:31:07 +02:00
2024-05-07 21:31:08 +02:00
2024-05-07 21:31:01 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:08 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:08 +02:00
2024-05-07 21:31:03 +02:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-03-05 17:13:23 +01:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:48 +01:00
2024-03-04 16:24:49 +01:00
2023-02-13 17:50:35 +01:00
2024-05-07 21:31:06 +02:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:08 +02:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2023-10-12 16:44:05 +02:00
2024-05-07 21:31:06 +02:00
2024-05-07 21:31:00 +02:00
2023-12-15 23:00:04 +01:00
2024-03-04 16:24:53 +01:00
2024-05-07 21:31:02 +02:00
2023-10-12 16:44:09 +02:00
2024-04-18 01:46:35 +02:00
2023-12-15 20:27:02 +01:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2023-10-12 16:44:11 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:08 +02:00
2024-03-05 17:13:24 +01:00
2024-03-04 16:24:52 +01:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:05 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:08 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-04-02 19:18:23 +02:00
2024-04-18 01:46:47 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-03-05 17:13:23 +01:00
2024-03-05 17:13:23 +01:00
2024-05-07 21:31:07 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:07 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:08 +02:00
2024-03-04 16:24:52 +01:00
2024-05-07 21:31:07 +02:00
2024-05-02 22:11:13 +02:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:53 +01:00
2024-05-07 21:31:06 +02:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:48 +01:00
2024-03-04 16:24:49 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:03 +02:00
2024-05-07 21:31:03 +02:00
2024-05-07 21:31:00 +02:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:02 +02:00
2024-03-27 13:56:41 -07:00
2024-03-04 16:24:49 +01:00
2024-05-07 21:31:02 +02:00