11 Dec, 2008

1 commit

  • The pktcdvd created class devices only export some sysfs files,
    but have no char dev_t registered in the driver.

    At class device creation time they copy the dev_t value of the
    block device to the char device, wich will register a new char
    device in the driver core and userspace, with a conflicting dev_t
    value.

    In many cases the class devices dev_t just points to a random
    USB device. This fixes the sysfs "duplicate entry" errors.

    Signed-off-by: Kay Sievers
    Acked-by: Peter Osterlund
    Cc: Al Viro
    Signed-off-by: Linus Torvalds

    Kay Sievers
     

04 Dec, 2008

1 commit


21 Oct, 2008

7 commits


17 Oct, 2008

1 commit


09 Oct, 2008

2 commits

  • Since all bio_split calls refer the same single bio_split_pool, the bio_split
    function can use bio_split_pool directly instead of the mempool_t parameter;

    then the mempool_t parameter can be removed from bio_split param list, and
    bio_split_pool is only referred in fs/bio.c file, can be marked static.

    Signed-off-by: Denis ChengRq
    Signed-off-by: Jens Axboe

    Denis ChengRq
     
  • * Implement disk_devt() and part_devt() and use them to directly
    access devt instead of computing it from ->major and ->first_minor.

    Note that all references to ->major and ->first_minor outside of
    block layer is used to determine devt of the disk (the part0) and as
    ->major and ->first_minor will continue to represent devt for the
    disk, converting these users aren't strictly necessary. However,
    convert them for consistency.

    * Implement disk_max_parts() to avoid directly deferencing
    genhd->minors.

    * Update bdget_disk() such that it doesn't assume consecutive minor
    space.

    * Move devt computation from register_disk() to add_disk() and make it
    the only one (all other usages use the initially determined value).

    These changes clean up the code and will help disk->part dereference
    fix and extended block device numbers.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jens Axboe

    Tejun Heo
     

28 Aug, 2008

1 commit

  • This reverts commit 5b6155ee70e9c4d2ad7e6f514c8eee06e2711c3a, because
    the block device ioctl's really aren't ready for it.

    In particular, the "struct file *" and the "struct inode *" arguments do
    not necessarily match, which means that the unlocked version of the
    ioctl (that only gets a "struct file *") isn't actually able to handle
    the cases it needs to handle.

    This fixes bugzilla

    http://bugzilla.kernel.org/show_bug.cgi?id=11401

    Reported-and-bisected-by: Laurent Riffard
    Acked-by: Peter Osterlund
    Cc: Alan Cox
    Cc: Andrew Morton
    Cc: Jens Axboe
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

22 Jul, 2008

1 commit


04 Jul, 2008

2 commits


03 Jul, 2008

