06 Jan, 2009

40 commits

  • Fix misspelling of "firmware" in docs for ncr53c8xx/sym53c8xx

    It's spelled "firmware".

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Fix misspelling of "firmware" in powerpc Makefile

    It's spelled "firmware".

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Fix misspelling of "firmware" in usb.c

    It's spelled "firmware".

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Fix misspelling of "firmware" in qla1280.c

    It's spelled "firmware".

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Fix misspelling of "firmware" in a100u2w.c

    It's spelled "firmware".

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Fix misspelling of "firmware" in megaraid.c

    Fixed "firmware", "ownership" and grammar in the same comment.

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Fix misspelling of "firmware" in ql4_mbx.c

    It's spelled "firmware".

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Fix misspelling of "firmware" in acpi_memhotplug.c

    It's spelled "firmware".

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Fix misspelling of "firmware" in ipw2100.c

    It's spelled "firmware".

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Fix misspelling of "firmware" in atmel.c

    It's spelled "firmware".

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Fix misspelled firmware in Kconfig

    It's spelled "firmware".

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • It is always "an" if there is a vowel _spoken_ (not written).
    So it is:
    "an hour" (spoken vowel)
    but
    "a uniform" (spoken 'j')

    Signed-off-by: Frederik Schwarzer
    Signed-off-by: Jiri Kosina

    Frederik Schwarzer
     
  • - (better, more, bigger ...) then -> (...) than

    Signed-off-by: Frederik Schwarzer
    Signed-off-by: Jiri Kosina

    Frederik Schwarzer
     
  • Old email no longer exists, this updates CREDITS with my new one.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Jiri Kosina

    Jesper Juhl
     
  • Typo fix.

    Signed-off-by: Frederik Schwarzer
    Signed-off-by: Jiri Kosina

    Frederik Schwarzer
     
  • Fix incorrect use of loose in event.c It should be
    'lose', not 'loose'.

    Signed-off-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Nick Andrew
     
  • Remove bogus indentation of new_text_line declaration introduced in
    commit ac60ad741.

    Acked-by: Nick Andrew
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Fix this sparse warning:

    drivers/rtc/rtc-stk17ta8.c:403:2: warning: returning void-valued expression

    Acked-by: Alessandro Zummo
    Signed-off-by: Hannes Eder
    Signed-off-by: Jiri Kosina

    Hannes Eder
     
  • Fix this sparse warning:

    drivers/rtc/rtc-ds1511.c:634:2: warning: returning void-valued expression

    Acked-by: Alessandro Zummo
    Signed-off-by: Hannes Eder
    Signed-off-by: Jiri Kosina

    Hannes Eder
     
  • Add missing printk loglevel in start_kernel

    Signed-off-by: Ron Lee
    Signed-off-by: Jiri Kosina

    Ron Lee
     
  • And some 80-line cleanups.

    Signed-off-by: Wu Fengguang
    Signed-off-by: Jiri Kosina

    Wu Fengguang
     
  • I am taking over the trivial patch monkey tree from Jesper, as
    he doesn't have time for it any more.

    Acked-by: Jesper Juhl
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
    dm snapshot: extend exception store functions
    dm snapshot: split out exception store implementations
    dm snapshot: rename struct exception_store
    dm snapshot: separate out exception store interface
    dm mpath: move trigger_event to system workqueue
    dm: add name and uuid to sysfs
    dm table: rework reference counting
    dm: support barriers on simple devices
    dm request: extend target interface
    dm request: add caches
    dm ioctl: allow dm_copy_name_and_uuid to return only one field
    dm log: ensure log bitmap fits on log device
    dm log: move region_size validation
    dm log: avoid reinitialising io_req on every operation
    dm: consolidate target deregistration error handling
    dm raid1: fix error count
    dm log: fix dm_io_client leak on error paths
    dm snapshot: change yield to msleep
    dm table: drop reference at unbind

    Linus Torvalds
     
  • Supply dm_add_exception as a callback to the read_metadata function.
    Add a status function ready for a later patch and name the functions
    consistently.

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

    Jonathan Brassow
     
  • Move the existing snapshot exception store implementations out into
    separate files. Later patches will place these behind a new
    interface in preparation for alternative implementations.

    Signed-off-by: Alasdair G Kergon

    Alasdair G Kergon
     
  • Rename struct exception_store to dm_exception_store.

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

    Jonathan Brassow
     
  • Pull structures that bridge the gap between snapshot and
    exception store out of dm-snap.h and put them in a new
    .h file - dm-exception-store.h. This file will define the
    API for new exception stores.

    Ultimately, dm-snap.h is unnecessary, since only dm-snap.c
    should be using it.

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

    Jonathan Brassow
     
  • The same workqueue is used both for sending uevents and processing queued I/O.
    Deadlock has been reported in RHEL5 when sending a uevent was blocked waiting
    for the queued I/O to be processed. Use scheduled_work() for the asynchronous
    uevents instead.

    Signed-off-by: Alasdair G Kergon

    Alasdair G Kergon
     
  • Implement simple read-only sysfs entry for device-mapper block device.

    This patch adds a simple sysfs directory named "dm" under block device
    properties and implements
    - name attribute (string containing mapped device name)
    - uuid attribute (string containing UUID, or empty string if not set)

    The kobject is embedded in mapped_device struct, so no additional
    memory allocation is needed for initializing sysfs entry.

    During the processing of sysfs attribute we need to lock mapped device
    which is done by a new function dm_get_from_kobj, which returns the md
    associated with kobject and increases the usage count.

    Each 'show attribute' function is responsible for its own locking.

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

    Milan Broz
     
  • Rework table reference counting.

    The existing code uses a reference counter. When the last reference is
    dropped and the counter reaches zero, the table destructor is called.
    Table reference counters are acquired/released from upcalls from other
    kernel code (dm_any_congested, dm_merge_bvec, dm_unplug_all).
    If the reference counter reaches zero in one of the upcalls, the table
    destructor is called from almost random kernel code.

    This leads to various problems:
    * dm_any_congested being called under a spinlock, which calls the
    destructor, which calls some sleeping function.
    * the destructor attempting to take a lock that is already taken by the
    same process.
    * stale reference from some other kernel code keeps the table
    constructed, which keeps some devices open, even after successful
    return from "dmsetup remove". This can confuse lvm and prevent closing
    of underlying devices or reusing device minor numbers.

    The patch changes reference counting so that the table destructor can be
    called only at predetermined places.

    The table has always exactly one reference from either mapped_device->map
    or hash_cell->new_map. After this patch, this reference is not counted
    in table->holders. A pair of dm_create_table/dm_destroy_table functions
    is used for table creation/destruction.

    Temporary references from the other code increase table->holders. A pair
    of dm_table_get/dm_table_put functions is used to manipulate it.

    When the table is about to be destroyed, we wait for table->holders to
    reach 0. Then, we call the table destructor. We use active waiting with
    msleep(1), because the situation happens rarely (to one user in 5 years)
    and removing the device isn't performance-critical task: the user doesn't
    care if it takes one tick more or not.

    This way, the destructor is called only at specific points
    (dm_table_destroy function) and the above problems associated with lazy
    destruction can't happen.

    Finally remove the temporary protection added to dm_any_congested().

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Implement barrier support for single device DM devices

    This patch implements barrier support in DM for the common case of dm linear
    just remapping a single underlying device. In this case we can safely
    pass the barrier through because there can be no reordering between
    devices.

    NB. Any DM device might cease to support barriers if it gets
    reconfigured so code must continue to allow for a possible
    -EOPNOTSUPP on every barrier bio submitted. - agk

    Signed-off-by: Andi Kleen
    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Andi Kleen
     
  • This patch adds the following target interfaces for request-based dm.

    map_rq : for mapping a request

    rq_end_io : for finishing a request

    busy : for avoiding performance regression from bio-based dm.
    Target can tell dm core not to map requests now, and
    that may help requests in the block layer queue to be
    bigger by I/O merging.
    In bio-based dm, this behavior is done by device
    drivers managing the block layer queue.
    But in request-based dm, dm core has to do that
    since dm core manages the block layer queue.

    Signed-off-by: Kiyoshi Ueda
    Signed-off-by: Jun'ichi Nomura
    Signed-off-by: Alasdair G Kergon

    Kiyoshi Ueda
     
  • This patch prepares some kmem_caches for request-based dm.

    Signed-off-by: Kiyoshi Ueda
    Signed-off-by: Jun'ichi Nomura
    Signed-off-by: Alasdair G Kergon

    Kiyoshi Ueda
     
  • Allow NULL buffer in dm_copy_name_and_uuid if you only want to return one of
    the fields.

    (Required by a following patch that adds these fields to sysfs.)

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

    Milan Broz
     
  • Check that the log bitmap will fit within the log device.

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

    Milan Broz
     
  • Move log size validation from mirror target to log constructor.

    Removed PAGE_SIZE restriction we no longer think necessary.

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

    Milan Broz
     
  • rw_header function updates three members of io_req data every time
    when I/O is processed. bi_rw and notify.fn are never modified once
    they get initialized, and so they can be set in advance.

    header_to_disk() can also be pulled out of write_header() since only one
    caller needs it and write_header() can be replaced by rw_header()
    directly.

    Signed-off-by: Takahiro Yasui
    Signed-off-by: Alasdair G Kergon

    Takahiro Yasui
     
  • Change dm_unregister_target to return void and use BUG() for error
    reporting.

    dm_unregister_target can only fail because of programming bug in the
    target driver. It can't fail because of user's behavior or disk errors.

    This patch changes unregister_target to return void and use BUG if
    someone tries to unregister non-registered target or unregister target
    that is in use.

    This patch removes code duplication (testing of error codes in all dm
    targets) and reports bugs in just one place, in dm_unregister_target. In
    some target drivers, these return codes were ignored, which could lead
    to a situation where bugs could be missed.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Always increase the error count when I/O on a leg of a mirror fails.

    The error count is used to decide whether to select an alternative
    mirror leg. If the target doesn't use the "handle_errors" feature, the
    error count is not updated and the bio can get requeued forever by the
    read callback.

    Fix it by increasing error_count before the handle_errors feature
    checking.

    Cc: stable@kernel.org
    Signed-off-by: Milan Broz
    Signed-off-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Jonathan Brassow
     
  • In create_log_context function, dm_io_client_destroy function needs
    to be called, when memory allocation of disk_header, sync_bits and
    recovering_bits failed, but dm_io_client_destroy is not called.

    Cc: stable@kernel.org
    Signed-off-by: Takahiro Yasui
    Acked-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Takahiro Yasui