* [PATCH] null_blk: fix a bug in capacity calculation
@ 2013-10-11 4:14 Shaohua Li
2013-10-11 14:26 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Shaohua Li @ 2013-10-11 4:14 UTC (permalink / raw)
To: linux-kernel, axboe
the capacity calculation is obvious buggy.
Signed-off-by: Shaohua Li <shli@fusionio.com>
---
drivers/block/null_blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: master/drivers/block/null_blk.c
===================================================================
--- master.orig/drivers/block/null_blk.c 2013-10-11 12:08:49.625163094 +0800
+++ master/drivers/block/null_blk.c 2013-10-11 12:08:49.625163094 +0800
@@ -555,7 +555,7 @@ err:
blk_queue_physical_block_size(nullb->q, bs);
size = gb * 1024 * 1024 * 1024ULL;
- size = sector_div(size, bs);
+ sector_div(size, bs);
set_capacity(disk, size);
disk->flags |= GENHD_FL_EXT_DEVT;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-11 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11 4:14 [PATCH] null_blk: fix a bug in capacity calculation Shaohua Li
2013-10-11 14:26 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox