Commit 68e0fcc
btrfs: assert we can NOCOW the range in btrfs_truncate_block()
We call btrfs_check_nocow_lock() to see if we can NOCOW a block sized
range but we don't check later if we can NOCOW the whole range.
It's unexpected to be able to NOCOW a range smaller than blocksize, so
add an assertion to check the NOCOW range matches the blocksize.
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent c6482cf commit 68e0fcc
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4847 | 4847 | | |
4848 | 4848 | | |
4849 | 4849 | | |
4850 | | - | |
4851 | 4850 | | |
4852 | 4851 | | |
4853 | 4852 | | |
| |||
4899 | 4898 | | |
4900 | 4899 | | |
4901 | 4900 | | |
| 4901 | + | |
| 4902 | + | |
4902 | 4903 | | |
4903 | | - | |
| 4904 | + | |
| 4905 | + | |
| 4906 | + | |
4904 | 4907 | | |
4905 | 4908 | | |
4906 | 4909 | | |
| |||
0 commit comments