Commit 001e85c
committed
mkdumprd: basic support for btrfs subvol
The kdump scripts previously could not correctly handle cases where the
dump target was located on a btrfs subvolume. The logic for finding
the mount point did not account for the way subvolumes are represented,
leading to failures in identifying the target device and checking for
available space.
This patch introduces support for btrfs subvolumes by:
1. Adding a new helper function `get_btrfs_subvol_from_mntopt` to
extract the subvolume name from mount options.
2. Modifying `get_mntpoint_from_target` to accept a subvolume
name. When a subvolume is provided, it correctly identifies the
mount point by looking for the source entry that includes the
subvolume name (e.g., `/dev/sda1[/subvol]`).
3. Updating various functions in `mkdumprd`, `kdump-lib.sh`, and the
dracut module setup scripts to detect if the target is on a btrfs
filesystem, parse the subvolume, and pass it to the relevant
functions for mount point resolution and free space checks.
This ensures that kdump can now be reliably configured with a dump
target located on a btrfs subvolume.
Signed-off-by: Lichen Liu <[email protected]>1 parent d70f205 commit 001e85c
File tree
4 files changed
+46
-22
lines changed- dracut/99kdumpbase
4 files changed
+46
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
| 686 | + | |
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
693 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
694 | 700 | | |
695 | | - | |
696 | 701 | | |
697 | 702 | | |
698 | 703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
121 | 133 | | |
122 | 134 | | |
123 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | 214 | | |
217 | 215 | | |
218 | | - | |
219 | | - | |
220 | | - | |
| 216 | + | |
221 | 217 | | |
222 | 218 | | |
| 219 | + | |
| 220 | + | |
223 | 221 | | |
224 | 222 | | |
225 | 223 | | |
| |||
230 | 228 | | |
231 | 229 | | |
232 | 230 | | |
| 231 | + | |
233 | 232 | | |
234 | 233 | | |
235 | 234 | | |
236 | 235 | | |
237 | | - | |
| 236 | + | |
238 | 237 | | |
239 | 238 | | |
240 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| |||
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
149 | | - | |
| 152 | + | |
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
| |||
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| |||
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
175 | | - | |
| 179 | + | |
176 | 180 | | |
177 | 181 | | |
178 | 182 | | |
| |||
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
305 | | - | |
306 | | - | |
| 309 | + | |
307 | 310 | | |
308 | 311 | | |
309 | 312 | | |
310 | 313 | | |
311 | 314 | | |
312 | 315 | | |
| 316 | + | |
313 | 317 | | |
314 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
315 | 322 | | |
| 323 | + | |
316 | 324 | | |
317 | | - | |
318 | | - | |
| 325 | + | |
| 326 | + | |
319 | 327 | | |
320 | 328 | | |
321 | 329 | | |
| |||
0 commit comments