25 Jan, 2008

6 commits

  • There is no need for kobject_unregister() anymore, thanks to Kay's
    kobject cleanup changes, so replace all instances of it with
    kobject_put().

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Now that the old kobject_init() function is gone, rename
    kobject_init_ng() to kobject_init() to clean up the namespace.

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Now that the old kobject_add() function is gone, rename kobject_add_ng()
    to kobject_add() to clean up the namespace.

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This converts the code to use the new kobject functions, cleaning up the
    logic in doing so.

    Cc: Neil Brown
    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This moves the block devices to /sys/class/block. It will create a
    flat list of all block devices, with the disks and partitions in one
    directory. For compatibility /sys/block is created and contains symlinks
    to the disks.

    /sys/class/block
    |-- sda -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
    |-- sda1 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
    |-- sda10 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10
    |-- sda5 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5
    |-- sda6 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6
    |-- sda7 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7
    |-- sda8 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8
    |-- sda9 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9
    `-- sr0 -> ../../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0

    /sys/block/
    |-- sda -> ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
    `-- sr0 -> ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Stop using kobject_register, as this way we can control the sending of
    the uevent properly, after everything is properly initialized.

    Cc: Neil Brown
    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

09 Jan, 2008

1 commit

  • We currently do not wait for the block from the missing device to be
    computed from parity before copying data to the new stripe layout.

    The change in the raid6 code is not techincally needed as we don't delay
    data block recovery in the same way for raid6 yet. But making the change
    now is safer long-term.

    This bug exists in 2.6.23 and 2.6.24-rc

    Cc:
    Signed-off-by: Dan Williams
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     

21 Dec, 2007

6 commits

  • Fix possible max_phys_segments violation in cloned dm-crypt bio.

    In write operation dm-crypt needs to allocate new bio request
    and run crypto operation on this clone. Cloned request has always
    the same size, but number of physical segments can be increased
    and violate max_phys_segments restriction.

    This can lead to data corruption and serious hardware malfunction.
    This was observed when using XFS over dm-crypt and at least
    two HBA controller drivers (arcmsr, cciss) recently.

    Fix it by using bio_add_page() call (which tests for other
    restrictions too) instead of constructing own biovec.

    All versions of dm-crypt are affected by this bug.

    Cc: stable@kernel.org
    Cc: dm-crypt@saout.de
    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Make sure dm honours max_hw_sectors of underlying devices

    We still have no firm testing evidence in support of this patch but
    believe it may help to resolve some bug reports. - agk

    Signed-off-by: Neil Brown
    Signed-off-by: Alasdair G Kergon

    Neil Brown
     
  • Insert a missing KOBJ_CHANGE notification when a device is renamed.

    Cc: Scott James Remnant
    Signed-off-by: Alasdair G Kergon

    Alasdair G Kergon
     
  • Fix BIO_UPTODATE test for write io.

    Cc: stable@kernel.org
    Cc: dm-crypt@saout.de
    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • With CONFIG_SCSI=n __scsi_print_sense() is never linked in.

    drivers/built-in.o: In function `hp_sw_end_io':
    dm-mpath-hp-sw.c:(.text+0x914f8): undefined reference to `__scsi_print_sense'

    Caught with a randconfig on current git.

    Signed-off-by: Paul Mundt
    Signed-off-by: Alasdair G Kergon

    Paul Mundt
     
  • This patch fixes a panic on shrinking a DM device if there is
    outstanding I/O to the part of the device that is being removed.
    (Normally this doesn't happen - a filesystem would be resized first,
    for example.)

    The bug is that __clone_and_map() assumes dm_table_find_target()
    always returns a valid pointer. It may fail if a bio arrives from the
    block layer but its target sector is no longer included in the DM
    btree.

    This patch appends an empty entry to table->targets[] which will
    be returned by a lookup beyond the end of the device.

    After calling dm_table_find_target(), __clone_and_map() and target_message()
    check for this condition using
    dm_target_is_valid().

    Sample test script to trigger oops:

    Jun'ichi Nomura
     

15 Nov, 2007

1 commit

  • ops.pending when it should be looking at the consistent stack-based
    snapshot of the operations flags.

    Report from Joel:
    Resync done. Patch fix this bug.

    Signed-off-by: Dan Williams
    Tested-by: Joel Bertrand
    Cc:
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     

09 Nov, 2007

1 commit


06 Nov, 2007

