08 Feb, 2008

1 commit

  • Rearrange fields in cache order and initialize some fields that
    we didn't previously init. Remove init of ->completion_data, it's
    part of a union with ->hash. Luckily clearing the rb node is the same
    as setting it to null!

    Signed-off-by: Jens Axboe

    Jens Axboe
     

01 Feb, 2008

2 commits


30 Jan, 2008

1 commit


29 Jan, 2008

2 commits

  • * 'for-2.6.25' of git://git.kernel.dk/linux-2.6-block:
    block: implement drain buffers
    __bio_clone: don't calculate hw/phys segment counts
    block: allow queue dma_alignment of zero
    blktrace: Add blktrace ioctls to SCSI generic devices

    Linus Torvalds
     
  • * 'blk-end-request' of git://git.kernel.dk/linux-2.6-block: (30 commits)
    blk_end_request: changing xsysace (take 4)
    blk_end_request: changing ub (take 4)
    blk_end_request: cleanup of request completion (take 4)
    blk_end_request: cleanup 'uptodate' related code (take 4)
    blk_end_request: remove/unexport end_that_request_* (take 4)
    blk_end_request: changing scsi (take 4)
    blk_end_request: add bidi completion interface (take 4)
    blk_end_request: changing ide-cd (take 4)
    blk_end_request: add callback feature (take 4)
    blk_end_request: changing ide normal caller (take 4)
    blk_end_request: changing cpqarray (take 4)
    blk_end_request: changing cciss (take 4)
    blk_end_request: changing ide-scsi (take 4)
    blk_end_request: changing s390 (take 4)
    blk_end_request: changing mmc (take 4)
    blk_end_request: changing i2o_block (take 4)
    blk_end_request: changing viocd (take 4)
    blk_end_request: changing xen-blkfront (take 4)
    blk_end_request: changing viodasd (take 4)
    blk_end_request: changing sx8 (take 4)
    ...

    Linus Torvalds
     

28 Jan, 2008

