]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge remote-tracking branch 'mfd/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 01:18:47 +0000 (11:18 +1000)]
Merge remote-tracking branch 'mfd/for-next'

Conflicts:
arch/arm/configs/tegra_defconfig
drivers/mfd/mc13xxx-spi.c
drivers/regulator/s5m8767.c
include/linux/mfd/s5m87xx/s5m-core.h

12 years agoMerge remote-tracking branch 'md/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 01:10:20 +0000 (11:10 +1000)]
Merge remote-tracking branch 'md/for-next'

12 years agoMerge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 01:03:19 +0000 (11:03 +1000)]
Merge remote-tracking branch 'slab/for-next'

12 years agoMerge branch 'quilt/device-mapper'
Stephen Rothwell [Wed, 25 Jul 2012 01:01:25 +0000 (11:01 +1000)]
Merge branch 'quilt/device-mapper'

12 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 01:01:22 +0000 (11:01 +1000)]
Merge remote-tracking branch 'block/for-next'

12 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:57:21 +0000 (10:57 +1000)]
Merge remote-tracking branch 'cgroup/for-next'

12 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Wed, 25 Jul 2012 00:55:27 +0000 (10:55 +1000)]
Merge remote-tracking branch 'input/next'

12 years agoMerge branch 'quilt/rr'
Stephen Rothwell [Wed, 25 Jul 2012 00:48:26 +0000 (10:48 +1000)]
Merge branch 'quilt/rr'

12 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:46:53 +0000 (10:46 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'

12 years agoMerge remote-tracking branch 'drm/drm-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:43:28 +0000 (10:43 +1000)]
Merge remote-tracking branch 'drm/drm-next'

Conflicts:
include/linux/pci_regs.h

12 years agoMerge remote-tracking branch 'crypto/master'
Stephen Rothwell [Wed, 25 Jul 2012 00:41:49 +0000 (10:41 +1000)]
Merge remote-tracking branch 'crypto/master'

12 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Wed, 25 Jul 2012 00:40:14 +0000 (10:40 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

Conflicts:
arch/arm/mach-imx/clk-imx6q.c

12 years agoMerge remote-tracking branch 'mtd/master'
Stephen Rothwell [Wed, 25 Jul 2012 00:38:37 +0000 (10:38 +1000)]
Merge remote-tracking branch 'mtd/master'

12 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Wed, 25 Jul 2012 00:37:03 +0000 (10:37 +1000)]
Merge remote-tracking branch 'bluetooth/master'

12 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Wed, 25 Jul 2012 00:33:00 +0000 (10:33 +1000)]
Merge remote-tracking branch 'slave-dma/next'

Conflicts:
drivers/dma/Kconfig
drivers/dma/Makefile
drivers/mmc/host/sh_mmcif.c

12 years agoMerge remote-tracking branch 'isci/all'
Stephen Rothwell [Wed, 25 Jul 2012 00:31:22 +0000 (10:31 +1000)]
Merge remote-tracking branch 'isci/all'

12 years agoMerge remote-tracking branch 'target-merge/for-next-merge'
Stephen Rothwell [Wed, 25 Jul 2012 00:29:44 +0000 (10:29 +1000)]
Merge remote-tracking branch 'target-merge/for-next-merge'

12 years agoMerge remote-tracking branch 'scsi/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:27:34 +0000 (10:27 +1000)]
Merge remote-tracking branch 'scsi/for-next'

Conflicts:
drivers/ata/libata-core.c
include/scsi/scsi_device.h

12 years agoMerge remote-tracking branch 'dlm/next'
Stephen Rothwell [Wed, 25 Jul 2012 00:25:56 +0000 (10:25 +1000)]
Merge remote-tracking branch 'dlm/next'

12 years agoMerge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:24:18 +0000 (10:24 +1000)]
Merge remote-tracking branch 'ieee1394/for-next'

12 years agoMerge remote-tracking branch 'cpuidle/cpuidle-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:24:06 +0000 (10:24 +1000)]
Merge remote-tracking branch 'cpuidle/cpuidle-next'

Conflicts:
drivers/cpuidle/coupled.c

12 years agoMerge remote-tracking branch 'acpi/next'
Stephen Rothwell [Wed, 25 Jul 2012 00:22:14 +0000 (10:22 +1000)]
Merge remote-tracking branch 'acpi/next'

