Commit b4b8be0
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 <[email protected]>
Signed-off-by: David Sterba <[email protected]>1 parent 3604a8b commit b4b8be0
1 file changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3282 | 3282 | | |
3283 | 3283 | | |
3284 | 3284 | | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
3285 | 3300 | | |
3286 | 3301 | | |
3287 | 3302 | | |
| |||
0 commit comments