projects
/
platform
/
upstream
/
libatasmart.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33742d6
)
atasmart: multiply by sector threshold by 1024 to avoid false positives
author
Lennart Poettering
<lennart@poettering.net>
Tue, 11 Oct 2011 21:53:59 +0000
(23:53 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 11 Oct 2011 21:58:35 +0000
(23:58 +0200)
https://bugs.freedesktop.org/show_bug.cgi?id=25772
atasmart.c
patch
|
blob
|
history
diff --git
a/atasmart.c
b/atasmart.c
index
8212059
..
2cd314f
100644
(file)
--- a/
atasmart.c
+++ b/
atasmart.c
@@
-2285,9
+2285,10
@@
int sk_disk_smart_get_overall(SkDisk *d, SkSmartOverall *overall) {
sectors = 0;
} else {
- /* We use log2(n_sectors) as a threshold here. We had to pick
- * something, and this makes a bit of sense, or doesn't it? */
- sector_threshold = u64log2(d->size/512);
+ /* We use log2(n_sectors)*1024 as a threshold here. We
+ * had to pick something, and this makes a bit of
+ * sense, or doesn't it? */
+ sector_threshold = u64log2(d->size/512) * 1024;
if (sectors >= sector_threshold) {
*overall = SK_SMART_OVERALL_BAD_SECTOR_MANY;