02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

01 Sep, 2017

1 commit

  • This patch avoids that sparse reports the following warning messages:

    block/compat_ioctl.c:85:11: warning: incorrect type in assignment (different address spaces)
    block/compat_ioctl.c:85:11: expected unsigned long *[noderef] p
    block/compat_ioctl.c:85:11: got void [noderef] *
    block/compat_ioctl.c:91:21: warning: incorrect type in argument 1 (different address spaces)
    block/compat_ioctl.c:91:21: expected void const volatile [noderef] *
    block/compat_ioctl.c:91:21: got unsigned long *[noderef] p
    block/compat_ioctl.c:87:53: warning: dereference of noderef expression
    block/compat_ioctl.c:91:21: warning: dereference of noderef expression

    Fixes: commit d597580d3737 ("generic ...copy_..._user primitives")
    Signed-off-by: Bart Van Assche
    Cc: Jens Axboe
    Signed-off-by: Al Viro

    Bart Van Assche
     

30 Jun, 2017

2 commits


09 Apr, 2017

1 commit


02 Feb, 2017

1 commit


05 Apr, 2016

1 commit

  • PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
    ago with promise that one day it will be possible to implement page
    cache with bigger chunks than PAGE_SIZE.

    This promise never materialized. And unlikely will.

    We have many places where PAGE_CACHE_SIZE assumed to be equal to
    PAGE_SIZE. And it's constant source of confusion on whether
    PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
    especially on the border between fs and mm.

    Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
    breakage to be doable.

    Let's stop pretending that pages in page cache are special. They are
    not.

    The changes are pretty straight-forward:

    - << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};

    - page_cache_get() -> get_page();

    - page_cache_release() -> put_page();

    This patch contains automated changes generated with coccinelle using
    script below. For some reason, coccinelle doesn't patch header files.
    I've called spatch for them manually.

    The only adjustment after coccinelle is revert of changes to
    PAGE_CAHCE_ALIGN definition: we are going to drop it later.

    There are few places in the code where coccinelle didn't reach. I'll
    fix them manually in a separate patch. Comments and documentation also
    will be addressed with the separate patch.

    virtual patch

    @@
    expression E;
    @@
    - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
    + E

    @@
    expression E;
    @@
    - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
    + E

    @@
    @@
    - PAGE_CACHE_SHIFT
    + PAGE_SHIFT

    @@
    @@
    - PAGE_CACHE_SIZE
    + PAGE_SIZE

    @@
    @@
    - PAGE_CACHE_MASK
    + PAGE_MASK

    @@
    expression E;
    @@
    - PAGE_CACHE_ALIGN(E)
    + PAGE_ALIGN(E)

    @@
    expression E;
    @@
    - page_cache_get(E)
    + get_page(E)

    @@
    expression E;
    @@
    - page_cache_release(E)
    + put_page(E)

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

09 Sep, 2014

1 commit

  • bdev_get_queue() returns the request_queue associated with the
    specified block_device. blk_get_backing_dev_info() makes use of
    bdev_get_queue() to determine the associated bdi given a block_device.

    All the callers of bdev_get_queue() including
    blk_get_backing_dev_info() assume that bdev_get_queue() may return
    NULL and implement NULL handling; however, bdev_get_queue() requires
    the passed in block_device is opened and attached to its gendisk.
    Because an active gendisk always has a valid request_queue associated
    with it, bdev_get_queue() can never return NULL and neither can
    blk_get_backing_dev_info().

    Make it clear that neither of the two functions can return NULL and
    remove NULL handling from all the callers.

    Signed-off-by: Tejun Heo
    Cc: Chris Mason
    Cc: Dave Chinner
    Signed-off-by: Jens Axboe

    Tejun Heo
     

14 Aug, 2014

