Repository navigation
Conversation
|
Upstream branch: 72d3fcf |
c6537fe to
eebb5bc
Compare
|
Upstream branch: 551c722 |
3bac240 to
7adc579
Compare
eebb5bc to
bbd3af0
Compare
|
Upstream branch: ce1e022 |
7adc579 to
02d52e6
Compare
bbd3af0 to
a9c0b46
Compare
|
Upstream branch: e767a4e |
02d52e6 to
fe7ee4a
Compare
a9c0b46 to
72d0f5e
Compare
|
Upstream branch: a74306e |
fe7ee4a to
0523d24
Compare
72d0f5e to
d980ad5
Compare
|
Upstream branch: None |
0523d24 to
339a162
Compare
d980ad5 to
83b99cc
Compare
|
Upstream branch: 22430ae |
339a162 to
02f3eda
Compare
83b99cc to
9081535
Compare
|
Upstream branch: 69f80fe |
02f3eda to
53068ab
Compare
|
Upstream branch: 7b63ef2 |
53068ab to
ee7bab9
Compare
|
Upstream branch: 58161ea |
5aa9109 to
ba2dce3
Compare
3d027d5 to
90ea7e4
Compare
|
Upstream branch: c03c1a1 |
ba2dce3 to
9954b86
Compare
90ea7e4 to
435b194
Compare
|
Upstream branch: 7be4bc5 |
9954b86 to
b5a35d9
Compare
435b194 to
fd67522
Compare
|
Upstream branch: 17bb0e2 |
b5a35d9 to
0fdfab2
Compare
fd67522 to
3b53a63
Compare
|
Upstream branch: 21a7f44 |
0fdfab2 to
2d2cec1
Compare
3b53a63 to
5d84576
Compare
|
Upstream branch: 6b4b543 |
2d2cec1 to
ac234e4
Compare
5d84576 to
6582ed2
Compare
|
Upstream branch: fb2c3f4 |
ac234e4 to
90e3331
Compare
6582ed2 to
b3a1abc
Compare
|
Upstream branch: d135ab4 |
90e3331 to
35d65a4
Compare
b3a1abc to
712496f
Compare
_badblocks_set(), _badblocks_clear() and badblocks_check() intend to round the start/end of a range to the bb->shift block boundary before operating on the bad-blocks table. They call rounddown()/roundup() as bare statements: rounddown(s, 1 << bb->shift); roundup(next, 1 << bb->shift); sectors = next - s; But rounddown()/roundup() (include/linux/math.h) are value-returning statement-expression macros; they do not modify their argument in place. The results were discarded, so s and next/target were never rounded and "sectors = next - s" collapsed back to the original length. The whole "if (bb->shift)" block was a no-op, and ranges on devices with bb->shift > 0 were stored/queried at raw sector granularity instead of being block-aligned -- exactly the "think a block is not bad when it is" hazard the _badblocks_clear() comment warns about. Assign the rounded values back so the alignment takes effect. Fixes: 3ea3354 ("badblocks: improve badblocks_check() for multiple ranges handling") Fixes: db448eb ("badblocks: improve badblocks_clear() for multiple ranges handling") Fixes: 1726c77 ("badblocks: improve badblocks_set() for multiple ranges handling") Signed-off-by: Li RongQing <lirongqing@baidu.com>
|
Upstream branch: c339f40 |
35d65a4 to
d9426d5
Compare
|
At least one diff in series https://patchwork.kernel.org/series/1176508/ irrelevant now for [{'archived': False, 'project': 241}] search patterns |
Pull request for series with
subject: badblocks: actually round to block boundaries in set/clear/check
version: 1
url: https://patchwork.kernel.org/series/1176508/