提交 89f97ad1 编写于 作者: M Mike Miller 提交者: Jens Axboe

[PATCH] cciss: set default raid level when reading geometry fails

This patch sets a default raid level on a volume that either does not support
reading the geometry or reports an invalid geometry for whatever reason. We
were always setting some values for heads and sectors but never set a raid
level. This caused lots of problems on some buggy firmware. Please consider
this for inclusion.

Thanks,
mikem
Signed-off-by: NMike Miller <mike.miller@hp.com>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 e25db641
...@@ -1907,6 +1907,7 @@ static void cciss_geometry_inquiry(int ctlr, int logvol, ...@@ -1907,6 +1907,7 @@ static void cciss_geometry_inquiry(int ctlr, int logvol,
"does not support reading geometry\n"); "does not support reading geometry\n");
drv->heads = 255; drv->heads = 255;
drv->sectors = 32; // Sectors per track drv->sectors = 32; // Sectors per track
drv->raid_level = RAID_UNKNOWN;
} else { } else {
drv->heads = inq_buff->data_byte[6]; drv->heads = inq_buff->data_byte[6];
drv->sectors = inq_buff->data_byte[7]; drv->sectors = inq_buff->data_byte[7];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册