Conflicts:
drivers/pci/pci-acpi.c

12 years agoMerge remote-tracking branch 'infiniband/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:21:58 +0000 (10:21 +1000)]
Merge remote-tracking branch 'infiniband/for-next'

12 years agoMerge remote-tracking branch 'libata/NEXT'
Stephen Rothwell [Wed, 25 Jul 2012 00:19:53 +0000 (10:19 +1000)]
Merge remote-tracking branch 'libata/NEXT'

12 years agoMerge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:18:17 +0000 (10:18 +1000)]
Merge remote-tracking branch 'kconfig/for-next'

12 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:16:33 +0000 (10:16 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

12 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Wed, 25 Jul 2012 00:14:02 +0000 (10:14 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'

Conflicts:
Documentation/feature-removal-schedule.txt

12 years agoMerge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Wed, 25 Jul 2012 00:12:32 +0000 (10:12 +1000)]
Merge branch 'quilt/jdelvare-hwmon'

12 years agoMerge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:11:02 +0000 (10:11 +1000)]
Merge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'

Conflicts:
drivers/i2c/busses/i2c-nomadik.c

12 years agoMerge remote-tracking branch 'bjdooks-i2c/next-i2c'
Stephen Rothwell [Wed, 25 Jul 2012 00:10:55 +0000 (10:10 +1000)]
Merge remote-tracking branch 'bjdooks-i2c/next-i2c'

Conflicts:
drivers/i2c/busses/i2c-omap.c

12 years agoMerge branch 'quilt/i2c'
Stephen Rothwell [Wed, 25 Jul 2012 00:10:40 +0000 (10:10 +1000)]
Merge branch 'quilt/i2c'

12 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:10:23 +0000 (10:10 +1000)]
Merge remote-tracking branch 'hid/for-next'

12 years agoMerge remote-tracking branch 'pci/next'
Stephen Rothwell [Wed, 25 Jul 2012 00:07:02 +0000 (10:07 +1000)]
Merge remote-tracking branch 'pci/next'

12 years agoMerge remote-tracking branch 'xfs/for-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:05:27 +0000 (10:05 +1000)]
Merge remote-tracking branch 'xfs/for-next'

Conflicts:
fs/xfs/xfs_buf.c
fs/xfs/xfs_log.c
fs/xfs/xfs_log_priv.h

12 years agoMerge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:03:48 +0000 (10:03 +1000)]
Merge remote-tracking branch 'nfsd/nfsd-next'

12 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Wed, 25 Jul 2012 00:02:04 +0000 (10:02 +1000)]
Merge remote-tracking branch 'nfs/linux-next'

12 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Wed, 25 Jul 2012 00:00:28 +0000 (10:00 +1000)]
Merge remote-tracking branch 'logfs/master'

12 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Tue, 24 Jul 2012 23:55:58 +0000 (09:55 +1000)]
Merge remote-tracking branch 'gfs2/master'

12 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Tue, 24 Jul 2012 23:54:33 +0000 (09:54 +1000)]
Merge remote-tracking branch 'fuse/for-next'

12 years agoMerge remote-tracking branch 'ext4/dev'
Stephen Rothwell [Tue, 24 Jul 2012 23:53:03 +0000 (09:53 +1000)]
Merge remote-tracking branch 'ext4/dev'

12 years agoMerge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Tue, 24 Jul 2012 23:51:38 +0000 (09:51 +1000)]
Merge remote-tracking branch 'ext3/for_next'

12 years agoMerge remote-tracking branch 'ecryptfs/next'
Stephen Rothwell [Tue, 24 Jul 2012 23:50:14 +0000 (09:50 +1000)]
Merge remote-tracking branch 'ecryptfs/next'

12 years agoMerge remote-tracking branch 'cifs/for-next'
Stephen Rothwell [Tue, 24 Jul 2012 23:48:41 +0000 (09:48 +1000)]
Merge remote-tracking branch 'cifs/for-next'

12 years agoMerge remote-tracking branch 'ceph/master'
Stephen Rothwell [Tue, 24 Jul 2012 23:47:16 +0000 (09:47 +1000)]
Merge remote-tracking branch 'ceph/master'

