1. 12 May, 2009 1 commit
    • Kazuhisa Ichikawa's avatar
      block: fix the bio_vec array index out-of-bounds test · af498d7f
      Kazuhisa Ichikawa authored
      
      Current bio_vec array index out-of-bounds test within
      __end_that_request_first() does not seem correct.
      It checks bio->bi_idx against bio->bi_vcnt, but the subsequent code
      uses idx (which is, bio->bi_idx + next_idx) as the array index into
      bio_vec array. This means that the test really make sense only at
      the first iteration of !(nr_bytes >=bio->bi_size) case (when next_idx
      == zero). Fix this by replacing bio->bi_idx with idx.
      (This patch applies to 2.6.30-rc4.)
      Signed-off-by: default avatarKazuhisa Ichikawa <ki@epsilou.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      af498d7f
  2. 24 Apr, 2009 5 commits
    • Jens Axboe's avatar
      cfq-iosched: cache prio_tree root in cfqq->p_root · f2d1f0ae
      Jens Axboe authored
      
      Currently we look it up from ->ioprio, but ->ioprio can change if
      either the process gets its IO priority changed explicitly, or if
      cfq decides to temporarily boost it. So if we are unlucky, we can
      end up attempting to remove a node from a different rbtree root than
      where it was added.
      
      Fix this by using ->org_ioprio as the prio_tree index, since that
      will only change for explicit IO priority settings (not for a boost).
      Additionally cache the rbtree root inside the cfqq, then we don't have
      to add code to reinsert the cfqq in the prio_tree if IO priority changes.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      f2d1f0ae
    • Jens Axboe's avatar
      cfq-iosched: fix bug with aliased request and cooperation detection · 3ac6c9f8
      Jens Axboe authored
      
      cfq_prio_tree_lookup() should return the direct match, yet it always
      returns zero. Fix that.
      
      cfq_prio_tree_add() assumes that we don't get a direct match, while
      it is very possible that we do. Using O_DIRECT, you can have different
      cfqq with matching requests, since you don't have the page cache
      to serialize things for you. Fix this bug by only adding the cfqq if
      there isn't an existing match.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      3ac6c9f8
    • Jens Axboe's avatar
      cfq-iosched: clear ->prio_trees[] on cfqd alloc · 26a2ac00
      Jens Axboe authored
      
      Not strictly needed, but we should make it clear that we init the
      rbtree roots here.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      26a2ac00
    • Hannes Reinecke's avatar
      block: fix intermittent dm timeout based oops · 17d5c8ca
      Hannes Reinecke authored
      
      Very rarely under stress testing of dm, oopses are occuring as
      something tampers with an old stack frame.  This has been traced back
      to blk_abort_queue() leaving a timeout_list pointing to the stack.
      The reason is that sometimes blk_abort_request() won't delete the
      timer (if the request is marked as complete but before the timer has
      been removed, a small race window).  Fix this by splicing back from
      the ususally empty list to the q->timeout_list.
      Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      17d5c8ca
    • Jerome Marchand's avatar
      block: simplify I/O stat accounting · 42dad764
      Jerome Marchand authored
      
      This simplifies I/O stat accounting switching code and separates it
      completely from I/O scheduler switch code.
      
      Requests are accounted according to the state of their request queue
      at the time of the request allocation. There is no need anymore to
      flush the request queue when switching I/O accounting state.
      Signed-off-by: default avatarJerome Marchand <jmarchan@redhat.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      42dad764
  3. 22 Apr, 2009 6 commits
  4. 15 Apr, 2009 11 commits
  5. 07 Apr, 2009 6 commits
  6. 06 Apr, 2009 4 commits
  7. 03 Apr, 2009 1 commit
    • Li Zefan's avatar
      blktrace: fix pdu_len when tracing packet command requests · e2494e1b
      Li Zefan authored
      Impact: output all of packet commands - not just the first 4 / 8 bytes
      
      Since commit d7e3c324
      
       ("block: add
      large command support"), struct request->cmd has been changed from
      unsinged char cmd[BLK_MAX_CDB] to unsigned char *cmd.
      
      v1 -> v2: by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      
      - make sure rq->cmd_len is always intialized, and then we can use
        rq->cmd_len instead of BLK_MAX_CDB.
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      LKML-Reference: <49D4507E.2060602@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e2494e1b
  8. 26 Mar, 2009 2 commits
  9. 24 Mar, 2009 3 commits
  10. 13 Mar, 2009 1 commit