diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2010-01-11 11:21:48 +0300 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-01-11 16:29:19 +0300 |
commit | dd3d145d49c5816b79acc6761ebbd842bc50b0ee (patch) | |
tree | 107bdb2f46c6aa6bc482909d7ebdbb1da40b7b4f /block | |
parent | fe0b393f2c0a0d23a9bc9ed7dc51a1ee511098bd (diff) | |
download | linux-dd3d145d49c5816b79acc6761ebbd842bc50b0ee.tar.xz |
block: Fix discard alignment calculation and printing
Discard alignment reporting for partitions was incorrect. Update to
match the algorithm used elsewhere.
The alignment can be negative (misaligned). Fix format string
accordingly.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/genhd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c index b11a4ad7d571..d13ba76a169c 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -867,7 +867,7 @@ static ssize_t disk_discard_alignment_show(struct device *dev, { struct gendisk *disk = dev_to_disk(dev); - return sprintf(buf, "%u\n", queue_discard_alignment(disk->queue)); + return sprintf(buf, "%d\n", queue_discard_alignment(disk->queue)); } static DEVICE_ATTR(range, S_IRUGO, disk_range_show, NULL); |