struct request_queue

来源:互联网 发布:重装ubuntu系统 编辑:程序博客网 时间:2024/05/16 11:52
struct request_queue {/* * Together with queue_head for cacheline sharing */struct list_headqueue_head;struct request*last_merge;struct elevator_queue*elevator;intnr_rqs[2];/* # allocated [a]sync rqs */intnr_rqs_elvpriv;/* # allocated rqs w/ elvpriv *//* * If blkcg is not used, @q->root_rl serves all requests.  If blkcg * is used, root blkg allocates from @q->root_rl and all other * blkgs from their own blkg->rl.  Which one to use should be * determined using bio_request_list(). */struct request_listroot_rl;request_fn_proc*request_fn;make_request_fn*make_request_fn;prep_rq_fn*prep_rq_fn;unprep_rq_fn*unprep_rq_fn;softirq_done_fn*softirq_done_fn;rq_timed_out_fn*rq_timed_out_fn;dma_drain_needed_fn*dma_drain_needed;lld_busy_fn*lld_busy_fn;struct blk_mq_ops*mq_ops;unsigned int*mq_map;/* sw queues */struct blk_mq_ctx __percpu*queue_ctx;unsigned intnr_queues;/* hw dispatch queues */struct blk_mq_hw_ctx**queue_hw_ctx;unsigned intnr_hw_queues;/* * Dispatch queue sorting */sector_tend_sector;struct request*boundary_rq;/* * Delayed queue handling */struct delayed_workdelay_work;struct backing_dev_infobacking_dev_info;/* * The queue owner gets to use this for whatever they like. * ll_rw_blk doesn't touch it. */void*queuedata;/* * various queue flags, see QUEUE_* below */unsigned longqueue_flags;/* * ida allocated id for this queue.  Used to index queues from * ioctx. */intid;/* * queue needs bounce pages for pages above this limit */gfp_tbounce_gfp;/* * protects queue structures from reentrancy. ->__queue_lock should * _never_ be used directly, it is queue private. always use * ->queue_lock. */spinlock_t__queue_lock;spinlock_t*queue_lock;/* * queue kobject */struct kobject kobj;/* * mq queue kobject */struct kobject mq_kobj;#ifdef  CONFIG_BLK_DEV_INTEGRITYstruct blk_integrity integrity;#endif/* CONFIG_BLK_DEV_INTEGRITY */#ifdef CONFIG_PMstruct device*dev;intrpm_status;unsigned intnr_pending;#endif/* * queue settings */unsigned longnr_requests;/* Max # of requests */unsigned intnr_congestion_on;unsigned intnr_congestion_off;unsigned intnr_batching;unsigned intdma_drain_size;void*dma_drain_buffer;unsigned intdma_pad_mask;unsigned intdma_alignment;struct blk_queue_tag*queue_tags;struct list_headtag_busy_list;unsigned intnr_sorted;unsigned intin_flight[2];/* * Number of active block driver functions for which blk_drain_queue() * must wait. Must be incremented around functions that unlock the * queue_lock internally, e.g. scsi_request_fn(). */unsigned intrequest_fn_active;unsigned intrq_timeout;struct timer_listtimeout;struct work_structtimeout_work;struct list_headtimeout_list;struct list_headicq_list;#ifdef CONFIG_BLK_CGROUPDECLARE_BITMAP(blkcg_pols, BLKCG_MAX_POLS);struct blkcg_gq*root_blkg;struct list_headblkg_list;#endifstruct queue_limitslimits;/* * sg stuff */unsigned intsg_timeout;unsigned intsg_reserved_size;intnode;#ifdef CONFIG_BLK_DEV_IO_TRACEstruct blk_trace*blk_trace;#endif/* * for flush operations */struct blk_flush_queue*fq;struct list_headrequeue_list;spinlock_trequeue_lock;struct delayed_workrequeue_work;struct mutexsysfs_lock;intbypass_depth;atomic_tmq_freeze_depth;#if defined(CONFIG_BLK_DEV_BSG)bsg_job_fn*bsg_job_fn;intbsg_job_size;struct bsg_class_device bsg_dev;#endif#ifdef CONFIG_BLK_DEV_THROTTLING/* Throttle data */struct throtl_data *td;#endifstruct rcu_headrcu_head;wait_queue_head_tmq_freeze_wq;struct percpu_refq_usage_counter;struct list_headall_q_node;struct blk_mq_tag_set*tag_set;struct list_headtag_set_list;struct bio_set*bio_split;boolmq_sysfs_init_done;};
                                             
0 0