26 Jul, 2008

1 commit


22 Jul, 2008

9 commits


16 Jul, 2008

5 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (102 commits)
    [SCSI] scsi_dh: fix kconfig related build errors
    [SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
    [SCSI] scsi_cmnd.h: remove double inclusion of linux/blkdev.h
    [SCSI] make struct scsi_{host,target}_type static
    [SCSI] fix locking in host use of blk_plug_device()
    [SCSI] zfcp: Cleanup external header file
    [SCSI] zfcp: Cleanup code in zfcp_erp.c
    [SCSI] zfcp: zfcp_fsf cleanup.
    [SCSI] zfcp: consolidate sysfs things into one file.
    [SCSI] zfcp: Cleanup of code in zfcp_aux.c
    [SCSI] zfcp: Cleanup of code in zfcp_scsi.c
    [SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
    [SCSI] zfcp: Small QDIO cleanups
    [SCSI] zfcp: Adapter reopen for large number of unsolicited status
    [SCSI] zfcp: Fix error checking for ELS ADISC requests
    [SCSI] zfcp: wait until adapter is finished with ERP during auto-port
    [SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
    [SCSI] sg: Add target reset support
    [SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC
    [SCSI] sd: Move scsi_disk() accessor function to sd.h
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (80 commits)
    ide-floppy: fix unfortunate function naming
    ide-tape: unify idetape_create_read/write_cmd
    ide: add ide_pc_intr() helper
    ide-{floppy,scsi}: read Status Register before stopping DMA engine
    ide-scsi: add more debugging to idescsi_pc_intr()
    ide-scsi: use pc->callback
    ide-floppy: add more debugging to idefloppy_pc_intr()
    ide-tape: always log debug info in idetape_pc_intr() if debugging is enabled
    ide-tape: add ide_tape_io_buffers() helper
    ide-tape: factor out DSC handling from idetape_pc_intr()
    ide-{floppy,tape}: move checking of ->failed_pc to ->callback
    ide: add ide_issue_pc() helper
    ide: add PC_FLAG_DRQ_INTERRUPT pc flag
    ide-scsi: move idescsi_map_sg() call out from idescsi_issue_pc()
    ide: add ide_transfer_pc() helper
    ide-scsi: set drive->scsi flag for devices handled by the driver
    ide-{cd,floppy,tape}: remove checking for drive->scsi
    ide: add PC_FLAG_ZIP_DRIVE pc flag
    ide-tape: factor out waiting for good ireason from idetape_transfer_pc()
    ide-tape: set PC_FLAG_DMA_IN_PROGRESS flag in idetape_transfer_pc()
    ...

    Linus Torvalds
     
  • All the users of blk_end_sync_rq has gone (they are converted to use
    blk_execute_rq). This unexports blk_end_sync_rq.

    Signed-off-by: FUJITA Tomonori
    Cc: Borislav Petkov
    Signed-off-by: Jens Axboe
    Signed-off-by: Bartlomiej Zolnierkiewicz

    FUJITA Tomonori
     
  • Some uses blk_put_request asymmetrically, that is, they uses it with
    requests that not allocated by blk_get_request. As a result,
    blk_put_request has a hack to catch a NULL request_queue. Now such
    callers are fixed (they use blk_get_request properly). So we can
    safely remove the hack in blk_put_request.

    Signed-off-by: FUJITA Tomonori
    Cc: Borislav Petkov
    Signed-off-by: Jens Axboe
    Signed-off-by: Bartlomiej Zolnierkiewicz

    FUJITA Tomonori
     
  • For blk_pm_resume_request() requests (which are used only by IDE subsystem
    currently) the queue is stopped so we need to call ->request_fn explicitly.

    Thanks to:
    - Rafael for reporting/bisecting the bug
    - Borislav/Rafael for testing the fix

    This is a preparation for converting IDE to use blk_execute_rq().

    Cc: FUJITA Tomonori
    Cc: Borislav Petkov
    Cc: Jens Axboe
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

15 Jul, 2008

4 commits

  • * 'core/softirq' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    softirq: remove irqs_disabled warning from local_bh_enable
    softirq: remove initialization of static per-cpu variable
    Remove argument from open_softirq which is always NULL

    Linus Torvalds
     
  • * 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits)
    IB/umad: BKL is not needed for ib_umad_open()
    IB/uverbs: BKL is not needed for ib_uverbs_open()
    bf561-coreb: BKL unneeded for open()
    Call fasync() functions without the BKL
    snd/PCM: fasync BKL pushdown
    ipmi: fasync BKL pushdown
    ecryptfs: fasync BKL pushdown
    Bluetooth VHCI: fasync BKL pushdown
    tty_io: fasync BKL pushdown
    tun: fasync BKL pushdown
    i2o: fasync BKL pushdown
    mpt: fasync BKL pushdown
    Remove BKL from remote_llseek v2
    Make FAT users happier by not deadlocking
    x86-mce: BKL pushdown
    vmwatchdog: BKL pushdown
    vmcp: BKL pushdown
    via-pmu: BKL pushdown
    uml-random: BKL pushdown
    uml-mmapper: BKL pushdown
    ...

    Linus Torvalds
     
  • Jonathan Corbet
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block: (37 commits)
    splice: fix generic_file_splice_read() race with page invalidation
    ramfs: enable splice write
    drivers/block/pktcdvd.c: avoid useless memset
    cdrom: revert commit 22a9189 (cdrom: use kmalloced buffers instead of buffers on stack)
    scsi: sr avoids useless buffer allocation
    block: blk_rq_map_kern uses the bounce buffers for stack buffers
    block: add blk_queue_update_dma_pad
    DAC960: push down BKL
    pktcdvd: push BKL down into driver
    paride: push ioctl down into driver
    block: use get_unaligned_* helpers
    block: extend queue_flag bitops
    block: request_module(): use format string
    Add bvec_merge_data to handle stacked devices and ->merge_bvec()
    block: integrity flags can't use bit ops on unsigned short
    cmdfilter: extend default read filter
    sg: fix odd style (extra parenthesis) introduced by cmd filter patch
    block: add bounce support to blk_rq_map_user_iov
    cfq-iosched: get rid of enable_idle being unused warning
    allow userspace to modify scsi command filter on per device basis
    ...

    Linus Torvalds
     

12 Jul, 2008

2 commits

  • If you do a modremove of any sas driver, you run into an oops on
    shutdown when the host is removed (coming from the host bsg device).
    The root cause seems to be that there's a use after free of the
    bsg_class_device: In bsg_kref_release_function, this is used (to do a
    put_device(bcg->parent) after bcg->release has been called. In sas (and
    possibly many other things) bcd->release frees the queue which contains
    the bsg_class_device, so we get a put_device on unreferenced memory.
    Fix this by taking a copy of the pointer to the parent before releasing
    bsg.

    Acked-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    James Bottomley
     
  • We don't need to hold bsg_mutex during bsg_complete_all_commands(). It
    leads to a problem that we block bsg_unregister_queue during
    bsg_complete_all_commands (untill all the outstanding commands
    complete).

    Thanks to Pete Wyckoff for finding the bug and testing the patch.

    The detailed bug report is:

    http://marc.info/?l=linux-scsi&m=121182137132145&w=2

    Tested-by: Pete Wyckoff
    Signed-off-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     

04 Jul, 2008

2 commits

  • blk_rq_map_kern is used for kernel internal I/Os. Some callers use
    this function with stack buffers but DMA to/from the stack buffers
    leads to memory corruption on a non-coherent platform.

    This patch make blk_rq_map_kern uses the bounce buffers if a caller
    passes a stack buffer (on the all platforms for simplicity).

    Signed-off-by: FUJITA Tomonori
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Thomas Bogendoerfer
    Cc: Tejun Heo
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • This adds blk_queue_update_dma_pad to prevent LLDs from overwriting
    the dma pad mask wrongly (we added blk_queue_update_dma_alignment due
    to the same reason).

    This also converts libata to use blk_queue_update_dma_pad instead of
    blk_queue_dma_pad.

    Signed-off-by: FUJITA Tomonori
    Cc: Tejun Heo
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Thomas Bogendoerfer
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     

03 Jul, 2008

14 commits


01 Jul, 2008

1 commit

  • AS scheduler alternates between issuing read and write batches. It does
    the batch switch only after all requests from the previous batch are
    completed.

    When switching to a write batch, if there is an on-going read request,
    it waits for its completion and indicates its intention of switching by
    setting ad->changed_batch and the new direction but does not update the
    batch_expire_time for the new write batch which it does in the case of
    no previous pending requests.
    On completion of the read request, it sees that we were waiting for the
    switch and schedules work for kblockd right away and resets the
    ad->changed_data flag.
    Now when kblockd enters dispatch_request where it is expected to pick
    up a write request, it in turn ends the write batch because the
    batch_expire_timer was not updated and shows the expire timestamp for
    the previous batch.

    This results in the write starvation for all the cases where there is
    the intention for switching to a write batch, but there is a previous
    in-flight read request and the batch gets reverted to a read_batch
    right away.

    This also holds true in the reverse case (switching from a write batch
    to a read batch with an in-flight write request).

    I've checked that this bug exists on 2.6.11, 2.6.18, 2.6.24 and
    linux-2.6-block git HEAD. I've tested the fix on x86 platforms with
    SCSI drives where the driver asks for the next request while a current
    request is in-flight.

    This patch is based off linux-2.6-block git HEAD.

    Bug reproduction:
    A simple scenario which reproduces this bug is:
    - dd if=/dev/hda3 of=/dev/null &
    - lilo
    The lilo takes forever to complete.

    This can also be reproduced fairly easily with the earlier dd and
    another test
    program doing msync().

    The example test program below should print out a message after every
    iteration
    but it simply hangs forever. With this bugfix it makes forward progress.

    ====
    Example test program using msync() (thanks to suleiman AT google DOT
    com)

    inline uint64_t
    rdtsc(void)
    {
    int64_t tsc;

    __asm __volatile("rdtsc" : "=A" (tsc));
    return (tsc);
    }

    int
    main(int argc, char **argv)
    {
    struct stat st;
    uint64_t e, s, t;
    char *p, q;
    long i;
    int fd;

    if (argc < 2) {
    printf("Usage: %s \n", argv[0]);
    return (1);
    }

    if ((fd = open(argv[1], O_RDWR | O_NOATIME)) < 0)
    err(1, "open");

    if (fstat(fd, &st) < 0)
    err(1, "fstat");

    p = mmap(NULL, st.st_size, PROT_READ | PROT_WRITE,
    MAP_SHARED, fd, 0);

    t = 0;
    for (i = 0; i < 1000; i++) {
    *p = 0;
    msync(p, 4096, MS_SYNC);
    s = rdtsc();
    *p = 0;
    __asm __volatile(""::: "memory");
    e = rdtsc();
    if (argc > 2)
    printf("%d: %lld cycles %jd %jd\n",
    i, e - s, (intmax_t)s, (intmax_t)e);
    t += e - s;
    }
    printf("average time: %lld cycles\n", t / 1000);
    return (0);
    }

    Cc:
    Acked-by: Nick Piggin
    Signed-off-by: Jens Axboe

    Divyesh Shah
     

16 Jun, 2008

1 commit


13 Jun, 2008

1 commit