10 commits

  • These DMA drain buffer implementations in drivers are pretty horrible
    to do in terms of manipulating the scatterlist. Plus they're being
    done at least in drivers/ide and drivers/ata, so we now have code
    duplication.

    The one use case for this, as I understand it is AHCI controllers doing
    PIO mode to mmc devices but translating this to DMA at the controller
    level.

    So, what about adding a callback to the block layer that permits the
    adding of the drain buffer for the problem devices. The idea is that
    you'd do this in slave_configure after you find one of these devices.

    The beauty of doing it in the block layer is that it quietly adds the
    drain buffer to the end of the sg list, so it automatically gets mapped
    (and unmapped) without anything unusual having to be done to the
    scatterlist in driver/scsi or drivers/ata and without any alteration to
    the transfer length.

    Signed-off-by: James Bottomley
    Signed-off-by: Jens Axboe

    James Bottomley
     
  • Detach task state from ioc, instead keep track of how many processes
    are accessing the ioc.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • This is where it belongs and then it doesn't take up space for a
    process that doesn't do IO.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • This patch converts 'uptodate' arguments of no longer exported
    interfaces, end_that_request_first/last, to 'error', and removes
    internal conversions for it in blk_end_request interfaces.

    Also, this patch removes no longer needed end_io_error().

    Cc: Boaz Harrosh
    Signed-off-by: Kiyoshi Ueda
    Signed-off-by: Jun'ichi Nomura
    Signed-off-by: Jens Axboe

    Kiyoshi Ueda
     
  • This patch removes the following functions:
    o end_that_request_first()
    o end_that_request_chunk()
    and stops exporting the functions below:
    o end_that_request_last()

    Cc: Boaz Harrosh
    Signed-off-by: Kiyoshi Ueda
    Signed-off-by: Jun'ichi Nomura
    Signed-off-by: Jens Axboe

    Kiyoshi Ueda
     
  • This patch adds a variant of the interface, blk_end_bidi_request(),
    which completes a bidi request.

    Bidi request must be completed as a whole, both rq and rq->next_rq
    at once. So the interface has 2 arguments for completion size.

    As for ->end_io, only rq->end_io is called (rq->next_rq->end_io is not
    called). So if special completion handling is needed, the handler
    must be set to rq->end_io.
    And the handler must take care of freeing next_rq too, since
    the interface doesn't care of it if rq->end_io is not NULL.

    Cc: Boaz Harrosh
    Signed-off-by: Kiyoshi Ueda
    Signed-off-by: Jun'ichi Nomura
    Signed-off-by: Jens Axboe

    Kiyoshi Ueda
     
  • This patch adds a variant of the interface, blk_end_request_callback(),
    which has driver callback feature.

    Drivers may need to do special works between end_that_request_first()
    and end_that_request_last().
    For such drivers, blk_end_request_callback() allows it to pass
    a callback function which is called between end_that_request_first()
    and end_that_request_last().

    This interface is only for fallback of other blk_end_request interfaces.
    Drivers should avoid their tricky behaviors and use other interfaces
    as much as possible.

    Currently, only one driver, ide-cd, needs this interface.
    So this interface should/will be removed, after the driver removes
    such tricky behaviors.

    o ide-cd (cdrom_newpc_intr())
    In PIO mode, cdrom_newpc_intr() needs to defer end_that_request_last()
    until the device clears DRQ_STAT and raises an interrupt after
    end_that_request_first().
    So end_that_request_first() and end_that_request_last() are called
    separately in cdrom_newpc_intr().

    This means blk_end_request_callback() has to return without
    completing request even if no leftover in the request.
    To satisfy the requirement, callback function has return value
    so that drivers can tell blk_end_request_callback() to return
    without completing request.

    Signed-off-by: Kiyoshi Ueda
    Signed-off-by: Jun'ichi Nomura
    Signed-off-by: Jens Axboe

    Kiyoshi Ueda
     
  • This patch adds/exports functions to get the size of request in bytes.
    They are useful because blk_end_request interfaces take bytes
    as a completed I/O size instead of sectors.

    Signed-off-by: Kiyoshi Ueda
    Signed-off-by: Jun'ichi Nomura
    Signed-off-by: Jens Axboe

    Kiyoshi Ueda
     
  • This patch adds 2 new interfaces for request completion:
    o blk_end_request() : called without queue lock
    o __blk_end_request() : called with queue lock held

    blk_end_request takes 'error' as an argument instead of 'uptodate',
    which current end_that_request_* take.
    The meanings of values are below and the value is used when bio is
    completed.
    0 : success
    < 0 : error

    Some device drivers call some generic functions below between
    end_that_request_{first/chunk} and end_that_request_last().
    o add_disk_randomness()
    o blk_queue_end_tag()
    o blkdev_dequeue_request()
    These are called in the blk_end_request interfaces as a part of
    generic request completion.
    So all device drivers become to call above functions.
    To decide whether to call blkdev_dequeue_request(), blk_end_request
    uses list_empty(&rq->queuelist) (blk_queued_rq() macro is added for it).
    So drivers must re-initialize it using list_init() or so before calling
    blk_end_request if drivers use it for its specific purpose.
    (Currently, there is no driver which completes request without
    re-initializing the queuelist after used it. So rq->queuelist
    can be used for the purpose above.)

    "Normal" drivers can be converted to use blk_end_request()
    in a standard way shown below.

    a) end_that_request_{chunk/first}
    spin_lock_irqsave()
    (add_disk_randomness(), blk_queue_end_tag(), blkdev_dequeue_request())
    end_that_request_last()
    spin_unlock_irqrestore()
    => blk_end_request()

    b) spin_lock_irqsave()
    end_that_request_{chunk/first}
    (add_disk_randomness(), blk_queue_end_tag(), blkdev_dequeue_request())
    end_that_request_last()
    spin_unlock_irqrestore()
    => spin_lock_irqsave()
    __blk_end_request()
    spin_unlock_irqsave()

    c) spin_lock_irqsave()
    (add_disk_randomness(), blk_queue_end_tag(), blkdev_dequeue_request())
    end_that_request_last()
    spin_unlock_irqrestore()
    => blk_end_request() or spin_lock_irqsave()
    __blk_end_request()
    spin_unlock_irqrestore()

    Signed-off-by: Kiyoshi Ueda
    Signed-off-by: Jun'ichi Nomura
    Signed-off-by: Jens Axboe

    Kiyoshi Ueda
     
  • Let queue_dma_alignment return 0 if it was specifically set to 0.
    This permits devices with no particular alignment restrictions to
    use arbitrary user space buffers without copying.

    Signed-off-by: Pete Wyckoff
    Signed-off-by: Jens Axboe

    Pete Wyckoff
     

27 Jan, 2008

1 commit