1 commit

  • commit 4ae3f847e49e3787eca91bced31f8fd328d50496 ("md: raid5: fix
    clearing of biofill operations") did not get applied correctly,
    presumably due to substantial similarities between handle_stripe5 and
    handle_stripe6.

    This patch moves the chunk of new code from handle_stripe6 (where it isn't
    needed (yet)) to handle_stripe5.

    Signed-off-by: Neil Brown
    Cc: "Dan Williams"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Brown
     

02 Nov, 2007

1 commit

  • Device mapper uses its own bounce_pfn that may differ from one on underlying
    device. In that way dm can build incorrect requests that contain sg elements
    greater than underlying device is able to handle.

    This is the cause of slab corruption in i2o layer, occurred on i386 arch when
    very long direct IO requests are addressed to dm-over-i2o device.

    Signed-off-by: Vasily Averin
    Cc:
    Cc: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Vasily Averin
     

29 Oct, 2007

1 commit

  • Don't undef __i386__/__x86_64__ in uml anymore, make sure that (few) places
    that required adjusting the ifdefs got those.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

27 Oct, 2007

1 commit


24 Oct, 2007

1 commit


23 Oct, 2007

3 commits


20 Oct, 2007

17 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (74 commits)
    fix do_sys_open() prototype
    sysfs: trivial: fix sysfs_create_file kerneldoc spelling mistake
    Documentation: Fix typo in SubmitChecklist.
    Typo: depricated -> deprecated
    Add missing profile=kvm option to Documentation/kernel-parameters.txt
    fix typo about TBI in e1000 comment
    proc.txt: Add /proc/stat field
    small documentation fixes
    Fix compiler warning in smount example program from sharedsubtree.txt
    docs/sysfs: add missing word to sysfs attribute explanation
    documentation/ext3: grammar fixes
    Documentation/java.txt: typo and grammar fixes
    Documentation/filesystems/vfs.txt: typo fix
    include/asm-*/system.h: remove unused set_rmb(), set_wmb() macros
    trivial copy_data_pages() tidy up
    Fix typo in arch/x86/kernel/tsc_32.c
    file link fix for Pegasus USB net driver help
    remove unused return within void return function
    Typo fixes retrun -> return
    x86 hpet.h: remove broken links
    ...

    Linus Torvalds
     
  • Add crypt prefix to dec_pending to avoid confusing it in backtraces with
    the dm core function of the same name.

    No functional change here.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • This patch adds calls to dm_path_event for a failed path and a reinstated
    path.

    Signed-off-by: Mike Anderson
    Signed-off-by: Alasdair G Kergon

    Mike Anderson
     
  • This patch adds support for the dm_path_event dm_send_event functions which
    create and send udev events.

    Signed-off-by: Mike Anderson
    Signed-off-by: Alasdair G Kergon

    Mike Anderson
     
  • This patch adds a uevent skeleton to device-mapper.

    Signed-off-by: Mike Anderson
    Signed-off-by: Alasdair G Kergon

    Mike Anderson
     
  • This patch adds a function to obtain a copy of a mapped device's name and uuid.

    Signed-off-by: Mike Anderson
    Signed-off-by: Alasdair G Kergon

    Mike Anderson
     
  • Store a pointer to the owning mirror_set structure within each mirror
    structure for a subsequent patch to use.

    Signed-off-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Jonathan Brassow
     
  • There are now two phases to a suspend in device-mapper -
    presuspend and postsuspend. This patch removes the
    single 'suspend' in the logging API and replaces it with
    'presuspend' and 'postsuspend' functions to align it
    better with core device-mapper.

    A subsequent patch will make use of 'presuspend'.

    Signed-off-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Jonathan Brassow
     
  • This patch adds retries to the hp hardware handler, and utilizes the
    MP_RETRY flag of dm-multipath. For now in the hp handler, if we get a
    pg_init completed with a check condition we just assume we can retry the
    pg_init command. We make this assumption because of incomplete data on
    specific check condition code of the HP hardware, and because testing
    has shown the HP path initialization command to be idempotent.
    The number of times we retry is settable via the "pg_init_retries"
    multipath map feature.

    Signed-off-by: Dave Wysochanski
    Acked-by: Chandra Seetharaman
    Signed-off-by: Alasdair G Kergon

    Dave Wysochanski
     
  • This patch adds the most basic dm-multipath hardware support for the
    HP active/passive arrays.

    Signed-off-by: Dave Wysochanski
    Signed-off-by: Mike Christie
    Acked-by: Chandra Seetharaman
    Signed-off-by: Alasdair G Kergon

    Dave Wysochanski
     
  • This patch allows a failed path group initialisation command to be retried.

    It adds a generic MP_RETRY flag and a "pg_init_retries" feature to
    device-mapper multipath which limits the number of retries.

    1. A hw handler sends a path initialization command to the storage and
    the command completes with an error code indicating the command
    should be retried.

    2. The hardware handler calls dm_pg_init_complete() with MP_RETRY
    set in err_flags to ask the dm multipath core to retry.

    3. If the retry limit has not been exceeded, pg_init() is retried.
    Otherwise fail_path() is called.

    If you are using the userspace multipath-tools or device-mapper-multipath
    package, you can set pg_init_retries in the 'device' section of your
    /etc/multipath.conf file. For example:

    features "2 pg_init_retries 7"

    The number of PG retries attempted is reported in the 'dmsetup status' output.

    Signed-off-by: Dave Wysochanski
    Acked-by: Mike Christie
    Acked-by: Chandra Seetharaman
    Signed-off-by: Alasdair G Kergon

    Dave Wysochanski
     
  • Replace numbers with names in labels in error paths, to avoid confusion
    when new one get added between existing ones.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Clean up, convert some spaces to tabs.

    No functional change here.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Add post-processing queue (per crypt device) for read operations.

    Current implementation uses only one queue for all operations
    and this can lead to starvation caused by many requests waiting
    for memory allocation. But the needed memory-releasing operation
    is queued after these requests (in the same queue).

    Signed-off-by: Milan Broz
    Signed-off-by: Herbert Xu
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Use a separate single-threaded workqueue for each crypt device
    instead of one global workqueue.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Correct an error message, reported by Michael Wood .

    Signed-off-by: Alasdair G Kergon

    Alasdair G Kergon
     
  • Remove BIO_LIST and DEFINE_BIO_LIST macros that gain us nothing
    since contents are initialised to NULL.

    Cc: Jan Engelhardt
    Signed-off-by: Alasdair G Kergon

    Alasdair G Kergon