On 04/04/16 03:00, Hannes Reinecke wrote:
diff --git a/block/blk-settings.c b/block/blk-settings.c
index c7bb666..29fa900 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -630,6 +630,9 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
t->discard_granularity;
}
+ if (b->chunk_sectors)
+ t->chunk_sectors = max(t->chunk_sectors, b->chunk_sectors);
+
return ret;
}
EXPORT_SYMBOL(blk_stack_limits);
Hello Hannes,
My understanding is that a non-zero chunk_sectors value defines a
maximum I/O size. Shouldn't max() be changed into min_not_zero()? From
include/linux/blkdev.h:
static inline unsigned int blk_max_size_offset(struct request_queue *q,
sector_t offset)
{
if (!q->limits.chunk_sectors)
return q->limits.max_sectors;
return q->limits.chunk_sectors -
(offset & (q->limits.chunk_sectors - 1));
}
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html