]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agoMerge branch 'quilt/device-mapper'
Stephen Rothwell [Mon, 1 Aug 2011 02:32:31 +0000 (12:32 +1000)]
Merge branch 'quilt/device-mapper'

13 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 02:28:21 +0000 (12:28 +1000)]
Merge remote-tracking branch 'block/for-next'

13 years agoMerge branch 'quilt/rr'
Stephen Rothwell [Mon, 1 Aug 2011 02:26:56 +0000 (12:26 +1000)]
Merge branch 'quilt/rr'

13 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 02:25:36 +0000 (12:25 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'

13 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 02:24:05 +0000 (12:24 +1000)]
Merge remote-tracking branch 'sound/for-next'

13 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Mon, 1 Aug 2011 02:22:33 +0000 (12:22 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

Conflicts:
drivers/mtd/maps/lantiq-flash.c
drivers/mtd/maps/pxa2xx-flash.c

13 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Mon, 1 Aug 2011 02:21:10 +0000 (12:21 +1000)]
Merge remote-tracking branch 'bluetooth/master'

13 years agoMerge remote-tracking branch 'async_tx/next'
Stephen Rothwell [Mon, 1 Aug 2011 02:18:10 +0000 (12:18 +1000)]
Merge remote-tracking branch 'async_tx/next'

13 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Mon, 1 Aug 2011 02:16:44 +0000 (12:16 +1000)]
Merge remote-tracking branch 'slave-dma/next'

Conflicts:
drivers/dma/mv_xor.c

13 years agoMerge remote-tracking branch 'iscsi-target/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 02:15:17 +0000 (12:15 +1000)]
Merge remote-tracking branch 'iscsi-target/for-next'

13 years agoMerge remote-tracking branch 'ibft/master'
Stephen Rothwell [Mon, 1 Aug 2011 02:15:12 +0000 (12:15 +1000)]
Merge remote-tracking branch 'ibft/master'

13 years agoMerge remote-tracking branch 'swiotlb/master'
Stephen Rothwell [Mon, 1 Aug 2011 02:15:06 +0000 (12:15 +1000)]
Merge remote-tracking branch 'swiotlb/master'

13 years agoMerge remote-tracking branch 'powertools/tools-test'
Stephen Rothwell [Mon, 1 Aug 2011 02:13:40 +0000 (12:13 +1000)]
Merge remote-tracking branch 'powertools/tools-test'

13 years agoMerge remote-tracking branch 'idle-test/idle-test'
Stephen Rothwell [Mon, 1 Aug 2011 02:12:22 +0000 (12:12 +1000)]
Merge remote-tracking branch 'idle-test/idle-test'

13 years agoMerge remote-tracking branch 'acpi/test'
Stephen Rothwell [Mon, 1 Aug 2011 02:06:00 +0000 (12:06 +1000)]
Merge remote-tracking branch 'acpi/test'

Conflicts:
arch/ia64/Kconfig
arch/powerpc/Kconfig
arch/x86/Kconfig
lib/Kconfig
lib/Makefile

13 years agoMerge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 02:05:48 +0000 (12:05 +1000)]
Merge remote-tracking branch 'kconfig/for-next'

13 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 02:05:38 +0000 (12:05 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

13 years agoMerge branch 'quilt/kernel-doc'
Stephen Rothwell [Mon, 1 Aug 2011 02:04:18 +0000 (12:04 +1000)]
Merge branch 'quilt/kernel-doc'

13 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 02:04:05 +0000 (12:04 +1000)]
Merge remote-tracking branch 'hid/for-next'

13 years agoMerge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 02:03:57 +0000 (12:03 +1000)]
Merge remote-tracking branch 'vfs/for-next'

13 years agoMerge remote-tracking branch 'xfs/master'
Stephen Rothwell [Mon, 1 Aug 2011 02:02:30 +0000 (12:02 +1000)]
Merge remote-tracking branch 'xfs/master'

13 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Mon, 1 Aug 2011 02:00:58 +0000 (12:00 +1000)]
Merge remote-tracking branch 'ocfs2/linux-next'