Conflicts:
net/ceph/messenger.c
net/ceph/osd_client.c

12 years agoMerge remote-tracking branch 'unicore32/unicore32'
Stephen Rothwell [Tue, 24 Jul 2012 23:45:42 +0000 (09:45 +1000)]
Merge remote-tracking branch 'unicore32/unicore32'

12 years agoMerge remote-tracking branch 'galak/next'
Stephen Rothwell [Tue, 24 Jul 2012 23:44:15 +0000 (09:44 +1000)]
Merge remote-tracking branch 'galak/next'

12 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Tue, 24 Jul 2012 23:42:51 +0000 (09:42 +1000)]
Merge remote-tracking branch 'mpc5xxx/next'

12 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Tue, 24 Jul 2012 23:41:21 +0000 (09:41 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

12 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Tue, 24 Jul 2012 23:39:54 +0000 (09:39 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'

12 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Tue, 24 Jul 2012 23:38:26 +0000 (09:38 +1000)]
Merge remote-tracking branch 'cris/for-next'

12 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Stephen Rothwell [Tue, 24 Jul 2012 23:38:14 +0000 (09:38 +1000)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

12 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Tue, 24 Jul 2012 23:36:49 +0000 (09:36 +1000)]
Merge remote-tracking branch 'arm/for-next'

12 years agoMerge remote-tracking branch 'gpio-current/gpio/merge'
Stephen Rothwell [Tue, 24 Jul 2012 23:35:24 +0000 (09:35 +1000)]
Merge remote-tracking branch 'gpio-current/gpio/merge'

12 years agoMerge remote-tracking branch 'spi-current/spi/merge'
Stephen Rothwell [Tue, 24 Jul 2012 23:35:21 +0000 (09:35 +1000)]
Merge remote-tracking branch 'spi-current/spi/merge'

12 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Tue, 24 Jul 2012 23:35:19 +0000 (09:35 +1000)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

12 years agoMerge remote-tracking branch 'sparc/master'
Stephen Rothwell [Tue, 24 Jul 2012 23:34:54 +0000 (09:34 +1000)]
Merge remote-tracking branch 'sparc/master'

12 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Tue, 24 Jul 2012 23:34:51 +0000 (09:34 +1000)]
Merge remote-tracking branch 'm68k-current/for-linus'

