bcache: writeback rate clamping: make 32 bit safe
Subsystems (2)
PATCH 1/1 bcache: writeback rate clamping: make 32 bit safe
Sorry this got through to linux-block, was detected by the kbuilds test robot. NSEC_PER_SEC is a long constant; 2.5 * 10^9 doesn't fit in a signed long constant.
--- drivers/md/bcache/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/bcache/util.c +2 -2
@@ -238,8 +238,8 @@ uint64_t bch_next_delay(struct bch_ratelimit *d, uint64_t done)* don't let us sleep more than 2.5 seconds (so we can notice/respond * if the control system tells us to speed up!). */ -if (time_before64 (now +NSEC_PER_SEC *5 /2 , d->next)) - d->next = now +NSEC_PER_SEC *5 /2 ; +if (time_before64 (now +NSEC_PER_SEC *5LLU /2LLU , d->next)) + d->next = now +NSEC_PER_SEC *5LLU /2LLU ;if (time_after64 (now -NSEC_PER_SEC *2 , d->next)) d->next = now -NSEC_PER_SEC *2 ;
Signature · 1 line
2.11.0
Quoted 5 lines · Michael Lyle
Sorry this got through to linux-block, was detected by the kbuilds test robot.
NSEC_PER_SECis a long constant; 2.5 * 10^9 doesn't fit in a signed long constant.Signed-off-by Michael Lyle <[email protected]>
I forgot i386 config... sorry too...
Thanks to Michael for the fix.
Coly Li
Quoted 19 lines
--- drivers/md/bcache/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/md/bcache/util.c +2
-2@@ -238,8 +238,8 @@ uint64_t bch_next_delay(struct bch_ratelimit *d, uint64_t done)* don't let us sleep more than 2.5 seconds (so we can notice/respond * if the control system tells us to speed up!). */ -if (time_before64 (now +NSEC_PER_SEC *5 /2 , d->next)) - d->next = now +NSEC_PER_SEC *5 /2 ; +if (time_before64 (now +NSEC_PER_SEC *5LLU /2LLU , d->next)) + d->next = now +NSEC_PER_SEC *5LLU /2LLU ;if (time_after64 (now -NSEC_PER_SEC *2 , d->next)) d->next = now -NSEC_PER_SEC *2 ;
Quoted 3 lines · Michael Lyle
Sorry this got through to linux-block, was detected by the kbuilds test robot.
NSEC_PER_SECis a long constant; 2.5 * 10^9 doesn't fit in a signed long constant.
Applied, but you should remember to add Fixes lines when a patch explicitly fixes a problem introduced by a previous patch. Ala:
so that backports have an easier time finding dependent fixes.
Signature · 1 line
Jens Axboe
Jens--
Thanks for your patience.
Quoted 11 lines · Jens Axboe
Quoted 3 lines · Michael Lyle
Sorry this got through to linux-block, was detected by the kbuilds test robot.
NSEC_PER_SECis a long constant; 2.5 * 10^9 doesn't fit in a signed long constant.Applied, but you should remember to add Fixes lines when a patch explicitly fixes a problem introduced by a previous patch. Ala:
Fixes e41166c5c44e ("bcache: writeback rate shouldn't artifically clamp")so that backports have an easier time finding dependent fixes.
Sorry about that too. I considered the Fixes: tag but didn't know if the hashes would "hold true" into mainline. Now I see Linus merges your tree so the hash should be durable.
Quoted 4 lines
--
Jens Axboe
Mike
Jens Axboe
maintainerQuoted 13 lines · Michael Lyle
Jens--
Thanks for your patience.
Quoted 8 lines · Jens Axboe
Quoted 3 lines · Michael Lyle
Sorry this got through to linux-block, was detected by the kbuilds test robot.
NSEC_PER_SECis a long constant; 2.5 * 10^9 doesn't fit in a signed long constant.Applied, but you should remember to add Fixes lines when a patch explicitly fixes a problem introduced by a previous patch. Ala:
Quoted 7 lines
Quoted 3 lines
Fixes e41166c5c44e ("bcache: writeback rate shouldn't artifically clamp")so that backports have an easier time finding dependent fixes.
Sorry about that too. I considered the Fixes: tag but didn't know if the hashes would "hold true" into mainline. Now I see Linus merges your tree so the hash should be durable.
They are durable once applied, so yeah.
Signature · 1 line
Jens Axboe