13 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Mon, 1 Aug 2011 02:00:49 +0000 (12:00 +1000)]
Merge remote-tracking branch 'logfs/master'

Conflicts:
fs/logfs/logfs.h

13 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Mon, 1 Aug 2011 01:59:12 +0000 (11:59 +1000)]
Merge remote-tracking branch 'gfs2/master'

13 years agoMerge remote-tracking branch 'ext4/dev'
Stephen Rothwell [Mon, 1 Aug 2011 01:57:45 +0000 (11:57 +1000)]
Merge remote-tracking branch 'ext4/dev'

Conflicts:
fs/ext4/inode.c

13 years agoMerge remote-tracking branch 'cifs/master'
Stephen Rothwell [Mon, 1 Aug 2011 01:56:20 +0000 (11:56 +1000)]
Merge remote-tracking branch 'cifs/master'

13 years agoMerge remote-tracking branch 'ceph/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 01:56:18 +0000 (11:56 +1000)]
Merge remote-tracking branch 'ceph/for-next'

Conflicts:
fs/ceph/export.c

13 years agoMerge remote-tracking branch 'unicore32/unicore32'
Stephen Rothwell [Mon, 1 Aug 2011 01:54:57 +0000 (11:54 +1000)]
Merge remote-tracking branch 'unicore32/unicore32'

13 years agoMerge remote-tracking branch 'tile/master'
Stephen Rothwell [Mon, 1 Aug 2011 01:53:40 +0000 (11:53 +1000)]
Merge remote-tracking branch 'tile/master'

13 years agoMerge remote-tracking branch 'rmobile/rmobile-latest'
Stephen Rothwell [Mon, 1 Aug 2011 01:52:24 +0000 (11:52 +1000)]
Merge remote-tracking branch 'rmobile/rmobile-latest'

13 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Mon, 1 Aug 2011 01:51:01 +0000 (11:51 +1000)]
Merge remote-tracking branch 'sh/sh-latest'

13 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Mon, 1 Aug 2011 01:49:44 +0000 (11:49 +1000)]
Merge remote-tracking branch 's390/features'

13 years agoMerge remote-tracking branch '52xx-and-virtex/powerpc/next'
Stephen Rothwell [Mon, 1 Aug 2011 01:48:22 +0000 (11:48 +1000)]
Merge remote-tracking branch '52xx-and-virtex/powerpc/next'

13 years agoMerge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 01:46:58 +0000 (11:46 +1000)]
Merge remote-tracking branch 'parisc/for-next'

13 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Mon, 1 Aug 2011 01:45:33 +0000 (11:45 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

13 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 01:45:30 +0000 (11:45 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'

13 years agoMerge remote-tracking branch 'ia64/test'
Stephen Rothwell [Mon, 1 Aug 2011 01:44:03 +0000 (11:44 +1000)]
Merge remote-tracking branch 'ia64/test'

13 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 01:42:42 +0000 (11:42 +1000)]
Merge remote-tracking branch 'cris/for-next'

13 years agoMerge remote-tracking branch 'ux500-core/ux500-core'
Stephen Rothwell [Mon, 1 Aug 2011 01:42:37 +0000 (11:42 +1000)]
Merge remote-tracking branch 'ux500-core/ux500-core'

13 years agoMerge remote-tracking branch 's5p/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 01:41:20 +0000 (11:41 +1000)]
Merge remote-tracking branch 's5p/for-next'

Conflicts:
arch/arm/mach-exynos4/Kconfig
arch/arm/mach-exynos4/mach-smdkc210.c

13 years agoMerge remote-tracking branch 'msm/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 01:39:50 +0000 (11:39 +1000)]
Merge remote-tracking branch 'msm/for-next'

13 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 01:39:42 +0000 (11:39 +1000)]
Merge remote-tracking branch 'arm-soc/for-next'

Conflicts:
arch/arm/mach-exynos4/pm.c
arch/arm/mach-imx/mm-imx25.c
arch/arm/mach-imx/mm-imx31.c
arch/arm/mach-imx/mm-imx35.c
arch/arm/mach-mx5/mm.c
arch/arm/mach-omap2/cm-regbits-44xx.h

