Commit 00fdf13
Btrfs: fix a crash of clone with inline extents's split
xfstests's btrfs/035 triggers a BUG_ON, which we use to detect the split
of inline extents in __btrfs_drop_extents().
For inline extents, we cannot duplicate another EXTENT_DATA item, because
it breaks the rule of inline extents, that is, 'start offset' needs to be 0.
We have set limitations for the source inode's compressed inline extents,
because it needs to decompress and recompress. Now the destination inode's
inline extents also need similar limitations.
With this, xfstests btrfs/035 doesn't run into panic.
Signed-off-by: Liu Bo <[email protected]>
Signed-off-by: Chris Mason <[email protected]>1 parent 73b802f commit 00fdf13
2 files changed
Lines changed: 18 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
804 | 804 | | |
805 | 805 | | |
806 | 806 | | |
807 | | - | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
808 | 811 | | |
809 | 812 | | |
810 | 813 | | |
| |||
847 | 850 | | |
848 | 851 | | |
849 | 852 | | |
850 | | - | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
851 | 857 | | |
852 | 858 | | |
853 | 859 | | |
| |||
870 | 876 | | |
871 | 877 | | |
872 | 878 | | |
873 | | - | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
874 | 883 | | |
875 | 884 | | |
876 | 885 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3087 | 3087 | | |
3088 | 3088 | | |
3089 | 3089 | | |
3090 | | - | |
3091 | | - | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
3092 | 3093 | | |
3093 | 3094 | | |
3094 | 3095 | | |
| |||
3246 | 3247 | | |
3247 | 3248 | | |
3248 | 3249 | | |
3249 | | - | |
3250 | | - | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
3251 | 3253 | | |
3252 | 3254 | | |
3253 | 3255 | | |
| |||
0 commit comments