1 commit

  • Pull block core bits from Jens Axboe:
    "Small round this time, after the massive blk-mq dump for 3.16. This
    pull request contains:

    - Fixes for max_sectors overflow in ioctls from Akinoby Mita.

    - Partition off-by-one bug fix in aix partitions from Dan Carpenter.

    - Various small partition cleanups from Fabian Frederick.

    - Fix for the block integrity code sometimes returning the wrong
    vector count from Gu Zheng.

    - Cleanup an re-org of the blk-mq queue enter/exit percpu counters
    from Tejun. Dependent on the percpu pull for 3.17 (which was in
    the block tree too), that you have already pulled in.

    - A blkcg oops fix, also from Tejun"

    * 'for-3.17/core' of git://git.kernel.dk/linux-block:
    partitions: aix.c: off by one bug
    blkcg: don't call into policy draining if root_blkg is already gone
    Revert "bio: modify __bio_add_page() to accept pages that don't start a new segment"
    bio: modify __bio_add_page() to accept pages that don't start a new segment
    block: fix SG_[GS]ET_RESERVED_SIZE ioctl when max_sectors is huge
    block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX
    block/partitions/efi.c: kerneldoc fixing
    block/partitions/msdos.c: code clean-up
    block/partitions/amiga.c: replace nolevel printk by pr_err
    block/partitions/aix.c: replace count*size kzalloc by kcalloc
    bio-integrity: add "bip_max_vcnt" into struct bio_integrity_payload
    blk-mq: use percpu_ref for mq usage count
    blk-mq: collapse __blk_mq_drain_queue() into blk_mq_freeze_queue()
    blk-mq: decouble blk-mq freezing from generic bypassing
    block, blk-mq: draining can't be skipped even if bypass_depth was non-zero
    blk-mq: fix a memory ordering bug in blk_mq_queue_enter()

    Linus Torvalds
     

14 Jul, 2014

1 commit


02 Jul, 2014

1 commit

  • BLKSECTGET ioctl loads the request queue's max_sectors as unsigned
    short value to the argument pointer. So if the max_sector is greater
    than USHRT_MAX, the upper 16 bits of that is just discarded.

    In such case, USHRT_MAX is more preferable than the lower 16 bits of
    max_sectors.

    Signed-off-by: Akinobu Mita
    Cc: Jens Axboe
    Cc: "James E.J. Bottomley"
    Cc: Douglas Gilbert
    Cc: linux-scsi@vger.kernel.org
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Akinobu Mita
     

12 Sep, 2013

1 commit

  • I found the following pattern that leads in to interesting findings:

    grep -r "ret.*|=.*__put_user" *
    grep -r "ret.*|=.*__get_user" *
    grep -r "ret.*|=.*__copy" *

    The __put_user() calls in compat_ioctl.c, ptrace compat, signal compat,
    since those appear in compat code, we could probably expect the kernel
    addresses not to be reachable in the lower 32-bit range, so I think they
    might not be exploitable.

    For the "__get_user" cases, I don't think those are exploitable: the worse
    that can happen is that the kernel will copy kernel memory into in-kernel
    buffers, and will fail immediately afterward.

    The alpha csum_partial_copy_from_user() seems to be missing the
    access_ok() check entirely. The fix is inspired from x86. This could
    lead to information leak on alpha. I also noticed that many architectures
    map csum_partial_copy_from_user() to csum_partial_copy_generic(), but I
    wonder if the latter is performing the access checks on every
    architectures.

    Signed-off-by: Mathieu Desnoyers
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Jens Axboe
    Cc: Oleg Nesterov
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     

04 Jul, 2013

1 commit


11 Jan, 2012

1 commit


02 Jul, 2011

1 commit

  • On Linux x86_64 host with 32bit userspace, running
    qemu or even just "qemu-img create -f qcow2 some.img 1G"
    causes a kernel warning:

    ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(00005326){t:'S';sz:0} arg(7fffffff) on some.img
    ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(801c0204){t:02;sz:28} arg(fff77350) on some.img

    ioctl 00005326 is CDROM_DRIVE_STATUS,
    ioctl 801c0204 is FDGETPRM.

    The warning appears because the Linux compat-ioctl handler for these
    ioctls only applies to block devices, while qemu also uses the ioctls on
    plain files.

    Signed-off-by: Johannes Stezenbach
    Acked-by: Arnd Bergmann
    Signed-off-by: Jens Axboe

    Johannes Stezenbach
     

18 Nov, 2010

1 commit


10 Nov, 2010

1 commit

  • Convert direct reads of an inode's i_size to using i_size_read().

    i_size_{read,write} use a seqcount to protect reads from accessing
    incomple writes. Concurrent i_size_write()s require mutual exclussion
    to protect the seqcount that is used by i_size_{read,write}. But
    i_size_read() callers do not need to use additional locking.

    Signed-off-by: Mike Snitzer
    Acked-by: NeilBrown
    Acked-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Mike Snitzer
     

12 Aug, 2010

1 commit

  • Secure discard is the same as discard except that all copies of the
    discarded sectors (perhaps created by garbage collection) must also be
    erased.

    Signed-off-by: Adrian Hunter
    Acked-by: Jens Axboe
    Cc: Kyungmin Park
    Cc: Madhusudhan Chikkature
    Cc: Christoph Hellwig
    Cc: Ben Gardiner
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Hunter
     