1 commit

  • When devices are stacked, one device's merge_bvec_fn may need to perform
    the mapping and then call one or more functions for its underlying devices.

    The following bio fields are used:
    bio->bi_sector
    bio->bi_bdev
    bio->bi_size
    bio->bi_rw using bio_data_dir()

    This patch creates a new struct bvec_merge_data holding a copy of those
    fields to avoid having to change them directly in the struct bio when
    going down the stack only to have to change them back again on the way
    back up. (And then when the bio gets mapped for real, the whole
    exercise gets repeated, but that's a problem for another day...)

    Signed-off-by: Alasdair G Kergon
    Cc: Neil Brown
    Cc: Milan Broz
    Signed-off-by: Jens Axboe

    Alasdair G Kergon
     

29 Apr, 2008

4 commits

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: Skip I/O merges when disabled
    block: add large command support
    block: replace sizeof(rq->cmd) with BLK_MAX_CDB
    ide: use blk_rq_init() to initialize the request
    block: use blk_rq_init() to initialize the request
    block: rename and export rq_init()
    block: no need to initialize rq->cmd with blk_get_request
    block: no need to initialize rq->cmd in prepare_flush_fn hook
    block/blk-barrier.c:blk_ordered_cur_seq() mustn't be inline
    block/elevator.c:elv_rq_merge_ok() mustn't be inline
    block: make queue flags non-atomic
    block: add dma alignment and padding support to blk_rq_map_kern
    unexport blk_max_pfn
    ps3disk: Remove superfluous cast
    block: make rq_init() do a full memset()
    relay: fix splice problem

    Linus Torvalds
     
  • Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data
    be setup before gluing PDE to main tree.

    Signed-off-by: Denis V. Lunev
    Cc: Greg Kroah-Hartman
    Cc: Alexey Dobriyan
    Cc: "Eric W. Biederman"
    Cc: Peter Osterlund
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Dmitry Torokhov
    Cc: Neil Brown
    Cc: Mauro Carvalho Chehab
    Cc: Bjorn Helgaas
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis V. Lunev
     
  • Use creation by full path: "driver/foo".

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • blk_get_request initializes rq->cmd (rq_init does) so the users don't
    need to do that.

    The purpose of this patch is to remove sizeof(rq->cmd) and &rq->cmd,
    as a preparation for large command support, which changes rq->cmd from
    the static array to a pointer. sizeof(rq->cmd) will not make sense and
    &rq->cmd won't work.

    Signed-off-by: FUJITA Tomonori
    Cc: James Bottomley
    Cc: Alasdair G Kergon
    Cc: Jens Axboe
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     

05 Mar, 2008

1 commit

  • On my system, pkt_open() consumes 584 bytes because the compiler decides to
    inline lots of functions that would not normally be part of long call chains.
    The following patch fixes that problem on my system.

    Signed-off-by: Peter Osterlund
    Cc: Nix
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Osterlund
     

07 Feb, 2008

1 commit

  • Fix various instances of

    if (!expr & mask)

    which should probably have been

    if (!(expr & mask))

    Signed-off-by: Alexey Dobriyan
    Cc: Jens Axboe
    Cc: Peter Osterlund
    Cc: Karsten Keil
    Cc: Mauro Carvalho Chehab
    Cc: "Antonino A. Daplas"
    Cc: Mark Fasheh
    Cc: "David S. Miller"
    Cc: Jeff Garzik
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

25 Jan, 2008

3 commits


18 Dec, 2007

1 commit

  • In kobject_register, the kobject reference is get in kobject_init, and then
    kobject_add. If kobject_add fail, it will only cleanup the reference got
    by itself.

    Signed-off-by: Dave Young
    Reviewed-by: Pekka Enberg
    Cc: Greg KH
    Cc: Peter Osterlund
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     

08 Nov, 2007

1 commit


16 Oct, 2007

2 commits


10 Oct, 2007

1 commit

  • As bi_end_io is only called once when the reqeust is complete,
    the 'size' argument is now redundant. Remove it.

    Now there is no need for bio_endio to subtract the size completed
    from bi_size. So don't do that either.

    While we are at it, change bi_end_io to return void.

    Signed-off-by: Neil Brown
    Signed-off-by: Jens Axboe

    NeilBrown
     

24 Jul, 2007

1 commit

  • Some of the code has been gradually transitioned to using the proper
    struct request_queue, but there's lots left. So do a full sweet of
    the kernel and get rid of this typedef and replace its uses with
    the proper type.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

18 Jul, 2007

1 commit

  • Currently, the freezer treats all tasks as freezable, except for the kernel
    threads that explicitly set the PF_NOFREEZE flag for themselves. This
    approach is problematic, since it requires every kernel thread to either
    set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
    care for the freezing of tasks at all.

    It seems better to only require the kernel threads that want to or need to
    be frozen to use some freezer-related code and to remove any
    freezer-related code from the other (nonfreezable) kernel threads, which is
    done in this patch.

    The patch causes all kernel threads to be nonfreezable by default (ie. to
    have PF_NOFREEZE set by default) and introduces the set_freezable()
    function that should be called by the freezable kernel threads in order to
    unset PF_NOFREEZE. It also makes all of the currently freezable kernel
    threads call set_freezable(), so it shouldn't cause any (intentional)
    change of behaviour to appear. Additionally, it updates documentation to
    describe the freezing of tasks more accurately.

    [akpm@linux-foundation.org: build fixes]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Nigel Cunningham
    Cc: Pavel Machek
    Cc: Oleg Nesterov
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

17 Jul, 2007

1 commit


12 Jul, 2007

1 commit

  • sysfs is now completely out of driver/module lifetime game. After
    deletion, a sysfs node doesn't access anything outside sysfs proper,
    so there's no reason to hold onto the attribute owners. Note that
    often the wrong modules were accounted for as owners leading to
    accessing removed modules.

    This patch kills now unnecessary attribute->owner. Note that with
    this change, userland holding a sysfs node does not prevent the
    backing module from being unloaded.

    For more info regarding lifetime rule cleanup, please read the
    following message.

    http://article.gmane.org/gmane.linux.kernel/510293

    (tweaked by Greg to not delete the field just yet, to make it easier to
    merge things properly.)

    Signed-off-by: Tejun Heo
    Cc: Cornelia Huck
    Cc: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     

26 Apr, 2007

1 commit

  • The packet driver is assuming (reasonably) that the (undocumented)
    request.errors is an errno. But it is in fact some mysterious bitfield. When
    things go wrong we return weird positive numbers to the VFS as pointers and it
    goes oops.

    Thanks to William Heimbigner for reporting and diagnosis.

    (It doesn't oops, but this driver still doesn't work for William)

    Cc: William Heimbigner
    Cc: Peter Osterlund
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

21 Feb, 2007

1 commit


13 Feb, 2007

1 commit

  • Many struct file_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

12 Feb, 2007

1 commit

  • - update documentation

    - use clear_bdi_congested/set_bdi_congested functions directly instead of
    old wrappers

    - removed DECLARE_BUF_AS_STRING macro

    Signed-off-by: Thomas Maier
    Cc: Peter Osterlund
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Maier
     

06 Jan, 2007

1 commit

  • Fix http://bugzilla.kernel.org/show_bug.cgi?id=7667

    This is because the packet driver tries to send down read/write BLOCK_PC
    commands that don't use a bio and do not use sg lists.

    The right fix is to replace all the packet_command stuff in the packet
    driver by scsi_execute() which needs to be lifted from scsi code to
    the block code for that.

    Fix the bug for now. It's not the full way to a generic execute block pc
    infrastcuture but fixes the bug for the time being.

    Signed-off-by: Christoph Hellwig
    Acked-by: Peter Osterlund
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig