Tag: 块设备

我怎样才能确定一个Linux块设备的请求队列

我正在通过networking连接硬盘的这个驱动程序。 有一个错误,如果我启用计算机上的两个或更多硬盘,只有第一个获取分区查看和识别。 结果是,如果我有hda上的1个分区和hdb上的1个分区,只要我连接hda,就有一个可以挂载的分区。 所以hda1一旦挂载就会得到一个blyid xyz123。 但是当我继续安装hdb1时,它也出现了相同的blkid,事实上,驱动程序正在从hda读取它,而不是hdb。 所以我觉得我find了司机弄乱的地方。 下面是一个包含dump_stack的debugging输出,我把它放在第一个看起来正在访问错误设备的地方。 这是代码部分: /*basically, this is just the request_queue processor. In the log output that follows, the second device, (hdb) has just been connected, right after hda was connected and hda1 was mounted to the system. */ void nblk_request_proc(struct request_queue *q) { struct request *req; ndas_error_t err = NDAS_OK; […]