08 Aug, 2010

1 commit

  • The blktrace driver currently needs the BKL, but
    we should not need to take that in the block layer,
    so just push it down into the driver itself.

    It is quite likely that the BKL is not actually
    required in blktrace code and could be removed
    in a follow-on patch.

    Signed-off-by: Arnd Bergmann
    Acked-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Arnd Bergmann
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

03 Dec, 2009

1 commit

  • The discard ioctl is used by mkfs utilities to clear a block device
    prior to putting metadata down. However, not all devices return zeroed
    blocks after a discard. Some drives return stale data, potentially
    containing old superblocks. It is therefore important to know whether
    discarded blocks are properly zeroed.

    Both ATA and SCSI drives have configuration bits that indicate whether
    zeroes are returned after a discard operation. Implement a block level
    interface that allows this information to be bubbled up the stack and
    queried via a new block device ioctl.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: Jens Axboe

    Martin K. Petersen
     

04 Oct, 2009

1 commit

  • Not all users of the topology information want to use libblkid. Provide
    the topology information through bdev ioctls.

    Also clarify sector size comments for existing BLK ioctls.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: Jens Axboe

    Martin K. Petersen
     

12 Jun, 2009

1 commit

  • * 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block: (153 commits)
    block: add request clone interface (v2)
    floppy: fix hibernation
    ramdisk: remove long-deprecated "ramdisk=" boot-time parameter
    fs/bio.c: add missing __user annotation
    block: prevent possible io_context->refcount overflow
    Add serial number support for virtio_blk, V4a
    block: Add missing bounce_pfn stacking and fix comments
    Revert "block: Fix bounce limit setting in DM"
    cciss: decode unit attention in SCSI error handling code
    cciss: Remove no longer needed sendcmd reject processing code
    cciss: change SCSI error handling routines to work with interrupts enabled.
    cciss: separate error processing and command retrying code in sendcmd_withirq_core()
    cciss: factor out fix target status processing code from sendcmd functions
    cciss: simplify interface of sendcmd() and sendcmd_withirq()
    cciss: factor out core of sendcmd_withirq() for use by SCSI error handling code
    cciss: Use schedule_timeout_uninterruptible in SCSI error handling code
    block: needs to set the residual length of a bidi request
    Revert "block: implement blkdev_readpages"
    block: Fix bounce limit setting in DM
    Removed reference to non-existing file Documentation/PCI/PCI-DMA-mapping.txt
    ...

    Manually fix conflicts with tracing updates in:
    block/blk-sysfs.c
    drivers/ide/ide-atapi.c
    drivers/ide/ide-cd.c
    drivers/ide/ide-floppy.c
    drivers/ide/ide-tape.c
    include/trace/events/block.h
    kernel/trace/blktrace.c

    Linus Torvalds
     

23 May, 2009

2 commits

  • Convert all external users of queue limits to using wrapper functions
    instead of poking the request queue variables directly.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: Jens Axboe

    Martin K. Petersen
     
  • Until now we have had a 1:1 mapping between storage device physical
    block size and the logical block sized used when addressing the device.
    With SATA 4KB drives coming out that will no longer be the case. The
    sector size will be 4KB but the logical block size will remain
    512-bytes. Hence we need to distinguish between the physical block size
    and the logical ditto.

    This patch renames hardsect_size to logical_block_size.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: Jens Axboe

    Martin K. Petersen
     

16 Apr, 2009

1 commit

  • Though one can specify '-d /dev/sda1' when using blktrace, it still
    traces the whole sda.

    To support per-partition tracing, when we start tracing, we initialize
    bt->start_lba and bt->end_lba to the start and end sector of that
    partition.

    Note some actions are per device, thus we don't filter 0-sector events.

    The original patch and discussion can be found here:
    http://marc.info/?l=linux-btrace&m=122949374214540&w=2

    Signed-off-by: Shawn Du
    Signed-off-by: Li Zefan
    Acked-by: "Theodore Ts'o"
    Cc: Arnaldo Carvalho de Melo
    Cc: Jens Axboe
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Shawn Du
     

29 Dec, 2008

1 commit


04 Dec, 2008

2 commits

  • Update FMODE_NDELAY before each ioctl call so that we can kill the
    magic FMODE_NDELAY_NOW. It would be even better to do this directly
    in setfl(), but for that we'd need to have FMODE_NDELAY for all files,
    not just block special files.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Commit 33c2dca4957bd0da3e1af7b96d0758d97e708ef6 (trim file propagation
    in block/compat_ioctl.c) removed the handling of some ioctls from
    compat_blkdev_driver_ioctl. That caused them to be rejected as unknown
    by the compat layer.

    Signed-off-by: Andreas Schwab
    Cc: Al Viro
    Signed-off-by: Al Viro

    Andreas Schwab
     

