1. 11 5月, 2009 1 次提交
    • T
      block: add rq->resid_len · c3a4d78c
      Tejun Heo 提交于
      rq->data_len served two purposes - the length of data buffer on issue
      and the residual count on completion.  This duality creates some
      headaches.
      
      First of all, block layer and low level drivers can't really determine
      what rq->data_len contains while a request is executing.  It could be
      the total request length or it coulde be anything else one of the
      lower layers is using to keep track of residual count.  This
      complicates things because blk_rq_bytes() and thus
      [__]blk_end_request_all() relies on rq->data_len for PC commands.
      Drivers which want to report residual count should first cache the
      total request length, update rq->data_len and then complete the
      request with the cached data length.
      
      Secondly, it makes requests default to reporting full residual count,
      ie. reporting that no data transfer occurred.  The residual count is
      an exception not the norm; however, the driver should clear
      rq->data_len to zero to signify the normal cases while leaving it
      alone means no data transfer occurred at all.  This reverse default
      behavior complicates code unnecessarily and renders block PC on some
      drivers (ide-tape/floppy) unuseable.
      
      This patch adds rq->resid_len which is used only for residual count.
      
      While at it, remove now unnecessasry blk_rq_bytes() caching in
      ide_pc_intr() as rq->data_len is not changed anymore.
      
      Boaz	: spotted missing conversion in osd
      Sergei	: spotted too early conversion to blk_rq_bytes() in ide-tape
      
      [ Impact: cleanup residual count handling, report 0 resid by default ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Mike Miller <mike.miller@hp.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Doug Gilbert <dgilbert@interlog.com>
      Cc: Mike Miller <mike.miller@hp.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Darrick J. Wong <djwong@us.ibm.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      c3a4d78c
  2. 14 4月, 2009 1 次提交
  3. 07 4月, 2009 5 次提交
  4. 24 3月, 2009 1 次提交
  5. 05 3月, 2009 1 次提交
  6. 26 2月, 2009 1 次提交
  7. 18 2月, 2009 1 次提交
  8. 29 12月, 2008 2 次提交
  9. 19 12月, 2008 1 次提交
  10. 20 11月, 2008 1 次提交
    • R
      cciss: fix DEBUG printk formats · 9f92f471
      Randy Dunlap 提交于
      Fix printk format warnings when CCISS_DEBUG is defined.
      
      drivers/block/cciss.c:2856: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
      drivers/block/cciss.c:3205: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'
      drivers/block/cciss.c:3236: warning: format '%x' expects type 'unsigned int', but argument 2 has type '__u64'
      drivers/block/cciss.c:3246: warning: format '%x' expects type 'unsigned int', but argument 2 has type '__u64'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Mike Miller <mike.miller@hp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9f92f471
  11. 07 11月, 2008 3 次提交
  12. 21 10月, 2008 3 次提交
    • A
      [PATCH] switch cciss · ef7822c2
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ef7822c2
    • A
      [PATCH] beginning of methods conversion · d4430d62
      Al Viro 提交于
      To keep the size of changesets sane we split the switch by drivers;
      to keep the damn thing bisectable we do the following:
      	1) rename the affected methods, add ones with correct
      prototypes, make (few) callers handle both.  That's this changeset.
      	2) for each driver convert to new methods.  *ALL* drivers
      are converted in this series.
      	3) kill the old (renamed) methods.
      
      Note that it _is_ a flagday; all in-tree drivers are converted and by the
      end of this series no trace of old methods remain.  The only reason why
      we do that this way is to keep the damn thing bisectable and allow per-driver
      debugging if anything goes wrong.
      
      New methods:
      	open(bdev, mode)
      	release(disk, mode)
      	ioctl(bdev, mode, cmd, arg)		/* Called without BKL */
      	compat_ioctl(bdev, mode, cmd, arg)
      	locked_ioctl(bdev, mode, cmd, arg)	/* Called with BKL, legacy */
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d4430d62
    • A
      [PATCH] switch scsi_cmd_ioctl() to passing fmode_t · 74f3c8af
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      74f3c8af
  13. 09 10月, 2008 1 次提交
  14. 06 8月, 2008 6 次提交
  15. 05 7月, 2008 2 次提交
  16. 13 6月, 2008 1 次提交
  17. 01 5月, 2008 1 次提交
  18. 29 4月, 2008 1 次提交
  19. 21 4月, 2008 1 次提交
  20. 11 4月, 2008 1 次提交
  21. 04 3月, 2008 2 次提交
    • M
      cciss: remove READ_AHEAD define and use block layer defaults · 68d95b58
      Mike Miller 提交于
      This patch removes the #define READ_AHEAD 1024 from the driver and uses the
      block layer defaults, instead. We have found that under certain workloads
      the setting can cause a disk connected to the e200 controller to go offline.
      If the disk hiccups the link may try to downshift but the controller is
      never notified that the link successfully completed the renegotiation.
      We've also found that performance using the block layer default of 32 pages
      was on par with the 1024 setting. We tried setting it to zero at one time
      based on info from our firmware guys but that killed performance. Turns out
      we were talking about 2 different read ahead settings.
      Please consider this for inclusion.
      Signed-off-by: NMike Miller <mike.miller@hp.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      68d95b58
    • M
      resubmit: cciss: procfs updates to display info about many · 89b6e743
      Mike Miller 提交于
      volumes
      
      This patch allows us to display information about all of the logical volumes
      configured on a particular controller without stepping on memory even when
      there are many volumes (128 or more) configured.
      Please consider this for inclusion.
      Signed-off-by: NMike Miller <mike.miller@hp.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      89b6e743
  22. 07 2月, 2008 1 次提交
  23. 30 1月, 2008 1 次提交
    • J
      cciss: fix bug in overriding ->data_len before completion · e7d9dc9c
      Jens Axboe 提交于
      For BLOCK_PC requests, we need that length for completing the request.
      Andrew Vasquez <andrew.vasquez@qlogic.com> reported the following
      oops
      
      Hitting a consistent BUG() with recent Linus' linux-2.6.git:
      
      	[   12.941428] ------------[ cut here ]------------
      	[   12.944874] kernel BUG at drivers/block/cciss.c:1260!
      	[   12.944874] invalid opcode: 0000 [1] SMP
      	[   12.944874] CPU 0
      	[   12.944874] Modules linked in:
      	[   12.944874] Pid: 0, comm: swapper Not tainted 2.6.24 #43
      	[   12.944874] RIP: 0010:[<ffffffff8039e43d>]  [<ffffffff8039e43d>] cciss_softirq_done+0xbc/0x1bf
      	[   12.944874] RSP: 0018:ffffffff8063aed0  EFLAGS: 00010202
      	[   12.944874] RAX: 0000000000000001 RBX: ffff8100cf800010 RCX: ffff81042f1253b0
      	[   12.944874] RDX: ffff81042de398f0 RSI: ffff81042de398f0 RDI: 0000000000000001
      	[   12.944874] RBP: ffff81042daa0000 R08: ffff81042f1253b0 R09: 0000000000000001
      	[   12.944874] R10: 00000000000000fe R11: 0000000000000000 R12: 0000000000000002
      	[   12.944874] R13: 0000000000000001 R14: ffff8100cf800000 R15: ffff81042de398f0
      	[   12.944874] FS:  0000000000000000(0000) GS:ffffffff805bb000(0000) knlGS:0000000000000000
      	[   12.944874] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      	[   12.944874] CR2: 00002afed7eea340 CR3: 000000042dbba000 CR4: 00000000000006e0
      	[   12.944874] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      	[   12.944874] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      	[   12.944874] Process swapper (pid: 0, threadinfo ffffffff805f4000, task ffffffff805624a0)
      	[   12.944874] Stack:  0000000000000000 ffffffff8063af10 0000000000000001 ffffffff80632d60
      	[   12.944874]  0000000000000000 000000000000000a ffffffff805bb900 ffffffff8032038f
      	[   12.944874]  ffffffff8063af10 ffffffff8063af10 ffffffff805bb940 ffffffff802346b4
      	[   12.944874] Call Trace:
      	[   12.944874]  <IRQ>  [<ffffffff8032038f>] blk_done_softirq+0x69/0x78
      	[   12.944874]  [<ffffffff802346b4>] __do_softirq+0x6f/0xd8
      	[   12.944874]  [<ffffffff8020c45c>] call_softirq+0x1c/0x30
      	[   12.944874]  [<ffffffff8020e347>] do_softirq+0x30/0x80
      	[   12.944874]  [<ffffffff8020e409>] do_IRQ+0x72/0xd9
      	[   12.944874]  [<ffffffff8020a50a>] mwait_idle+0x0/0x46
      	[   12.944874]  [<ffffffff8020a3da>] default_idle+0x0/0x3d
      	[   12.944874]  [<ffffffff8020b7e1>] ret_from_intr+0x0/0xa
      	[   12.944874]  <EOI>  [<ffffffff8020a54c>] mwait_idle+0x42/0x46
      	[   12.944874]  [<ffffffff8020a481>] cpu_idle+0x6a/0xae
      	[   12.944874]
      	[   12.944874]
      	[   12.944874] Code: 0f 0b eb fe 48 8d 85 d8 c0 00 00 48 89 04 24 48 89 c7 e8 e5
      	[   12.944874] RIP  [<ffffffff8039e43d>] cciss_softirq_done+0xbc/0x1bf
      	[   12.944874]  RSP <ffffffff8063aed0>
      	[   12.944903] ---[ end trace e9c631603f90d22f ]---
      
      which is caused by blk_end_request() returning 'not done' for a request,
      since it gets asked to complete zero bytes.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      e7d9dc9c
  24. 28 1月, 2008 1 次提交
    • K
      blk_end_request: changing cciss (take 4) · 3daeea29
      Kiyoshi Ueda 提交于
      This patch converts cciss to use blk_end_request interfaces.
      Related 'uptodate' arguments are converted to 'error'.
      
      cciss is a little bit different from "normal" drivers.
      cciss directly calls bio_endio() and disk_stat_add()
      when completing request.  But those can be replaced with
      __end_that_request_first().
      After the replacement, request completion procedures of
      those drivers become like the following:
          o end_that_request_first()
          o add_disk_randomness()
          o end_that_request_last()
      This can be converted to blk_end_request() by following
      the rule (a) mentioned in the patch subject
      "[PATCH 01/30] blk_end_request: add new request completion interface".
      
      Cc: Mike Miller <mike.miller@hp.com>
      Signed-off-by: NKiyoshi Ueda <k-ueda@ct.jp.nec.com>
      Signed-off-by: NJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      3daeea29