13 years agoMerge remote-tracking branch 'arm-lpae/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 01:35:28 +0000 (11:35 +1000)]
Merge remote-tracking branch 'arm-lpae/for-next'

Conflicts:
arch/arm/include/asm/pgalloc.h
arch/arm/include/asm/pgtable.h
arch/arm/include/asm/proc-fns.h
arch/arm/include/asm/tlb.h
arch/arm/mm/context.c
arch/arm/mm/proc-v7.S

13 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Mon, 1 Aug 2011 01:34:10 +0000 (11:34 +1000)]
Merge remote-tracking branch 'arm/for-next'

13 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Mon, 1 Aug 2011 01:32:52 +0000 (11:32 +1000)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

13 years agoMerge remote-tracking branch 'fbdev-current/fbdev-fixes-for-linus'
Stephen Rothwell [Mon, 1 Aug 2011 01:32:49 +0000 (11:32 +1000)]
Merge remote-tracking branch 'fbdev-current/fbdev-fixes-for-linus'

13 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Mon, 1 Aug 2011 01:32:34 +0000 (11:32 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

13 years agoMerge remote-tracking branch 'net-current/master'
Stephen Rothwell [Mon, 1 Aug 2011 01:32:26 +0000 (11:32 +1000)]
Merge remote-tracking branch 'net-current/master'

13 years agoMerge remote-tracking branch 'sparc-current/master'
Stephen Rothwell [Mon, 1 Aug 2011 01:32:24 +0000 (11:32 +1000)]
Merge remote-tracking branch 'sparc-current/master'

13 years agoregulator: aat2870 needs module.h
Randy Dunlap [Fri, 29 Jul 2011 19:43:13 +0000 (12:43 -0700)]
regulator: aat2870 needs module.h

aat2870-regulator.c needs to include linux/module.h to fix multiple
build errors.

drivers/regulator/aat2870-regulator.c:145: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/regulator/aat2870-regulator.c:230: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/regulator/aat2870-regulator.c:231: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/regulator/aat2870-regulator.c:232: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
13 years agopower: max8998_charger.c needs module.h
Randy Dunlap [Sat, 30 Jul 2011 04:11:43 +0000 (21:11 -0700)]
power: max8998_charger.c needs module.h

power/max8998_charger.c uses interfaces from linux/module.h,
so it should include that file.  This fixes build errors.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
13 years agoInitial EXPERIMENTAL implementation of device-mapper thin provisioning
Joe Thornber [Mon, 1 Aug 2011 00:51:12 +0000 (10:51 +1000)]
Initial EXPERIMENTAL implementation of device-mapper thin provisioning
with snapshot support.  The 'thin' target is used to create instances of
the virtual devices that are hosted in the 'thin-pool' target.  The
thin-pool target provides data sharing among devices.  This sharing is
made possible using the persistent-data library in the previous patch.

The main highlight of this implementation, compared to the previous
implementation of snapshots, is that it allows many virtual devices to
be stored on the same data volume, simplifying administration and
allowing sharing of data between volumes (thus reducing disk usage).

Another big feature is support for arbitrary depth of recursive
snapshots (snapshots of snapshots of snapshots ...).  The previous
implementation of snapshots did this by chaining together lookup tables,
and so performance was O(depth).  This new implementation uses a single
data structure so we don't get this degradation with depth.

For further information and examples of how to use this, please read
Documentation/device-mapper/thin-provisioning.txt

Signed-off-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoThe persistent-data library offers a re-usable framework for the storage
Joe Thornber [Mon, 1 Aug 2011 00:51:12 +0000 (10:51 +1000)]
The persistent-data library offers a re-usable framework for the storage
and management of on-disk metadata in device-mapper targets.

It's used by the thin-provisioning target in the next patch and in an
upcoming hierarchical storage target.

For further information, please read
Documentation/device-mapper/persistent-data.txt

Signed-off-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoDestroy _minor_idr when unloading the core dm module. (Found by kmemleak.)
Alasdair G Kergon [Mon, 1 Aug 2011 00:51:11 +0000 (10:51 +1000)]
Destroy _minor_idr when unloading the core dm module.  (Found by kmemleak.)

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoDM has always advertised both REQ_FLUSH and REQ_FUA flush capabilities
Mike Snitzer [Mon, 1 Aug 2011 00:51:11 +0000 (10:51 +1000)]
DM has always advertised both REQ_FLUSH and REQ_FUA flush capabilities
regardless of whether or not a given DM device's underlying devices
also advertised a need for them.

Block's flush-merge changes from 2.6.39 have proven to be more costly
for DM devices.  Performance regressions have been reported even when
DM's underlying devices do not advertise that they have a write cache.

Fix the performance regressions by configuring a DM device's flushing
capabilities based on those of the underlying devices' capabilities.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoSuppress sparse warnings about cpu_to_le32() by using __le32 types for
Alasdair G Kergon [Mon, 1 Aug 2011 00:51:11 +0000 (10:51 +1000)]
Suppress sparse warnings about cpu_to_le32() by using __le32 types for
on-disk data etc.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoExport dm_get_md() for the new thin provisioning target to use.
Alasdair G Kergon [Mon, 1 Aug 2011 00:51:10 +0000 (10:51 +1000)]
Export dm_get_md() for the new thin provisioning target to use.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoDetect invalid empty messages in core dm instead of requiring every target to
Alasdair G Kergon [Mon, 1 Aug 2011 00:51:10 +0000 (10:51 +1000)]
Detect invalid empty messages in core dm instead of requiring every target to
check this.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAdd a target feature flag to indicate that a target does not work in
Alasdair G Kergon [Mon, 1 Aug 2011 00:51:10 +0000 (10:51 +1000)]
Add a target feature flag to indicate that a target does not work in
read-only mode.

The thin provisioning target will use this.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoIntroduce the concept of a singleton table which contains exactly one target.
Alasdair G Kergon [Mon, 1 Aug 2011 00:51:09 +0000 (10:51 +1000)]
Introduce the concept of a singleton table which contains exactly one target.

If a target type sets the DM_TARGET_SINGLETON feature bit device-mapper
will ensure that any table that includes that target contains no others.

The thin provisioning pool target will use this.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoThere is no need for __table_get_device to be factored out.
Mike Snitzer [Mon, 1 Aug 2011 00:51:09 +0000 (10:51 +1000)]
There is no need for __table_get_device to be factored out.
Also move the exports to the end of their respective functions.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAdd optional parameter field to dmcrypt table and support
Milan Broz [Mon, 1 Aug 2011 00:51:09 +0000 (10:51 +1000)]
Add optional parameter field to dmcrypt table and support
"allow_discards" option.

Discard requests bypass crypt queue processing. Bio is simple remapped
to underlying device.

Note that discard will be never enabled by default because of security
consequences.  It is up to the administrator to enable it for encrypted
devices.

(Note that userspace cryptsetup does not understand new optional
parameters yet.  Support for this will come later.  Until then, you
should use 'dmsetup' to enable and disable this.)

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoA dm target only needs to use include/linux dm headers.
Alasdair G Kergon [Mon, 1 Aug 2011 00:51:09 +0000 (10:51 +1000)]
A dm target only needs to use include/linux dm headers.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoSupport the MD RAID1 personality through dm-raid.
Jonathan Brassow [Mon, 1 Aug 2011 00:51:08 +0000 (10:51 +1000)]
Support the MD RAID1 personality through dm-raid.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAdd the ability to parse and use metadata devices to dm-raid. Although
Jonathan Brassow [Mon, 1 Aug 2011 00:51:08 +0000 (10:51 +1000)]
Add the ability to parse and use metadata devices to dm-raid.  Although
not strictly required, without the metadata devices, many features of
RAID are unavailable.  They are used to store a superblock and bitmap.

The role, or position in the array, of each device must be recorded in
its superblock.  This is to help with fault handling, array reshaping,
and sanity checks.  RAID 4/5/6 devices must be loaded in a specific order:
in this way, the 'array_position' field helps validate the correctness
of the mapping when it is loaded.  It can be used during reshaping to
identify which devices are added/removed.  Fault handling is impossible
without this field.  For example, when a device fails it is recorded in
the superblock.  If this is a RAID1 device and the offending device is
removed from the array, there must be a way during subsequent array
assembly to determine that the failed device was the one removed.  This
is done by correlating the 'array_position' field and the bit-field
variable 'failed_devices'.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAdd the write_mostly parameter to RAID1 dm-raid tables.
Jonathan Brassow [Mon, 1 Aug 2011 00:51:08 +0000 (10:51 +1000)]
Add the write_mostly parameter to RAID1 dm-raid tables.

This allows the user to set the WriteMostly flag on a RAID1 device that
should normally be avoided for read I/O.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAllow the user to specify the region_size.
Jonathan Brassow [Mon, 1 Aug 2011 00:51:07 +0000 (10:51 +1000)]
Allow the user to specify the region_size.

Ensures that the supplied value meets md's constraints, viz. the number of
regions does not exceed 2^21.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAdd more information about some dm-raid table parameters and clarify how
Jonathan Brassow [Mon, 1 Aug 2011 00:51:07 +0000 (10:51 +1000)]
Add more information about some dm-raid table parameters and clarify how
parameters are printed when 'dmsetup table' is issued.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
[Heavily edited by AGK.  Unfinished.]

13 years agoExactly one of name, uuid or device must be specified when referencing
Mikulas Patocka [Mon, 1 Aug 2011 00:51:07 +0000 (10:51 +1000)]
Exactly one of name, uuid or device must be specified when referencing
an existing device.  This removes the ambiguity (risking the wrong
device being updated) if two conflicting parameters were specified.
Previously one parameter got used and any others were ignored silently.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoMove logic to find device based on major/minor number to a separate
Mikulas Patocka [Mon, 1 Aug 2011 00:51:06 +0000 (10:51 +1000)]
Move logic to find device based on major/minor number to a separate
function __get_dev_cell (similar to __get_uuid_cell and __get_name_cell).
This makes the function __find_device_hash_cell more straightforward.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoMove parameter filling from find_device to __find_device_hash_cell.
Mikulas Patocka [Mon, 1 Aug 2011 00:51:06 +0000 (10:51 +1000)]
Move parameter filling from find_device to __find_device_hash_cell.

This patch causes ioctls using __find_device_hash_cell
(DM_DEV_REMOVE_CMD, DM_DEV_SUSPEND_CMD - resume, DM_TABLE_CLEAR_CMD)
to return device parameters, bringing them into line with the other
ioctls.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAdd corrupt_bio_byte feature to simulate corruption by overwriting a byte at a
Mike Snitzer [Mon, 1 Aug 2011 00:51:06 +0000 (10:51 +1000)]
Add corrupt_bio_byte feature to simulate corruption by overwriting a byte at a
specified position with a specified value during intervals when the device is
"down".

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAdd 'drop_writes' option to drop writes silently while the
Mike Snitzer [Mon, 1 Aug 2011 00:51:05 +0000 (10:51 +1000)]
Add 'drop_writes' option to drop writes silently while the
device is 'down'.  Reads are not touched.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAdd the ability to specify arbitrary feature flags when creating a
Mike Snitzer [Mon, 1 Aug 2011 00:51:05 +0000 (10:51 +1000)]
Add the ability to specify arbitrary feature flags when creating a
flakey target.  This code uses the same target argument helpers that
the multipath target does.

Also remove the superfluous 'dm-flakey' prefixes from the error messages,
as they already contain the prefix 'flakey'.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoUse dm_target_offset() and support discards.
Mike Snitzer [Mon, 1 Aug 2011 00:51:05 +0000 (10:51 +1000)]
Use dm_target_offset() and support discards.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoMove multipath target argument parsing code into dm-table so other
Mike Snitzer [Mon, 1 Aug 2011 00:51:05 +0000 (10:51 +1000)]
Move multipath target argument parsing code into dm-table so other
targets can share it.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoIf we write a full chunk in the snapshot, skip reading the origin device
Mikulas Patocka [Mon, 1 Aug 2011 00:51:04 +0000 (10:51 +1000)]
If we write a full chunk in the snapshot, skip reading the origin device
because the whole chunk will be overwritten anyway.

This patch changes the snapshot write logic when a full chunk is written.
In this case:
  1. allocate the exception
  2. dispatch the bio (but don't report the bio completion to device mapper)
  3. write the exception record
  4. report bio completed

Callbacks must be done through the kcopyd thread, because callbacks must not
race with each other.  So we create two new functions:

  dm_kcopyd_prepare_callback: allocate a job structure and prepare the callback.
  (This function must not be called from interrupt context.)

  dm_kcopyd_do_callback: submit callback.
  (This function may be called from interrupt context.)

Performance test (on snapshots with 4k chunk size):
  without the patch:
    non-direct-io sequential write (dd):    17.7MB/s
    direct-io sequential write (dd):        20.9MB/s
    non-direct-io random write (mkfs.ext2): 0.44s

  with the patch:
    non-direct-io sequential write (dd):    26.5MB/s
    direct-io sequential write (dd):        33.2MB/s
    non-direct-io random write (mkfs.ext2): 0.27s

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAdd a new flag DMF_MERGE_IS_OPTIONAL to struct mapped_device to indicate
Mikulas Patocka [Mon, 1 Aug 2011 00:51:04 +0000 (10:51 +1000)]
Add a new flag DMF_MERGE_IS_OPTIONAL to struct mapped_device to indicate
whether the device can accept bios larger than the size its merge
function returns.  When set, use this to send large bios to snapshots
which can split them if necessary.  Snapshot I/O may be significantly
fragmented and this approach seems to improve peformance.

Before the patch, dm_set_device_limits restricted bio size to page size
if the underlying device had a merge function and the target didn't
provide a merge function.  After the patch, dm_set_device_limits
restricts bio size to page size if the underlying device has a merge
function, doesn't have DMF_MERGE_IS_OPTIONAL flag and the target doesn't
provide a merge function.

The snapshot target can't provide a merge function because when the merge
function is called, it is impossible to determine where the bio will be
remapped.  Previously this led us to impose a 4k limit, which we can
now remove if the snapshot store is located on a device without a merge
function.  Together with another patch for optimizing full chunk writes,
it improves performance from 29MB/s to 40MB/s when writing to the
filesystem on snapshot store.

If the snapshot store is placed on a non-dm device with a merge function
(such as md-raid), device mapper still limits all bios to page size.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoThis patch introduces dm_kcopyd_zero() to make it easy to use
Mikulas Patocka [Mon, 1 Aug 2011 00:51:04 +0000 (10:51 +1000)]
This patch introduces dm_kcopyd_zero() to make it easy to use
kcopyd to write zeros into the requested areas instead
instead of copying.  It is implemented by passing a NULL
copying source to dm_kcopyd_copy().

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoRe-order the parameters so they are handled consistently in the same order
Jonathan Brassow [Mon, 1 Aug 2011 00:51:03 +0000 (10:51 +1000)]
Re-order the parameters so they are handled consistently in the same order
where defined, parsed and output.

Only include rebuild parameters in the STATUSTYPE_TABLE output if they were
supplied in the original table line.

Correct the parameter count when outputting rebuild: there are two words,
not one.

Use case-independent checks for keywords (as in other device-mapper targets).

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoCoding style cleanups.
Jonathan Brassow [Mon, 1 Aug 2011 00:51:03 +0000 (10:51 +1000)]
Coding style cleanups.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
13 years agoRemove a couple of unused #defines.
Mikulas Patocka [Mon, 1 Aug 2011 00:51:02 +0000 (10:51 +1000)]
Remove a couple of unused #defines.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoThe nr_pages field in struct kcopyd_job is only used temporarily in
Mikulas Patocka [Mon, 1 Aug 2011 00:51:01 +0000 (10:51 +1000)]
The nr_pages field in struct kcopyd_job is only used temporarily in
run_pages_job() to count the number of required pages.
We can use a local variable instead.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoThe offset field in struct kcopyd_job is always zero so remove it.
Mikulas Patocka [Mon, 1 Aug 2011 00:51:01 +0000 (10:51 +1000)]
The offset field in struct kcopyd_job is always zero so remove it.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoUse vzalloc() instead of vmalloc()+memset().
Joe Perches [Mon, 1 Aug 2011 00:51:00 +0000 (10:51 +1000)]
Use vzalloc() instead of vmalloc()+memset().

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoReplace list_del() followed by list_add() with list_move().
Kirill A. Shutemov [Mon, 1 Aug 2011 00:51:00 +0000 (10:51 +1000)]
Replace list_del() followed by list_add() with list_move().

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoUsing __test_and_{set,clear}_bit_le() with ignoring its return value
Akinobu Mita [Mon, 1 Aug 2011 00:50:59 +0000 (10:50 +1000)]
Using __test_and_{set,clear}_bit_le() with ignoring its return value
can be replaced with __{set,clear}_bit_le().

This also removes unnecessary casts.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>
13 years agoRemove 'discards_supported' from the dm_table structure. The same
Mike Snitzer [Mon, 1 Aug 2011 00:50:58 +0000 (10:50 +1000)]
Remove 'discards_supported' from the dm_table structure.  The same
information can be easily discovered from the table's target(s) in
dm_table_supports_discards().

Before this fix dm_table_supports_discards() would skip checking the
individual targets' 'discards_supported' flag if any one target in the
table didn't set num_discard_requests > 0.  Now the per-target
'discards_supported' flag is effective at insuring the final DM device
advertises discard support.  But, to be clear, targets that don't
support discards (!num_discard_requests) will not receive discard
requests.

Also DMWARN if a target sets 'discards_supported' override but forgets
to set 'num_discard_requests'.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoFor normal kernel pages, CPU cache is synchronized by the dma layer.
Mikulas Patocka [Mon, 1 Aug 2011 00:50:57 +0000 (10:50 +1000)]
For normal kernel pages, CPU cache is synchronized by the dma layer.
However, this is not done for pages allocated with vmalloc. If we do I/O
to/from vmallocated pages, we must synchronize CPU cache explicitly.

Prior to doing I/O on vmallocated page we must call
flush_kernel_vmap_range to flush dirty cache on the virtual address.
After finished read we must call invalidate_kernel_vmap_range to
invalidate cache on the virtual address, so that accesses to the virtual
address return newly read data and not stale data from CPU cache.

This patch fixes metadata corruption on dm-snapshots on PA-RISC and
possibly other architectures with caches indexed by virtual address.

Cc: stable <stable@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoAvoid dereferencing a NULL pointer if the number of feature arguments
Mike Snitzer [Mon, 1 Aug 2011 00:50:56 +0000 (10:50 +1000)]
Avoid dereferencing a NULL pointer if the number of feature arguments
supplied is fewer than indicated.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: stable@kernel.org
13 years agoThis patch makes dm-snapshot flush disk cache when writing metadata for
Mikulas Patocka [Mon, 1 Aug 2011 00:50:55 +0000 (10:50 +1000)]
This patch makes dm-snapshot flush disk cache when writing metadata for
merging snapshot.

Without cache flushing the disk may reorder metadata write and other
data writes and there is a possibility of data corruption in case of
power fault.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Linus Torvalds [Mon, 1 Aug 2011 00:31:44 +0000 (14:31 -1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (46 commits)
  mfd: Fix mismatch in twl4030 mutex lock-unlock
  mfd: twl6030-pwm.c needs MODULE_LICENSE
  mfd: Fix the omap-usb-host clock API usage on usbhs_disable()
  mfd: Acknowledge WM8994 IRQs before reporting
  mfd: Acknowlege all WM831x IRQs before we handle them
  mfd: Avoid two assignments if failures happen in tps65910_i2c_probe
  regulator: Storing tps65912 error codes in u8
  mfd: Don't leak init_data in tps65910_i2c_probe
  regulator: aat2870: Add AAT2870 regulator driver
  backlight: Add AAT2870 backlight driver
  mfd: Add AAT2870 mfd driver
  mfd: Remove dead code from max8997-irq
  mfd: Move TPS55910 Kconfig option
  mfd: Fix missing stmpe kerneldoc
  mfd: Fix off-by-one value range checking for tps65912_i2c_write
  mfd: Add devices for WM831x clocking module
  mfd: Remove comp{1,2}_threshold sysfs entries in tps65911_comparator_remove
  mfd: Don't ask about the TPS65912 core driver in Kconfig
  mfd: Fix off by one in WM831x IRQ code
  mfd: Add tps65921 support from twl-core
  ...

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Mon, 1 Aug 2011 00:30:59 +0000 (14:30 -1000)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k/math-emu: Remove unnecessary code
  m68k/math-emu: Remove commented out old code
  m68k: Kill warning in setup_arch() when compiling for Sun3
  m68k/atari: Prefix GPIO_{IN,OUT} with CODEC_
  sparc: iounmap() and *_free_coherent() - Use lookup_resource()
  m68k/atari: Reserve some ST-RAM early on for device buffer use
  m68k/amiga: Chip RAM - Use lookup_resource()
  resources: Add lookup_resource()
  sparc: _sparc_find_resource() should check for exact matches
  m68k/amiga: Chip RAM - Offset resource end by CHIP_PHYSADDR
  m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error
  m68k/amiga: Chip RAM - Change chipavail to an atomic_t
  m68k/amiga: Chip RAM - Always allocate from the start of memory
  m68k/amiga: Chip RAM - Convert from printk() to pr_*()
  m68k/amiga: Chip RAM - Use tabs for indentation

13 years agoNFS: Re-enable compilation of nfs with !CONFIG_NFS_V4 || !CONFIG_NFS_V4_1
Trond Myklebust [Sun, 31 Jul 2011 20:39:04 +0000 (16:39 -0400)]
NFS: Re-enable compilation of nfs with !CONFIG_NFS_V4 || !CONFIG_NFS_V4_1

Fix two recently introduced compile problems:

Fix a typo in fs/nfs/pnfs.h

Move the pnfs_blksize declaration outside the CONFIG_NFS_V4 section in
struct nfs_server.

Reported-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years ago[PARISC] wire up sendmmsg syscall
James Bottomley [Fri, 29 Jul 2011 14:37:02 +0000 (18:37 +0400)]
[PARISC] wire up sendmmsg syscall

Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years agoMerge branch 'turbostat-format' into tools-test
Len Brown [Sun, 31 Jul 2011 22:33:57 +0000 (18:33 -0400)]
Merge branch 'turbostat-format' into tools-test

13 years agotools/power turbostat: fit output into 80 columns on snb-ep
Len Brown [Sun, 31 Jul 2011 22:19:33 +0000 (18:19 -0400)]
tools/power turbostat: fit output into 80 columns on snb-ep

Reduce columns for package number to 1.
If you can afford more than 9 packages,
you can also afford a terminal with more than 80 columns:-)

Also shave a column also off the package C-states

Signed-off-by: Len Brown <len.brown@intel.com>
13 years agomfd: Fix mismatch in twl4030 mutex lock-unlock
Sanjeev Premi [Mon, 11 Jul 2011 15:20:31 +0000 (20:50 +0530)]
mfd: Fix mismatch in twl4030 mutex lock-unlock

A mutex is locked on entry into twl4030_madc_conversion().
Immediate return on some error conditions leaves the
mutex locked.

This patch ensures that mutex is always unlocked before
leaving the function.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: twl6030-pwm.c needs MODULE_LICENSE
Randy Dunlap [Sat, 23 Jul 2011 00:17:08 +0000 (17:17 -0700)]
mfd: twl6030-pwm.c needs MODULE_LICENSE

twl6030_pwm: module license 'unspecified' taints kernel.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Hemanth V <hemanthv@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix the omap-usb-host clock API usage on usbhs_disable()
Keshava Munegowda [Fri, 22 Jul 2011 13:09:30 +0000 (18:39 +0530)]
mfd: Fix the omap-usb-host clock API usage on usbhs_disable()

usbhs_disable function was invoking clk_enable() instead of
clk_disable(), thus only increasing the clock usage counter and
preventing this particular clock from being ever turned off.
Because of this, the power domain of omap4 the USB Host subsystem
would never reach lower power states.This patch calls clk_disable()
in usbhs_disable function

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>