24 Oct, 2008

1 commit


21 Oct, 2008

5 commits


09 Oct, 2008

1 commit

  • We may well want mkfs tools to use this to mark the whole device as
    unwanted before they format it, for example.

    The ioctl takes a pair of uint64_ts, which are start offset and length
    in _bytes_. Although at the moment it might make sense for them both to
    be in 512-byte sectors, I don't want to limit the ABI to that.

    Signed-off-by: David Woodhouse
    Signed-off-by: Jens Axboe

    David Woodhouse
     

13 May, 2008

1 commit

  • bdevname() fills the buffer that it is given as a parameter, so calling
    strcpy() or snprintf() on the returned value is redundant (and probably not
    guaranteed to work - I don't think strcpy and snprintf support overlapping
    buffers.)

    Signed-off-by: Jean Delvare
    Cc: Stephen Tweedie
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     

18 Apr, 2008

1 commit

  • hdparm explicitely marks HDIO_[UNREGISTER,SCAN]_HWIF ioctls as DANGEROUS
    and given the number of bugs we can assume that there are no real users:

    * DMA has no chance of working because DMA resources are released by
    ide_unregister() and they are never allocated again.

    * Since ide_init_hwif_ports() is used for ->io_ports[] setup the ioctls
    don't work for almost all hosts with "non-standard" (== non ISA-like)
    layout of IDE taskfile registers (there is a lot of such host drivers).

    * ide_port_init_devices() is not called when probing IDE devices so:
    - drive->autotune is never set and IDE host/devices are not programmed
    for the correct PIO/DMA transfer modes (=> possible data corruption)
    - host specific I/O 32-bit and IRQ unmasking settings are not applied
    (=> possible data corruption)
    - host specific ->port_init_devs method is not called (=> no luck with
    ht6560b, qd65xx and opti621 host drivers)

    * ->rw_disk method is not preserved (=> no HPT3xxN chipsets support).

    * ->serialized flag is not preserved (=> possible data corruption when
    using icside, aec62xx (ATP850UF chipset), cmd640, cs5530, hpt366
    (HPT3xxN chipsets), rz1000, sc1200, dtc2278 and ht6560b host drivers).

    * ->ack_intr method is not preserved (=> needed by ide-cris, buddha,
    gayle and macide host drivers).

    * ->sata_scr[] and sata_misc[] is cleared by ide_unregister() and it
    isn't initialized again (SiI3112 support needs them).

    * To issue an ioctl() there need to be at least one IDE device present
    in the system.

    * ->cable_detect method is not preserved + it is not called when probing
    IDE devices so cable detection is broken (however since DMA support is
    also broken it doesn't really matter ;-).

    * Some objects which may have already been freed in ide_unregister()
    are restored by ide_hwif_restore() (i.e. ->hwgroup).

    * ide_register_hw() may unregister unrelated IDE ports if free ide_hwifs[]
    slot cannot be found.

    * When IDE host drivers are modular unregistered port may be re-used by
    different host driver that owned it first causing subtle bugs.

    Since we now have a proper warm-plug support remove these ioctls,
    then remove no longer needed:
    - ide_register_hw() and ide_hwif_restore() functions
    - 'init_default' and 'restore' arguments of ide_unregister()
    - zeroeing of hwif->{dma,extra}_* fields in ide_unregister()

    As an added bonus IDE core code size shrinks by ~3kB (x86-32).

    v2:
    * fix ide_unregister() arguments in cleanup_module() (Andrew Morton).

    v3:
    * fix ide_unregister() arguments in palm_bk3710.c.

    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

28 Jan, 2008

1 commit

  • Since the SCSI layer uses the request queues from the block layer, blktrace can
    also be used to trace the requests to all SCSI devices (like SCSI tape drives),
    not only disks. The only missing part is the ioctl interface to start and stop
    tracing.

    This patch adds the SETUP, START, STOP and TEARDOWN ioctls from blktrace to the
    sg device files. With this change, blktrace can be used for SCSI devices like
    for disks, e.g.: blktrace -d /dev/sg1 -o - | blkparse -i -

    Signed-off-by: Christof Schmitt
    Signed-off-by: Jens Axboe

    Christof Schmitt
     

29 Oct, 2007

1 commit