12 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Tue, 24 Jul 2012 23:34:49 +0000 (09:34 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

12 years agoAdd read-only and fail-io modes to thin provisioning.
Joe Thornber [Tue, 24 Jul 2012 23:25:33 +0000 (09:25 +1000)]
Add read-only and fail-io modes to thin provisioning.

If a transaction commit fails the pool's metadata device will transition
to "read-only" mode.  If a commit fails once already in read-only mode
the transition to "fail-io" mode occurs.

Once in fail-io mode the pool and all associated thin devices will
report a status of "Fail".

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoIntroduce dm_pool_abort_metadata to abort the current metadata
Joe Thornber [Tue, 24 Jul 2012 23:25:33 +0000 (09:25 +1000)]
Introduce dm_pool_abort_metadata to abort the current metadata
transaction.  Generally this will only be called when bad things are
happening and dm-thin is trying to roll back to a good state for
read-only mode.

It's complicated by the fact that the metadata device may have failed
completely causing the abort to be unable to read the old transaction.
In this case the metadata object is placed in a 'fail' mode and
everything fails apart from destroying it.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoIntroduce dm_pool_metadata_set_read_only to put the underlying block
Joe Thornber [Tue, 24 Jul 2012 23:25:32 +0000 (09:25 +1000)]
Introduce dm_pool_metadata_set_read_only to put the underlying block
manager into read-only mode.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoIntroduce dm_bm_set_read_only to switch the block manager into a
Joe Thornber [Tue, 24 Jul 2012 23:25:32 +0000 (09:25 +1000)]
Introduce dm_bm_set_read_only to switch the block manager into a
read-only mode.  To be used when dm-thin degrades due to io errors on
the metadata device.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoReduce the number of metadata commits by using
Joe Thornber [Tue, 24 Jul 2012 23:25:32 +0000 (09:25 +1000)]
Reduce the number of metadata commits by using
dm_thin_changed_this_transaction to check if metadata was changed on a
per thin device granularity.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoIntroduce dm_thin_changed_this_transaction to dm-thin-metadata to publish a
Joe Thornber [Tue, 24 Jul 2012 23:25:31 +0000 (09:25 +1000)]
Introduce dm_thin_changed_this_transaction to dm-thin-metadata to publish a
useful bit of information we're already tracking.  This will help dm thin
decide when to commit.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoAdd a parameter to dm_pool_metadata_open to indicate whether or not an unformatted
Joe Thornber [Tue, 24 Jul 2012 23:25:31 +0000 (09:25 +1000)]
Add a parameter to dm_pool_metadata_open to indicate whether or not an unformatted
metadata area should be formatted.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoTidy up error path in __open_metadata and __format_metadata in dm-thin-metadata.
Joe Thornber [Tue, 24 Jul 2012 23:25:30 +0000 (09:25 +1000)]
Tidy up error path in __open_metadata and __format_metadata in dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoFactor out __check_incompat_features and only call it once when we open
Mike Snitzer [Tue, 24 Jul 2012 23:25:30 +0000 (09:25 +1000)]
Factor out __check_incompat_features and only call it once when we open
the metadata device rather than at the beginning of every transaction.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoRemove some duplicate initialisation of struct dm_pool_metadata.
Joe Thornber [Tue, 24 Jul 2012 23:25:29 +0000 (09:25 +1000)]
Remove some duplicate initialisation of struct dm_pool_metadata.

These pmd fields are initialised by both:
  __format_metadata's calls to dm_btree_empty
  __write_initial_superblock + __begin_transaction

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoRemove 'create' parameter from __create_persistent_data_objects() in dm-thin-metadata.
Joe Thornber [Tue, 24 Jul 2012 23:25:29 +0000 (09:25 +1000)]
Remove 'create' parameter from __create_persistent_data_objects() in dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoMove the check for __superblock_all_zeroes from
Joe Thornber [Tue, 24 Jul 2012 23:25:29 +0000 (09:25 +1000)]
Move the check for __superblock_all_zeroes from
__create_persistent_data_objects() down to __open_or_format_metadata in
dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoRemove nr_blocks arg from __create_persistent_data_objects in dm-thin-metadata.
Joe Thornber [Tue, 24 Jul 2012 23:25:28 +0000 (09:25 +1000)]
Remove nr_blocks arg from __create_persistent_data_objects in dm-thin-metadata.
It was always passed as zero.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoSplit __open_or_format_metadata into __format_metadata and __open_metadata in
Joe Thornber [Tue, 24 Jul 2012 23:25:28 +0000 (09:25 +1000)]
Split __open_or_format_metadata into __format_metadata and __open_metadata in
dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoClean up __open_or_format_metadata in dm-thin-metadata by using struct
Joe Thornber [Tue, 24 Jul 2012 23:25:27 +0000 (09:25 +1000)]
Clean up __open_or_format_metadata in dm-thin-metadata by using struct
dm_pool_metadata members to replace local variables.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoZero the unused uuid when initialising the metadata superblock.
Joe Thornber [Tue, 24 Jul 2012 23:25:27 +0000 (09:25 +1000)]
Zero the unused uuid when initialising the metadata superblock.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoLift the call to __begin_transaction out of __write_initial_superblock in dm-thin...
Joe Thornber [Tue, 24 Jul 2012 23:25:26 +0000 (09:25 +1000)]
Lift the call to __begin_transaction out of __write_initial_superblock in dm-thin-metadata.
Called higher up the call chain now.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoMove dm_commit_pool_metadata inline into __write_initial_superblock in dm-thin-metadata.
Joe Thornber [Tue, 24 Jul 2012 23:25:26 +0000 (09:25 +1000)]
Move dm_commit_pool_metadata inline into __write_initial_superblock in dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoFactor out __write_initial_superblock and also pull some other initial
Joe Thornber [Tue, 24 Jul 2012 23:25:26 +0000 (09:25 +1000)]
Factor out __write_initial_superblock and also pull some other initial
creation code out of dm_pool_metadata_open.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoLift some initialisation out of __open_or_format_metadata in dm-thin-metadata.
Joe Thornber [Tue, 24 Jul 2012 23:25:25 +0000 (09:25 +1000)]
Lift some initialisation out of __open_or_format_metadata in dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoFactor __destroy_persistent_data_objects out of dm_pool_metadata_close.
Joe Thornber [Tue, 24 Jul 2012 23:25:25 +0000 (09:25 +1000)]
Factor __destroy_persistent_data_objects out of dm_pool_metadata_close.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoMove block manager creation and the check for unformatted metadata into
Joe Thornber [Tue, 24 Jul 2012 23:25:24 +0000 (09:25 +1000)]
Move block manager creation and the check for unformatted metadata into
__create_persistent_data_objects().

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoRename init_pmd to __create_persistent_data_objects in dm-thin-metadata.
Joe Thornber [Tue, 24 Jul 2012 23:25:24 +0000 (09:25 +1000)]
Rename init_pmd to __create_persistent_data_objects in dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoIntroduce wrappers to handle write locking the superblock
Joe Thornber [Tue, 24 Jul 2012 23:25:24 +0000 (09:25 +1000)]
Introduce wrappers to handle write locking the superblock
appropriately.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoStop using dm_bm_unlock_move when shadowing blocks in the transaction
Joe Thornber [Tue, 24 Jul 2012 23:25:23 +0000 (09:25 +1000)]
Stop using dm_bm_unlock_move when shadowing blocks in the transaction
manager as an optimisation and remove the function as it is then no
longer used.

Some code, such as the space maps, keeps using on-disk data structures
from the previous transaction.  It can do this because blocks won't
be reallocated until the subsequent transaction.  Using
dm_bm_unlock_move to copy blocks sounds like a win, but it forces a
synchronous read should the old block be accessed.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoTidy the transaction manager creation functions.
Joe Thornber [Tue, 24 Jul 2012 23:25:23 +0000 (09:25 +1000)]
Tidy the transaction manager creation functions.

They no longer lock the superblock.  Superblock locking is pulled out to
the caller.

Also export dm_bm_write_lock_zero.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoRemove an optimisation that tracks whether or not a thin metadata commit
Joe Thornber [Tue, 24 Jul 2012 23:25:22 +0000 (09:25 +1000)]
Remove an optimisation that tracks whether or not a thin metadata commit
is needed.

If dm_pool_commit_metadata() is called and no changes have been made
to the metadata then this optimisation avoided writing to disk.

Removing because we're going to do something better later.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoThis patch introduces a separate struct for the block_manager.
Joe Thornber [Tue, 24 Jul 2012 23:25:22 +0000 (09:25 +1000)]
This patch introduces a separate struct for the block_manager.
It also uses IS_ERR to check the return value of dm_bufio_client_create
instead of testing incorrectly for NULL.

Prior to this patch a struct dm_block_manager was really an alias for
a struct dm_bufio_client.  We want to add some functionality to the
block manager that will require extra fields, so this one to one
mapping is no longer valid.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoFactor __setup_btree_details out of init_pmd in dm-thin-metadata.
Joe Thornber [Tue, 24 Jul 2012 23:25:21 +0000 (09:25 +1000)]
Factor __setup_btree_details out of init_pmd in dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoUse boolean bit fields for flags in struct dm_target.
Alasdair G Kergon [Tue, 24 Jul 2012 23:25:21 +0000 (09:25 +1000)]
Use boolean bit fields for flags in struct dm_target.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoThe thin provisioning target commits internal metadata on flush. So it
Joe Thornber [Tue, 24 Jul 2012 23:25:21 +0000 (09:25 +1000)]
The thin provisioning target commits internal metadata on flush.  So it
should receive flushes regardless of whether the underlying devices
support them.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoAllow targets to override the 'supports flush' calculation.
Joe Thornber [Tue, 24 Jul 2012 23:25:20 +0000 (09:25 +1000)]
Allow targets to override the 'supports flush' calculation.

Set 'flush_supported' if a target needs to receive flushes regardless of
whether or not its underlying devices have support.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoIntroduce bitmap_index_changed to track whether or not the index changed
Joe Thornber [Tue, 24 Jul 2012 23:25:20 +0000 (09:25 +1000)]
Introduce bitmap_index_changed to track whether or not the index changed
then only commit a space map if it did.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoUnlock the superblock even if initial dm_bufio_write_dirty_buffers fails.
Joe Thornber [Tue, 24 Jul 2012 23:25:19 +0000 (09:25 +1000)]
Unlock the superblock even if initial dm_bufio_write_dirty_buffers fails.

Also, remove redundant flush calls.  dm_bm_flush_and_unlock's calls to
dm_bufio_write_dirty_buffers already result in dm_bufio_issue_flush
being called.

This avoids warnings about unflushed dirty buffers from bufio.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoThere's no need to break sharing, triggering a copy, for a write that has no
Joe Thornber [Tue, 24 Jul 2012 23:25:19 +0000 (09:25 +1000)]
There's no need to break sharing, triggering a copy, for a write that has no
data (i.e. a flush).

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoFix memory leak in process_prepared_mapping by always freeing
Joe Thornber [Tue, 24 Jul 2012 23:25:18 +0000 (09:25 +1000)]
Fix memory leak in process_prepared_mapping by always freeing
the dm_thin_new_mapping structs from the mapping_pool mempool on
the error paths.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoIn preparation for RAID10 inclusion in dm-raid, we move the sectors_per_dev
Jonathan E Brassow [Tue, 24 Jul 2012 23:25:18 +0000 (09:25 +1000)]
In preparation for RAID10 inclusion in dm-raid, we move the sectors_per_dev
calculation later in the device creation process.  This is because we won't
know up-front how many stripes vs how many mirrors there are which will
change the calculation.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoIn preparation for RAID10 addition to dm-raid, we change an 'if' conditional
Jonathan E Brassow [Tue, 24 Jul 2012 23:25:18 +0000 (09:25 +1000)]
In preparation for RAID10 addition to dm-raid, we change an 'if' conditional
to a 'switch' conditional to make it easier to see what is being checked for
each RAID type.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoA SCSI device handler might get attached to a device during the
Mike Snitzer [Tue, 24 Jul 2012 23:25:17 +0000 (09:25 +1000)]
A SCSI device handler might get attached to a device during the
initial device scan.  We do not necessarily want to override
this when loading a multipath table, so this patch adds a new
multipath feature argument "retain_attached_hw_handler".

During SCSI device scan all loaded SCSI device handlers will be
consulted for a match (via scsi_dh's provided .match).  If a match is
found that device handler will be attached.  We need a way to have
userspace multipathd's provided 'hw_handler' not override the already
attached hardware handler.

When specifying the new feature 'retain_attached_hw_handler' multipath
will use the currently attached hardware handler instead of trying to
attach the one specified during table load.  If no hardware handler is
attached the specified hardware handler will still be used.

Leverages scsi_dh_attach's ability to increment the scsi_dh's reference
count if the same scsi_dh name is provided when attaching - currently
attached scsi_dh name is determined with scsi_dh_attached_handler_name.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Tested-by: Babu Moger <babu.moger@netapp.com>
Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm-thin will be most likely used with a block size that is a power of
Mikulas Patocka [Tue, 24 Jul 2012 23:25:17 +0000 (09:25 +1000)]
dm-thin will be most likely used with a block size that is a power of
two. So it should be optimized for this case.

This patch changes division and modulo operations to shifts and bit
masks if block size is a power of two.

A test that bi_sector is divisible by a block size is removed from
io_overlaps_block. Device mapper never sends bios that span a block
boundary. Consequently, if we tested that bi_size is equivalent to block
size, bi_sector must already be on a block boundary.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoThis patch sets the variable "ti->split_discard_requests", so that
Mikulas Patocka [Tue, 24 Jul 2012 23:25:16 +0000 (09:25 +1000)]
This patch sets the variable "ti->split_discard_requests", so that
device mapper core splits discard requests on a block boundary.

Consequently, a discard request that spans multiple blocks is never sent
to dm-thin. The patch also removes some code in process_discard that
deals with discards that span multiple blocks.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoThis patch introduces a new variable split_discard_requests. It can be
Mikulas Patocka [Tue, 24 Jul 2012 23:25:16 +0000 (09:25 +1000)]
This patch introduces a new variable split_discard_requests. It can be
set by targets so that discard requests are split on max_io_len
boundaries.

When split_discard_requests is not set, discard requests are only split on
boundaries between targets, as was the case before this patch.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>