26 Jan, 2008

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits)
    [SCSI] usbstorage: use last_sector_bug flag universally
    [SCSI] libsas: abstract STP task status into a function
    [SCSI] ultrastor: clean up inline asm warnings
    [SCSI] aic7xxx: fix firmware build
    [SCSI] aacraid: fib context lock for management ioctls
    [SCSI] ch: remove forward declarations
    [SCSI] ch: fix device minor number management bug
    [SCSI] ch: handle class_device_create failure properly
    [SCSI] NCR5380: fix section mismatch
    [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices
    [SCSI] IB/iSER: add logical unit reset support
    [SCSI] don't use __GFP_DMA for sense buffers if not required
    [SCSI] use dynamically allocated sense buffer
    [SCSI] scsi.h: add macro for enclosure bit of inquiry data
    [SCSI] sd: add fix for devices with last sector access problems
    [SCSI] fix pcmcia compile problem
    [SCSI] aacraid: add Voodoo Lite class of cards.
    [SCSI] aacraid: add new driver features flags
    [SCSI] qla2xxx: Update version number to 8.02.00-k7.
    [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command.
    ...

    Linus Torvalds
     
  • Based on the earlier work by Tejun Heo.

    All users are gone so we can finally remove it.

    Cc: Tejun Heo
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

12 Jan, 2008

1 commit

  • The purpose of this is to allow stacked alignment settings, with the
    ultimate queue alignment being set to the largest alignment requirement
    in the stack.

    The reason for this is so that the SCSI mid-layer can relax the default
    alignment requirements (which are basically causing a lot of superfluous
    copying to go on in the SG_IO interface) while allowing transports,
    devices or HBAs to add stricter limits if they need them.

    Acked-by: Jens Axboe
    Signed-off-by: James Bottomley

    James Bottomley
     

09 Nov, 2007

1 commit


29 Oct, 2007

1 commit

  • For the locking to work, only the tag map and tag bit map may be shared
    (incidentally, I was just explaining this to Nick yesterday, but I
    apparently didn't review the code well enough myself). But we also share
    the busy list! The busy_list must be queue private, or we need a
    block_queue_tag covering lock as well.

    So we have to move the busy_list to the queue. This'll work fine, and
    it'll actually also fix a problem with blk_queue_invalidate_tags() which
    will invalidate tags across all shared queues. This is a bit confusing,
    the low level driver should call it for each queue seperately since
    otherwise you cannot kill tags on just a single queue for eg a hard
    drive that stops responding. Since the function has no callers
    currently, it's not an issue.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

16 Oct, 2007

3 commits


12 Oct, 2007

1 commit


10 Oct, 2007

5 commits

  • The entire function of flush_dry_bio_endio is to undo the effects
    of bio_endio (when called on a barrier request). So remove the
    function and the call to bio_endio.

    This allows us to remove "bi_size" from "struct request_queue".

    Signed-off-by: Neil Brown

    ### Diffstat output
    ./block/ll_rw_blk.c | 39 ++-------------------------------------
    ./include/linux/blkdev.h | 1 -
    2 files changed, 2 insertions(+), 38 deletions(-)

    diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
    Signed-off-by: Jens Axboe

    NeilBrown
     
  • Hide everything in blkdev.h with CONFIG_BLOCK isn't set, and fixup
    the (few) files that fail to build because they were relying on blkdev.h
    pulling in extra includes for them.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • blk_rq_bio_prep is exported for use in exactly
    one place. That place can benefit from using
    the new blk_rq_append_bio instead.
    So
    - change dm-emc to call blk_rq_append_bio
    - stop exporting blk_rq_bio_prep, and
    - initialise rq_disk in blk_rq_bio_prep,
    as dm-emc needs it.

    Signed-off-by: Neil Brown

    diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
    Signed-off-by: Jens Axboe

    NeilBrown
     
  • ll_back_merge_fn is currently exported to SCSI where is it used,
    together with blk_rq_bio_prep, in exactly the same way these
    functions are used in __blk_rq_map_user.

    So move the common code into a new function (blk_rq_append_bio), and
    don't export ll_back_merge_fn any longer.

    Signed-off-by: Neil Brown

    diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
    Signed-off-by: Jens Axboe

    NeilBrown
     
  • Every usage of rq_for_each_bio wraps a usage of
    bio_for_each_segment, so these can be combined into
    rq_for_each_segment.

    We define "struct req_iterator" to hold the 'bio' and 'index' that
    are needed for the double iteration.

    Signed-off-by: Neil Brown

    Various compile fixes by me...

    Signed-off-by: Jens Axboe

    NeilBrown
     

27 Jul, 2007

1 commit


24 Jul, 2007

2 commits


22 Jul, 2007

1 commit


18 Jul, 2007

1 commit

  • The bounce buffer logic is included on systems that do not need it. If a
    system does not have zones like ZONE_DMA and ZONE_HIGHMEM that can lead to
    the use of bounce buffers then there is no need to reserve memory pools etc
    etc. This is true f.e. for SGI Altix.

    Also nicifies the Makefile and gets rid of the tricky "and" there.

    Signed-off-by: Christoph Lameter
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

16 Jul, 2007

4 commits