Commit 63d0b5c
base-files: MAJOR/MINOR not sequential, use DISKSEQ instead
Export the unique, monotonic DISKSEQ sequence drive number instead of its
major/minor numbers to identify the boot disk and directly match the partition
in export_partdevice with PARTN.
The MINOR blockdevice numbers are not guaranteed sequential across disks, it
can happen that disks enumerate before their partitions are probed, resulting
in interleaved MINOR numbers breaking the partition offset calculation:
major minor #blocks name
259 0 250059096 nvme0n1
259 2 8192 nvme0n1p1
259 3 491520 nvme0n1p2
259 4 239 nvme0n1p128
259 1 250059096 nvme1n1
259 5 250057728 nvme1n1p1
Signed-off-by: Clemens Hopfer <openwrt@wireloss.net>
Link: openwrt/openwrt#18962
Signed-off-by: Robert Marko <robimarko@gmail.com>1 parent 45a7dd5 commit 63d0b5c
2 files changed
Lines changed: 10 additions & 10 deletions
File tree
- package/base-files/files/lib/upgrade
- target/linux/stm32/base-files/lib/upgrade
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
| 219 | + | |
221 | 220 | | |
222 | 221 | | |
223 | 222 | | |
224 | 223 | | |
225 | 224 | | |
226 | 225 | | |
227 | 226 | | |
228 | | - | |
229 | | - | |
| 227 | + | |
| 228 | + | |
230 | 229 | | |
231 | 230 | | |
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
235 | | - | |
236 | | - | |
237 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
0 commit comments