Jens Axboe
dbe3ece128
dm: don't reuse bio for flushes
...
DM currently has a statically allocated bio that it uses to issue empty
flushes. It doesn't submit this bio, it just uses it for maintaining
state while setting up clones. Multiple users can access this bio at the
same time. This wasn't previously an issue, even if it was a bit iffy,
but with the blkg associations it can become one.
We setup the blkg association, then clone bio's and submit, then remove
the blkg assocation again. But since we can have multiple tasks doing
this at the same time, against multiple blkg's, then we can either lose
references to a blkg, or put it twice. The latter causes complaints on
the percpu ref being <= 0 when released, and can cause use-after-free as
well. Ming reports that xfstest generic/475 triggers this:
------------[ cut here ]------------
percpu ref (blkg_release) <= 0 (0) after switching to atomic
WARNING: CPU: 13 PID: 0 at lib/percpu-refcount.c:155 percpu_ref_switch_to_atomic_rcu+0x2c9/0x4a0
Switch to just using an on-stack bio for this, and get rid of the
embedded bio.
Fixes: 5cdf2e3fea ("blkcg: associate blkg when associating a device")
Reported-by: Ming Lei <ming.lei@redhat.com>
Tested-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-12-19 09:13:34 -07:00
..
bcache
bcache: print number of keys in trace_bcache_journal_write
2018-12-13 08:15:54 -07:00
persistent-data
dm: Avoid namespace collision with bitmap API
2018-08-01 15:49:38 -07:00
dm-bio-prison-v1.c
dm: adjust structure members to improve alignment
2018-06-08 11:53:14 -04:00
dm-bio-prison-v1.h
dm-bio-prison-v2.c
dm: adjust structure members to improve alignment
2018-06-08 11:53:14 -04:00
dm-bio-prison-v2.h
dm-bio-record.h
dm-bufio.c
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: ignore hints array being too small during resize
2018-10-04 15:20:51 -04:00
dm-cache-metadata.h
dm-cache-policy-internal.h
dm-cache-policy-smq.c
dm: remove unnecessary unlikely() around WARN_ON_ONCE()
2018-10-16 14:34:59 -04:00
dm-cache-policy.c
dm-cache-policy.h
dm-cache-target.c
dm cache: destroy migration_cache if cache target registration failed
2018-10-09 13:53:03 -04:00
dm-core.h
dm: don't reuse bio for flushes
2018-12-19 09:13:34 -07:00
dm-crypt.c
dm crypt: make workqueue names device-specific
2018-10-18 12:17:17 -04:00
dm-delay.c
dm delay: add flush as a third class of IO
2018-07-27 15:24:19 -04:00
dm-era-target.c
dm-exception-store.c
dm-exception-store.h
dm-flakey.c
block: add a report_zones method
2018-10-25 11:17:40 -06:00
dm-integrity.c
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
2018-10-25 16:43:35 -07:00
dm-io.c
dm: Use kzalloc for all structs with embedded biosets/mempools
2018-06-05 08:47:43 -06:00
dm-ioctl.c
dm ioctl: harden copy_params()'s copy_from_user() from malicious users
2018-10-18 11:54:07 -04:00
dm-kcopyd.c
dm kcopyd: avoid softlockup in run_complete_job
2018-08-08 09:16:24 -04:00
dm-linear.c
block: add a report_zones method
2018-10-25 11:17:40 -06:00
dm-log-userspace-base.c
dm: convert to bioset_init()/mempool_init()
2018-05-30 15:33:32 -06:00
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log-writes.c
dm-log.c
dm-mpath.c
dm: rename DM_TYPE_MQ_REQUEST_BASED to DM_TYPE_REQUEST_BASED
2018-10-11 11:36:09 -04:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c
dm raid: avoid bitmap with raid4/5/6 journal device
2018-10-18 15:13:48 -04:00
dm-raid1.c
dm kcopyd: return void from dm_kcopyd_copy()
2018-07-31 17:33:21 -04:00
dm-region-hash.c
- Error path bug fix for overflow tests (Dan)
2018-06-12 18:28:00 -07:00
dm-round-robin.c
dm-rq.c
dm: fix request-based dm's use of dm_wait_for_completion
2018-12-11 07:40:02 -07:00
dm-rq.h
dm: remove legacy request-based IO path
2018-10-11 11:36:09 -04:00
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c
dm snapshot: remove stale FIXME in snapshot_map()
2018-08-08 20:50:58 -04:00
dm-stats.c
treewide: kmalloc() -> kmalloc_array()
2018-06-12 16:19:22 -07:00
dm-stats.h
dm-stripe.c
dm-switch.c
treewide: Use array_size() in vmalloc()
2018-06-12 16:19:22 -07:00
dm-sysfs.c
dm: remove legacy request-based IO path
2018-10-11 11:36:09 -04:00
dm-table.c
block: add queue_is_mq() helper
2018-11-16 08:34:06 -07:00
dm-target.c
dm-thin-metadata.c
dm thin metadata: fix __udivdi3 undefined on 32-bit
2018-09-17 11:49:34 -04:00
dm-thin-metadata.h
dm-thin.c
dm thin: use refcount_t for thin_c reference counting
2018-10-16 14:27:03 -04:00
dm-uevent.c
dm-uevent.h
dm-unstripe.c
dm-verity-fec.c
dm: Remove VLA usage from hashes
2018-09-14 14:08:52 +08:00
dm-verity-fec.h
dm: convert to bioset_init()/mempool_init()
2018-05-30 15:33:32 -06:00
dm-verity-target.c
dm verity: fix crash on bufio buffer that was allocated with vmalloc
2018-09-04 11:25:25 -04:00
dm-verity.h
dm-writecache.c
dm writecache: remove disabled code in memory_entry()
2018-10-22 10:59:52 -04:00
dm-zero.c
dm-zoned-metadata.c
dm zoned: fix various dmz_get_mblock() issues
2018-10-18 15:17:03 -04:00
dm-zoned-reclaim.c
dm kcopyd: return void from dm_kcopyd_copy()
2018-07-31 17:33:21 -04:00
dm-zoned-target.c
- Biggest change this cycle is to remove support for the legacy IO path
2018-10-26 12:57:38 -07:00
dm-zoned.h
dm.c
dm: don't reuse bio for flushes
2018-12-19 09:13:34 -07:00
dm.h
dm: remove legacy request-based IO path
2018-10-11 11:36:09 -04:00
Kconfig
dm: remove legacy request-based IO path
2018-10-11 11:36:09 -04:00
Makefile
dm: add writecache target
2018-06-08 11:59:51 -04:00
md-bitmap.c
md/bitmap: use mddev_suspend/resume instead of ->quiesce()
2018-10-10 11:03:34 -07:00
md-bitmap.h
md: Avoid namespace collision with bitmap API
2018-08-01 15:49:39 -07:00
md-cluster.c
md-cluster: remove suspend_info
2018-10-18 09:41:25 -07:00
md-cluster.h
md-cluster: introduce resync_info_get interface for sanity check
2018-10-18 09:36:35 -07:00
md-faulty.c
md: convert to bioset_init()/mempool_init()
2018-05-30 15:33:32 -06:00
md-linear.c
md: convert to bioset_init()/mempool_init()
2018-05-30 15:33:32 -06:00
md-linear.h
md-multipath.c
treewide: kzalloc() -> kcalloc()
2018-06-12 16:19:22 -07:00
md-multipath.h
md: convert to bioset_init()/mempool_init()
2018-05-30 15:33:32 -06:00
md.c
block: stop passing 'cpu' to all percpu stats methods
2018-12-10 08:30:37 -07:00
md.h
md-cluster/raid10: support add disk under grow mode
2018-10-18 09:34:56 -07:00
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
MD: fix invalid stored role for a disk - try2
2018-10-14 17:05:07 -07:00
raid1.h
md: convert to bioset_init()/mempool_init()
2018-05-30 15:33:32 -06:00
raid5-cache.c
md: remove redundant code that is no longer reachable
2018-10-10 10:45:15 -07:00
raid5-log.h
md/raid5-cache: disable reshape completely
2018-08-31 17:38:09 -07:00
raid5-ppl.c
md: convert to bioset_init()/mempool_init()
2018-05-30 15:33:32 -06:00
raid5.c
raid5: block failing device if raid will be failed
2018-09-28 11:13:15 -07:00
raid5.h
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
2018-06-09 12:01:36 -07:00
raid10.c
md-cluster: introduce resync_info_get interface for sanity check
2018-10-18 09:36:35 -07:00
raid10.h
md: convert to bioset_init()/mempool_init()
2018-05-30 15:33:32 -06:00