Commit ffbc7fe
btrfs: add an ASSERT() to catch ordered extents without datasum
Inside btrfs_finish_one_ordered(), there are only very limited
situations where the OE has no checksum:
- The OE is completely truncated or error happened
In that case no file extent is going to be inserted.
- The inode has NODATASUM flag
- The inode belongs to data reloc tree
Add an ASSERT() using the last two cases, which will help us to catch
problems described in commit 18de34d ("btrfs: truncate ordered
extent when skipping writeback past i_size"), and prevent future similar
cases.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 03406ca commit ffbc7fe
1 file changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3221 | 3221 | | |
3222 | 3222 | | |
3223 | 3223 | | |
| 3224 | + | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
3224 | 3239 | | |
3225 | 3240 | | |
3226 | 3241 | | |
| |||
0 commit comments