#freeze
*参照元 [#a8ae3579]
#backlinks

*説明 [#m8fbfa66]
-パス: [[linux-2.6.25/include/linux/blkdev.h]]

-FIXME: これは何?
--説明


**参考 [#r71b24a9]


*実装 [#uc366598]
 struct request {
         struct list_head queuelist;
         struct list_head donelist;
 
         struct request_queue *q;
 
         unsigned int cmd_flags;
         enum rq_cmd_type_bits cmd_type;
 
         /* Maintain bio traversal state for part by part I/O submission.
          * hard_* are block layer internals, no driver should touch them!
          */
 
         sector_t sector;                /* next sector to submit */
         sector_t hard_sector;           /* next sector to complete */
         unsigned long nr_sectors;       /* no. of sectors left to submit */
         unsigned long hard_nr_sectors;  /* no. of sectors left to complete */
         /* no. of sectors left to submit in the current segment */
         unsigned int current_nr_sectors;
 
         /* no. of sectors left to complete in the current segment */
         unsigned int hard_cur_sectors;
 
         struct bio *bio;
         struct bio *biotail;
 
         struct hlist_node hash; /* merge hash */
         /*
          * The rb_node is only used inside the io scheduler, requests
          * are pruned when moved to the dispatch queue. So let the
          * completion_data share space with the rb_node.
          */
         union {
                 struct rb_node rb_node; /* sort/lookup */
                 void *completion_data;
         };
 
         /*
          * two pointers are available for the IO schedulers, if they need
          * more they have to dynamically allocate it.
          */
         void *elevator_private;
         void *elevator_private2;
 
         struct gendisk *rq_disk;
         unsigned long start_time;
 
         /* Number of scatter-gather DMA addr+len pairs after
          * physical address coalescing is performed.
          */
         unsigned short nr_phys_segments;
 
         /* Number of scatter-gather addr+len pairs after
          * physical and DMA remapping hardware coalescing is performed.
          * This is the number of scatter-gather entries the driver
          * will actually have to deal with after DMA mapping is done.
          */
         unsigned short nr_hw_segments;
 
         unsigned short ioprio;
 
         void *special;
         char *buffer;
 
         int tag;
         int errors;
 
         int ref_count;
 
         /*
          * when request is used as a packet command carrier
          */
         unsigned int cmd_len;
         unsigned char cmd[BLK_MAX_CDB];
 
         unsigned int data_len;
         unsigned int extra_len; /* length of alignment and padding */
         unsigned int sense_len;
         void *data;
         void *sense;
 
         unsigned int timeout;
         int retries;
 
         /*
          * completion callback.
          */
         rq_end_io_fn *end_io;
         void *end_io_data;
 
         /* for bidi */
         struct request *next_rq;
 };


*コメント [#w9c88c62]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS