Questions tagged «block-device»

2
如何识别Linux块设备的请求队列
我正在研究通过网络连接硬盘的驱动程序。有一个错误,如果我在计算机上启用了两个或多个硬盘,则只有第一个硬盘可以查看并识别分区。结果是,如果我在hda上有1个分区,而在hdb上有1个分区,那么当我连接hda时,就会有一个可以挂载的分区。因此,hda1在挂载后立即获得blkid xyz123。但是当我继续安装hdb1时,它也出现了相同的blkid,实际上,驱动程序是从hda而不是hdb读取的。 所以我想我找到了司机搞砸的地方。下面是一个调试输出,包括一个dump_stack,我将其放在第一个似乎访问错误设备的位置。 这是代码部分: /*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; …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.