1. 17 10月, 2007 1 次提交
  2. 16 10月, 2007 7 次提交
  3. 13 10月, 2007 1 次提交
  4. 10 10月, 2007 10 次提交
  5. 15 9月, 2007 1 次提交
  6. 13 9月, 2007 1 次提交
    • J
      Fix race with shared tag queue maps · f3da54ba
      Jens Axboe 提交于
      There's a race condition in blk_queue_end_tag() for shared tag maps,
      users include stex (promise supertrak thingy) and qla2xxx.  The former
      at least has reported bugs in this area, not sure why we haven't seen
      any for the latter.  It could be because the window is narrow and that
      other conditions in the qla2xxx code hide this.  It's a real bug,
      though, as the stex smp users can attest.
      
      We need to ensure two things - the tag bit clearing needs to happen
      AFTER we cleared the tag pointer, as the tag bit clearing/setting is
      what protects this map.  Secondly, we need to ensure that the visibility
      of the tag pointer and tag bit clear are ordered properly.
      
      [ I removed the SMP barriers - "test_and_clear_bit()" already implies
        all the required barriers.  -- Linus ]
      
      Also see http://bugzilla.kernel.org/show_bug.cgi?id=7842Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f3da54ba
  7. 12 8月, 2007 1 次提交
  8. 24 7月, 2007 1 次提交
  9. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  10. 18 7月, 2007 1 次提交
  11. 16 7月, 2007 4 次提交
  12. 10 7月, 2007 2 次提交
    • T
      [BLOCK] drop unnecessary bvec rewinding from flush_dry_bio_endio · f4b09303
      Tejun Heo 提交于
      Barrier bios are completed twice - once after the barrier write itself
      is done and again after the whole sequence is complete.
      flush_dry_bio_endio() is for the first completion.  It doesn't really
      complete the bio.  It rewinds bvec and resets bio so that it can be
      completed again when the whole barrier sequence is complete.
      
      The bvec rewinding code has the following problems.
      
      1. The rewinding code is wrong because filesystems may pass bvec with
         non zero bv_offset.
      
      2. The block layer doesn't guarantee anything about the state of
         bvec array on request completion.  bv_offset and len are updated
         iff __end_that_request_first() completes the bvec partially.
      
      Because of #2, #1 doesn't really matter (nobody cares whether bvec is
      re-wound correctly or not) but then again by not doing unwinding at
      all, we'll always give back the same bvec to the caller as full bvec
      completion doesn't alter bvecs and the final completion is always full
      completion.
      
      Drop unnecessary rewinding code.
      
      This is spotted by Neil Brown.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      f4b09303
    • J
      blk_hw_contig_segment(): bad segment size checks · 32eef964
      Jens Axboe 提交于
      Two bugs in there:
      
      - The virt oversize check should use the current bio hardware back
        size and the next bio front size, not the same bio. Spotted by
        Neil Brown.
      
      - The segment size check should add hw front sizes, not total bio
        sizes. Spotted by James Bottomley
      Acked-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      Acked-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      32eef964
  13. 16 6月, 2007 1 次提交
    • T
      block: always requeue !fs requests at the front · bc90ba09
      Tejun Heo 提交于
      SCSI marks internal commands with REQ_PREEMPT and push it at the front
      of the request queue using blk_execute_rq().  When entering suspended
      or frozen state, SCSI devices are quiesced using
      scsi_device_quiesce().  In quiesced state, only REQ_PREEMPT requests
      are processed.  This is how SCSI blocks other requests out while
      suspending and resuming.  As all internal commands are pushed at the
      front of the queue, this usually works.
      
      Unfortunately, this interacts badly with ordered requeueing.  To
      preserve request order on requeueing (due to busy device, active EH or
      other failures), requests are sorted according to ordered sequence on
      requeue if IO barrier is in progress.
      
      The following sequence deadlocks.
      
      1. IO barrier sequence issues.
      
      2. Suspend requested.  Queue is quiesced with part or all of IO
         barrier sequence at the front.
      
      3. During suspending or resuming, SCSI issues internal command which
         gets deferred and requeued for some reason.  As the command is
         issued after the IO barrier in #1, ordered requeueing code puts the
         request after IO barrier sequence.
      
      4. The device is ready to process requests again but still is in
         quiesced state and the first request of the queue isn't
         REQ_PREEMPT, so command processing is deadlocked -
         suspending/resuming waits for the issued request to complete while
         the request can't be processed till device is put back into
         running state by resuming.
      
      This can be fixed by always putting !fs requests at the front when
      requeueing.
      
      The following thread reports this deadlock.
      
        http://thread.gmane.org/gmane.linux.kernel/537473Signed-off-by: NTejun Heo <htejun@gmail.com>
      Acked-by: NDavid Greaves <david@dgreaves.com>
      Acked-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bc90ba09
  14. 16 5月, 2007 1 次提交
  15. 11 5月, 2007 1 次提交
    • N
      When stacked block devices are in-use (e.g. md or dm), the recursive calls · d89d8796
      Neil Brown 提交于
      to generic_make_request can use up a lot of space, and we would rather they
      didn't.
      
      As generic_make_request is a void function, and as it is generally not
      expected that it will have any effect immediately, it is safe to delay any
      call to generic_make_request until there is sufficient stack space
      available.
      
      As ->bi_next is reserved for the driver to use, it can have no valid value
      when generic_make_request is called, and as __make_request implicitly
      assumes it will be NULL (ELEVATOR_BACK_MERGE fork of switch) we can be
      certain that all callers set it to NULL.  We can therefore safely use
      bi_next to link pending requests together, providing we clear it before
      making the real call.
      
      So, we choose to allow each thread to only be active in one
      generic_make_request at a time.  If a subsequent (recursive) call is made,
      the bio is linked into a per-thread list, and is handled when the active
      call completes.
      
      As the list of pending bios is per-thread, there are no locking issues to
      worry about.
      
      I say above that it is "safe to delay any call...".  There are, however,
      some behaviours of a make_request_fn which would make it unsafe.  These
      include any behaviour that assumes anything will have changed after a
      recursive call to generic_make_request.
      
      These could include:
       - waiting for that call to finish and call it's bi_end_io function.
         md use to sometimes do this (marking the superblock dirty before
         completing a write) but doesn't any more
       - inspecting the bio for fields that generic_make_request might
         change, such as bi_sector or bi_bdev.  It is hard to see a good
         reason for this, and I don't think anyone actually does it.
       - inspecing the queue to see if, e.g. it is 'full' yet.  Again, I
         think this is very unlikely to be useful, or to be done.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: <dm-devel@redhat.com>
      
      Alasdair G Kergon <agk@redhat.com> said:
      
       I can see nothing wrong with this in principle.
      
       For device-mapper at the moment though it's essential that, while the bio
       mappings may now get delayed, they still get processed in exactly
       the same order as they were passed to generic_make_request().
      
       My main concern is whether the timing changes implicit in this patch
       will make the rare data-corrupting races in the existing snapshot code
       more likely. (I'm working on a fix for these races, but the unfinished
       patch is already several hundred lines long.)
      
       It would be helpful if some people on this mailing list would test
       this patch in various scenarios and report back.
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      d89d8796
  16. 10 5月, 2007 3 次提交
  17. 09 5月, 2007 2 次提交
  18. 30 4月, 2007 1 次提交