1. 17 7月, 2009 3 次提交
    • X
      block: sysfs fix mismatched queue_var_{store,show} in 64bit kernel · 9cb308ce
      Xiaotian Feng 提交于
      In blk-sysfs.c, queue_var_store uses unsigned long to store data,
      but queue_var_show uses unsigned int to show data.  This causes,
      
      	# echo 70000000000 > /sys/block/<dev>/queue/read_ahead_kb
      	# cat /sys/block/<dev>/queue/read_ahead_kb => get wrong value
      
      Fix it by using unsigned long.
      
      While at it, convert queue_rq_affinity_show() such that it uses bool
      variable instead of explicit != 0 testing.
      Signed-off-by: NXiaotian Feng <dfeng@redhat.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      9cb308ce
    • J
      ataflop: adjust NULL test · 8f474287
      Julia Lawall 提交于
      dtp is derefenced on the lines above the test !dtp, and so it cannot be
      NULL at this point.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r@
      expression x,E,E1;
      identifier f,l;
      position p1,p2;
      @@
      
      *x@p1->f = E1;
      ... when != x = E
          when != goto l;
      (
      *x@p2 == NULL
      |
      *x@p2 != NULL
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      8f474287
    • T
      block: fix failfast merge testing in elv_rq_merge_ok() · 0a09f431
      Tejun Heo 提交于
      Commit ab0fd1de tries to prevent merge
      of requests with different failfast settings.  In elv_rq_merge_ok(),
      it compares new bio's failfast flags against the merge target
      request's.  However, the flag testing accessors for bio and blk don't
      return boolean but the tested bit value directly and FAILFAST on bio
      and blk don't match, so directly comparing them with == results in
      false negative unnecessary preventing merge of readahead requests.
      
      This patch convert the results to boolean by negating them before
      comparison.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      0a09f431
  2. 15 7月, 2009 1 次提交
  3. 11 7月, 2009 4 次提交
  4. 10 7月, 2009 15 次提交
  5. 09 7月, 2009 17 次提交