linux-stable/drivers/md
Mike Snitzer 873f258bec dm thin metadata: do not write metadata if no changes occurred
Otherwise, just activating a thin-pool and thin device and then
deactivating them will cause the thin-pool metadata to be changed
(e.g. superblock written) -- even without any metadata being changed.

Add 'in_service' flag to struct dm_pool_metadata and set it in
pmd_write_lock() because all on-disk metadata changes must take a write
lock of pmd->root_lock.  Once 'in_service' is set it is never cleared.
__commit_transaction() will return 0 if 'in_service' is not set.
dm_pool_commit_metadata() is updated to use __pmd_write_lock() so that
it isn't the sole reason for putting a thin-pool in service.

Also fix dm_pool_commit_metadata() to open the next transaction if the
return from __commit_transaction() is 0.  Not seeing why the early
return ever made since for a return of 0 given that dm-io's async_io(),
as used by bufio, always returns 0.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2019-04-18 16:18:34 -04:00
..
bcache block: allow bio_for_each_segment_all() to iterate over multi-page bvec 2019-02-15 08:40:11 -07:00
persistent-data dm space map common: zero entire ll_disk 2019-04-18 16:18:32 -04:00
dm-bio-prison-v1.c
dm-bio-prison-v1.h
dm-bio-prison-v2.c
dm-bio-prison-v2.h
dm-bio-record.h
dm-bufio.c Merge branch 'akpm' (patches from Andrew) 2018-12-28 16:55:46 -08:00
dm-builtin.c
dm-cache-background-tracker.c
dm-cache-background-tracker.h
dm-cache-block-types.h
dm-cache-metadata.c dm cache metadata: Fix loading discard bitset 2019-04-18 16:18:25 -04:00
dm-cache-metadata.h
dm-cache-policy-internal.h
dm-cache-policy-smq.c
dm-cache-policy.c
dm-cache-policy.h
dm-cache-target.c dm cache: add support for discard passdown to the origin device 2019-03-05 14:53:52 -05:00
dm-core.h dm: disable DISCARD if the underlying storage no longer supports it 2019-04-04 15:33:59 -04:00
dm-crypt.c dm crypt: fix endianness annotations around org_sector_of_dmreq 2019-04-18 16:16:01 -04:00
dm-delay.c dm: Check for device sector overflow if CONFIG_LBDAF is not set 2018-12-18 09:02:26 -05:00
dm-era-target.c
dm-exception-store.c
dm-exception-store.h dm snapshot: Make exception tables scalable 2019-04-18 16:18:29 -04:00
dm-flakey.c dm flakey: Properly corrupt multi-page bios. 2018-12-18 09:02:27 -05:00
dm-init.c dm init: fix const confusion for dm_allowed_targets array 2019-04-01 16:16:37 -04:00
dm-integrity.c dm integrity: fix deadlock with overlapping I/O 2019-04-05 18:49:08 -04:00
dm-io.c
dm-ioctl.c dm: add support to directly boot to a mapped device 2019-03-05 14:53:50 -05:00
dm-kcopyd.c dm kcopyd: Fix bug causing workqueue stalls 2018-12-18 09:02:26 -05:00
dm-linear.c dm: Check for device sector overflow if CONFIG_LBDAF is not set 2018-12-18 09:02:26 -05:00
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log-writes.c
dm-log.c
dm-mpath.c dm mpath: only flush workqueue when needed 2018-12-18 09:02:25 -05:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c dm: eliminate 'split_discard_bios' flag from DM target interface 2019-02-20 23:24:55 -05:00
dm-raid1.c dm: Check for device sector overflow if CONFIG_LBDAF is not set 2018-12-18 09:02:26 -05:00
dm-region-hash.c
dm-round-robin.c
dm-rq.c dm: disable DISCARD if the underlying storage no longer supports it 2019-04-04 15:33:59 -04:00
dm-rq.h dm: remove unused _rq_tio_cache and _rq_cache 2019-03-05 14:48:50 -05:00
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c dm snapshot: Use fine-grained locking scheme 2019-04-18 16:18:30 -04:00
dm-stats.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
dm-stats.h
dm-stripe.c
dm-switch.c dm switch: use struct_size() in kzalloc() 2019-03-05 14:48:51 -05:00
dm-sysfs.c
dm-table.c dm table: propagate BDI_CAP_STABLE_WRITES to fix sporadic checksum errors 2019-04-01 16:26:02 -04:00
dm-target.c
dm-thin-metadata.c dm thin metadata: do not write metadata if no changes occurred 2019-04-18 16:18:34 -04:00
dm-thin-metadata.h dm thin: fix passdown_double_checking_shared_status() 2019-01-15 16:10:41 -05:00
dm-thin.c dm thin: add sanity checks to thin-pool and external snapshot creation 2019-03-05 14:53:49 -05:00
dm-uevent.c
dm-uevent.h
dm-unstripe.c dm: Check for device sector overflow if CONFIG_LBDAF is not set 2018-12-18 09:02:26 -05:00
dm-verity-fec.c dm verity fec: remove redundant unlikely annotation 2019-03-05 14:53:48 -05:00
dm-verity-fec.h
dm-verity-target.c dm verity: log the hash algorithm implementation 2018-12-18 09:02:27 -05:00
dm-verity.h
dm-writecache.c dm writecache: add unlikely for returned value of rb_next/prev 2019-04-18 16:18:31 -04:00
dm-zero.c
dm-zoned-metadata.c dm zoned: Fix zone report handling 2019-04-18 16:17:58 -04:00
dm-zoned-reclaim.c
dm-zoned-target.c dm zoned: Silence a static checker warning 2019-04-18 16:16:01 -04:00
dm-zoned.h
dm.c dm: disable DISCARD if the underlying storage no longer supports it 2019-04-04 15:33:59 -04:00
dm.h
Kconfig dm: add support to directly boot to a mapped device 2019-03-05 14:53:50 -05:00
Makefile dm: add support to directly boot to a mapped device 2019-03-05 14:53:50 -05:00
md-bitmap.c
md-bitmap.h
md-cluster.c
md-cluster.h
md-faulty.c
md-linear.c md-linear: use struct_size() in kzalloc() 2019-02-04 10:37:11 -08:00
md-linear.h
md-multipath.c
md-multipath.h
md.c md: Make bio_alloc_mddev use bio_alloc_bioset 2019-01-14 06:31:56 -07:00
md.h
raid0.c blkcg: remove bio->bi_css and instead use bio->bi_blkg 2018-12-07 22:26:37 -07:00
raid0.h
raid1-10.c
raid1.c for-5.1/block-20190302 2019-03-08 14:12:17 -08:00
raid1.h
raid5-cache.c md/raid5: fix 'out of memory' during raid cache recovery 2019-01-28 11:44:40 -08:00
raid5-log.h raid5: set write hint for PPL 2019-03-12 10:15:18 -07:00
raid5-ppl.c for-5.1/block-post-20190315 2019-03-16 12:36:39 -07:00
raid5.c for-5.1/block-post-20190315 2019-03-16 12:36:39 -07:00
raid5.h md: convert to kvmalloc 2019-03-12 10:04:02 -07:00
raid10.c md: Fix failed allocation of md_register_thread 2019-03-12 10:15:18 -07:00
raid10.h