1. 10 6月, 2009 17 次提交
  2. 19 5月, 2009 1 次提交
    • T
      block: set rq->resid_len to blk_rq_bytes() on issue · 5f49f631
      Tejun Heo 提交于
      In commit c3a4d78c, while introducing
      rq->resid_len, the default value of residue count was changed from
      full count to zero.  The conversion was done under the assumption that
      when a request fails residue count wasn't defined.  However, Boaz and
      James pointed out that this wasn't true and the residue count should
      be preserved for failed requests too.
      
      This patchset restores the original behavior by setting rq->resid_len
      to blk_rq_bytes(rq) on request start and restoring explicit clearing
      in affected drivers.  While at it, take advantage of the fact that
      rq->resid_len is set to full count where applicable.
      
      * ide-cd: rq->resid_len cleared on pc success
      
      * mptsas: req->resid_len cleared on success
      
      * sas_expander: rsp/req->resid_len cleared on success
      
      * mpt2sas_transport: req->resid_len cleared on success
      
      * ide-cd, ide-tape, mptsas, sas_host_smp, mpt2sas_transport, ub: take
        advantage of initial full count to simplify code
      
      Boaz Harrosh spotted bug in resid_len initialization.  Fixed as
      suggested.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NBorislav Petkov <petkovbb@googlemail.com>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Darrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      5f49f631
  3. 11 5月, 2009 2 次提交
    • T
      block: cleanup rq->data_len usages · b0790410
      Tejun Heo 提交于
      With recent unification of fields, it's now guaranteed that
      rq->data_len always equals blk_rq_bytes().  Convert all non-IDE direct
      users to accessors.  IDE will be converted in a separate patch.
      
      Boaz: spotted incorrect data_len/resid_len conversion in osd.
      
      [ Impact: convert direct rq->data_len usages to blk_rq_bytes() ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Darrick J. Wong <djwong@us.ibm.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      b0790410
    • 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
  4. 22 4月, 2009 1 次提交
    • E
      scsi: mpt: suppress debugobjects warning · b298cecb
      Eric Paris 提交于
      Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13133
      
      ODEBUG: object is on stack, but not annotated
      ------------[ cut here ]------------
      WARNING: at lib/debugobjects.c:253 __debug_object_init+0x1f3/0x276()
      Hardware name: VMware Virtual Platform
      Modules linked in: mptspi(+) mptscsih mptbase scsi_transport_spi ext3 jbd mbcache
      Pid: 540, comm: insmod Not tainted 2.6.28-mm1 #2
      Call Trace:
       [<c042c51c>] warn_slowpath+0x74/0x8a
       [<c0469600>] ? start_critical_timing+0x96/0xb7
       [<c060c8ea>] ? _spin_unlock_irqrestore+0x2f/0x3c
       [<c0446fad>] ? trace_hardirqs_off_caller+0x18/0xaf
       [<c044704f>] ? trace_hardirqs_off+0xb/0xd
       [<c060c8ea>] ? _spin_unlock_irqrestore+0x2f/0x3c
       [<c042cb84>] ? release_console_sem+0x1a5/0x1ad
       [<c05013e6>] __debug_object_init+0x1f3/0x276
       [<c0501494>] debug_object_init+0x13/0x17
       [<c0433c56>] init_timer+0x10/0x1a
       [<e08e5b54>] mpt_config+0x1c1/0x2b7 [mptbase]
       [<e08e3b82>] ? kmalloc+0x8/0xa [mptbase]
       [<e08e3b82>] ? kmalloc+0x8/0xa [mptbase]
       [<e08e6fa2>] mpt_do_ioc_recovery+0x950/0x1212 [mptbase]
       [<c04496c2>] ? __lock_acquire+0xa69/0xacc
       [<c060c8f1>] ? _spin_unlock_irqrestore+0x36/0x3c
       [<c060c3af>] ? _spin_unlock_irq+0x22/0x26
       [<c04f2d8b>] ? string+0x2b/0x76
       [<c04f310e>] ? vsnprintf+0x338/0x7b3
       [<c04496c2>] ? __lock_acquire+0xa69/0xacc
       [<c060c8ea>] ? _spin_unlock_irqrestore+0x2f/0x3c
       [<c04496c2>] ? __lock_acquire+0xa69/0xacc
       [<c044897d>] ? debug_check_no_locks_freed+0xeb/0x105
       [<c060c8f1>] ? _spin_unlock_irqrestore+0x36/0x3c
       [<c04488bc>] ? debug_check_no_locks_freed+0x2a/0x105
       [<c0446b8c>] ? lock_release_holdtime+0x43/0x48
       [<c043f742>] ? up_read+0x16/0x29
       [<c05076f8>] ? pci_get_slot+0x66/0x72
       [<e08e89ca>] mpt_attach+0x881/0x9b1 [mptbase]
       [<e091c8e5>] mptspi_probe+0x11/0x354 [mptspi]
      
      Noticing that every caller of mpt_config has its CONFIGPARMS struct
      declared on the stack and thus the &pCfg->timer is always on the stack I
      changed init_timer() to init_timer_on_stack() and it seems to have shut
      up.....
      
      Cc: "Moore, Eric Dean" <Eric.Moore@lsil.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Acked-by: N"Desai, Kashyap" <Kashyap.Desai@lsi.com>
      Cc: <stable@kernel.org>		[2.6.29.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b298cecb
  5. 07 4月, 2009 2 次提交
  6. 03 4月, 2009 1 次提交
  7. 22 2月, 2009 1 次提交
  8. 14 1月, 2009 3 次提交
  9. 08 1月, 2009 1 次提交
  10. 03 1月, 2009 1 次提交
  11. 30 12月, 2008 2 次提交
  12. 17 12月, 2008 1 次提交
  13. 04 12月, 2008 1 次提交
  14. 08 11月, 2008 1 次提交
  15. 02 11月, 2008 1 次提交
    • A
      saner FASYNC handling on file close · 233e70f4
      Al Viro 提交于
      As it is, all instances of ->release() for files that have ->fasync()
      need to remember to evict file from fasync lists; forgetting that
      creates a hole and we actually have a bunch that *does* forget.
      
      So let's keep our lives simple - let __fput() check FASYNC in
      file->f_flags and call ->fasync() there if it's been set.  And lose that
      crap in ->release() instances - leaving it there is still valid, but we
      don't have to bother anymore.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      233e70f4
  16. 28 10月, 2008 1 次提交
  17. 24 10月, 2008 1 次提交
  18. 27 7月, 2008 2 次提交