块设备学习

先记录几篇博客地址,待日后整理。

http://blog.csdn.net/magic_coder/article/details/7187226

http://blog.csdn.net/wustdatamining/article/details/8283620

http://wenku.baidu.com/view/c8f5dde29b89680203d82574?fr=prin

http://blog.csdn.net/jianchi88/article/details/7212370

http://blog.chinaunix.net/uid-25052030-id-58337.html

device mapped:

http://blog.sina.com.cn/s/blog_6f5549150102v8rh.html

http://blog.csdn.net/yunsongice/article/category/696795/2

http://blog.csdn.net/zhaqiwen/article/details/8284296

 

块设备中的queue

struct request_queue有一个成员是queue_flags,可以置以下位,虽然有解释,但还是不理解。

先列在这吧,以后理解一下,写一个。

#define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */
#define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */
#define QUEUE_FLAG_STOPPED 2 /* queue is stopped */
#define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */
#define QUEUE_FLAG_ASYNCFULL 4 /* write queue has been filled */
#define QUEUE_FLAG_DEAD 5 /* queue being torn down */
#define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */
#define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */
#define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */
#define QUEUE_FLAG_BIDI 9 /* queue supports bidi requests */
#define QUEUE_FLAG_NOMERGES 10 /* disable merge attempts */
#define QUEUE_FLAG_SAME_COMP 11 /* force complete on same CPU */
#define QUEUE_FLAG_FAIL_IO 12 /* fake timeout */
#define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */
#define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */
#define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */
#define QUEUE_FLAG_IO_STAT 15 /* do IO stats */
#define QUEUE_FLAG_CQ 16 /* hardware does queuing */
#define QUEUE_FLAG_DISCARD 17 /* supports DISCARD */

通用块设备

 

scsi块设备

 

posted @ 2015-12-01 21:36  jawfeng  阅读(479)  评论(0编辑  收藏  举报