mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
This is the 5.4.25 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl5qJSMACgkQONu9yGCS
aT6/Dw//Usg9m0cBB4Ip4fYxI0EVz8BgnVe9KSdt+71gM63QCOi1ZeTS0NDMUtO0
MTsQSudUpfntrT8QHCmBwCZ5LlAAZvxDS9UOqnhkWbqNY5jGmUhH5u28RJL28dp2
8wJY6zZKg+pfOWXd81slW86uN27QZvURNEthT81sN2ucxe5DXV1gs87FILSdMpXm
I0Z3LpUoZDjpONeA6WTZqkDNA0J7Z9QjULx9/4LFi/gc0q1ApWC7FV1A9gpQHaBa
w4kDWJCGqq3mNx8Hi9BHau50VUHX5tuKvpn9RcmSl9BBba25pE5h0EVIGo8Dlq+9
T9hkVR5iXeMbFERnLm5iR0DjFHog/mOgAgUHSTTXB3BcdgIKWwUcc2gCcr2Y7KIK
CD7l+kX1nWUk4yYre7zXiG/vO9ilYgeboc8C5Qdq3XR6zaO90+8NUbCOpa2+6yEF
H7kugstb6l+iCJ1k8YJd0ORGOobl68+P79TLxAOFnkNGJRzuAoXmBH+xkqAugz1H
YKKAbE+MzW75sre7PxU1g1uPOHxfMfd5e3uRtUU5OETJv0A2kTte8ay5rqLNbe7H
QYqdfwTr2oFssnWKW5d/KdSopD5A/31/Kjkmzl6ED2xaLMEpA7zyed5p+G/Beu5s
dkPlteya8wCQ1W/KtDJRhbCauoG/NyCKIeoQitHBJwMapcEo8ZU=
=rDP8
-----END PGP SIGNATURE-----
Merge 5.4.25 into android-5.4
Changes in 5.4.25
block, bfq: get extra ref to prevent a queue from being freed during a group move
block, bfq: do not insert oom queue into position tree
ALSA: hda/realtek - Fix a regression for mute led on Lenovo Carbon X1
net: dsa: bcm_sf2: Forcibly configure IMP port for 1Gb/sec
net: stmmac: fix notifier registration
dm thin metadata: fix lockdep complaint
RDMA/core: Fix pkey and port assignment in get_new_pps
RDMA/core: Fix use of logical OR in get_new_pps
kbuild: fix 'No such file or directory' warning when cleaning
kprobes: Fix optimize_kprobe()/unoptimize_kprobe() cancellation logic
blktrace: fix dereference after null check
ALSA: hda: do not override bus codec_mask in link_get()
serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE
selftests: fix too long argument
usb: gadget: composite: Support more than 500mA MaxPower
usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags
usb: gadget: serial: fix Tx stall after buffer overflow
habanalabs: halt the engines before hard-reset
habanalabs: do not halt CoreSight during hard reset
habanalabs: patched cb equals user cb in device memset
drm/msm/mdp5: rate limit pp done timeout warnings
drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI
drm/modes: Make sure to parse valid rotation value from cmdline
drm/modes: Allow DRM_MODE_ROTATE_0 when applying video mode parameters
scsi: megaraid_sas: silence a warning
drm/msm/dsi: save pll state before dsi host is powered off
drm/msm/dsi/pll: call vco set rate explicitly
selftests: forwarding: use proto icmp for {gretap, ip6gretap}_mac testing
selftests: forwarding: vxlan_bridge_1d: fix tos value
net: atlantic: check rpc result and wait for rpc address
net: ks8851-ml: Remove 8-bit bus accessors
net: ks8851-ml: Fix 16-bit data access
net: ks8851-ml: Fix 16-bit IO operation
net: ethernet: dm9000: Handle -EPROBE_DEFER in dm9000_parse_dt()
watchdog: da9062: do not ping the hw during stop()
s390/cio: cio_ignore_proc_seq_next should increase position index
s390: make 'install' not depend on vmlinux
efi: Only print errors about failing to get certs if EFI vars are found
net/mlx5: DR, Fix matching on vport gvmi
iommu/amd: Disable IOMMU on Stoney Ridge systems
nvme/pci: Add sleep quirk for Samsung and Toshiba drives
nvme-pci: Use single IRQ vector for old Apple models
x86/boot/compressed: Don't declare __force_order in kaslr_64.c
s390/qdio: fill SL with absolute addresses
nvme: Fix uninitialized-variable warning
ice: Don't tell the OS that link is going down
x86/xen: Distribute switch variables for initialization
net: thunderx: workaround BGX TX Underflow issue
csky/mm: Fixup export invalid_pte_table symbol
csky: Set regs->usp to kernel sp, when the exception is from kernel
csky/smp: Fixup boot failed when CONFIG_SMP
csky: Fixup ftrace modify panic
csky: Fixup compile warning for three unimplemented syscalls
arch/csky: fix some Kconfig typos
selftests: forwarding: vxlan_bridge_1d: use more proper tos value
firmware: imx: scu: Ensure sequential TX
binder: prevent UAF for binderfs devices
binder: prevent UAF for binderfs devices II
ALSA: hda/realtek - Add Headset Mic supported
ALSA: hda/realtek - Add Headset Button supported for ThinkPad X1
ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master
ALSA: hda/realtek - Enable the headset of ASUS B9450FA with ALC294
cifs: don't leak -EAGAIN for stat() during reconnect
cifs: fix rename() by ensuring source handle opened with DELETE bit
usb: storage: Add quirk for Samsung Fit flash
usb: quirks: add NO_LPM quirk for Logitech Screen Share
usb: dwc3: gadget: Update chain bit correctly when using sg list
usb: cdns3: gadget: link trb should point to next request
usb: cdns3: gadget: toggle cycle bit before reset endpoint
usb: core: hub: fix unhandled return by employing a void function
usb: core: hub: do error out if usb_autopm_get_interface() fails
usb: core: port: do error out if usb_autopm_get_interface() fails
vgacon: Fix a UAF in vgacon_invert_region
mm, numa: fix bad pmd by atomically check for pmd_trans_huge when marking page tables prot_numa
mm: fix possible PMD dirty bit lost in set_pmd_migration_entry()
mm, hotplug: fix page online with DEBUG_PAGEALLOC compiled but not enabled
fat: fix uninit-memory access for partial initialized inode
btrfs: fix RAID direct I/O reads with alternate csums
arm64: dts: socfpga: agilex: Fix gmac compatible
arm: dts: dra76x: Fix mmc3 max-frequency
tty:serial:mvebu-uart:fix a wrong return
tty: serial: fsl_lpuart: free IDs allocated by IDA
serial: 8250_exar: add support for ACCES cards
vt: selection, close sel_buffer race
vt: selection, push console lock down
vt: selection, push sel_lock up
media: hantro: Fix broken media controller links
media: mc-entity.c: use & to check pad flags, not ==
media: vicodec: process all 4 components for RGB32 formats
media: v4l2-mem2mem.c: fix broken links
perf intel-pt: Fix endless record after being terminated
perf intel-bts: Fix endless record after being terminated
perf cs-etm: Fix endless record after being terminated
perf arm-spe: Fix endless record after being terminated
spi: spidev: Fix CS polarity if GPIO descriptors are used
x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve existing changes
s390/pci: Fix unexpected write combine on resource
s390/mm: fix panic in gup_fast on large pud
dmaengine: imx-sdma: fix context cache
dmaengine: imx-sdma: Fix the event id check to include RX event for UART6
dmaengine: tegra-apb: Fix use-after-free
dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list
dm integrity: fix recalculation when moving from journal mode to bitmap mode
dm integrity: fix a deadlock due to offloading to an incorrect workqueue
dm integrity: fix invalid table returned due to argument count mismatch
dm cache: fix a crash due to incorrect work item cancelling
dm: report suspended device during destroy
dm writecache: verify watermark during resume
dm zoned: Fix reference counter initial value of chunk works
dm: fix congested_fn for request-based device
arm64: dts: meson-sm1-sei610: add missing interrupt-names
ARM: dts: ls1021a: Restore MDIO compatible to gianfar
spi: bcm63xx-hsspi: Really keep pll clk enabled
drm/virtio: make resource id workaround runtime switchable.
drm/virtio: fix resource id creation race
ASoC: topology: Fix memleak in soc_tplg_link_elems_load()
ASoC: topology: Fix memleak in soc_tplg_manifest_load()
ASoC: SOF: Fix snd_sof_ipc_stream_posn()
ASoC: intel: skl: Fix pin debug prints
ASoC: intel: skl: Fix possible buffer overflow in debug outputs
powerpc: define helpers to get L1 icache sizes
powerpc: Convert flush_icache_range & friends to C
powerpc/mm: Fix missing KUAP disable in flush_coherent_icache()
ASoC: pcm: Fix possible buffer overflow in dpcm state sysfs output
ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path
ASoC: Intel: Skylake: Fix available clock counter incrementation
ASoC: dapm: Correct DAPM handling of active widgets during shutdown
spi: atmel-quadspi: fix possible MMIO window size overrun
drm/panfrost: Don't try to map on error faults
drm: kirin: Revert "Fix for hikey620 display offset problem"
drm/sun4i: Add separate DE3 VI layer formats
drm/sun4i: Fix DE2 VI layer format support
drm/sun4i: de2/de3: Remove unsupported VI layer formats
drm/i915: Program MBUS with rmw during initialization
drm/i915/selftests: Fix return in assert_mmap_offset()
phy: mapphone-mdm6600: Fix timeouts by adding wake-up handling
phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval
ARM: dts: imx6: phycore-som: fix emmc supply
arm64: dts: imx8qxp-mek: Remove unexisting Ethernet PHY
firmware: imx: misc: Align imx sc msg structs to 4
firmware: imx: scu-pd: Align imx sc msg structs to 4
firmware: imx: Align imx_sc_msg_req_cpu_start to 4
soc: imx-scu: Align imx sc msg structs to 4
Revert "RDMA/cma: Simplify rdma_resolve_addr() error flow"
RDMA/rw: Fix error flow during RDMA context initialization
RDMA/nldev: Fix crash when set a QP to a new counter but QPN is missing
RDMA/siw: Fix failure handling during device creation
RDMA/iwcm: Fix iwcm work deallocation
RDMA/core: Fix protection fault in ib_mr_pool_destroy
regulator: stm32-vrefbuf: fix a possible overshoot when re-enabling
RMDA/cm: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()
IB/hfi1, qib: Ensure RCU is locked when accessing list
ARM: imx: build v7_cpu_resume() unconditionally
ARM: dts: am437x-idk-evm: Fix incorrect OPP node names
ARM: dts: dra7xx-clocks: Fixup IPU1 mux clock parent source
ARM: dts: imx7-colibri: Fix frequency for sd/mmc
hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT()
dma-buf: free dmabuf->name in dma_buf_release()
dmaengine: coh901318: Fix a double lock bug in dma_tc_handle()
arm64: dts: meson: fix gxm-khadas-vim2 wifi
bus: ti-sysc: Fix 1-wire reset quirk
EDAC/synopsys: Do not print an error with back-to-back snprintf() calls
powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems
efi/x86: Align GUIDs to their size in the mixed mode runtime wrapper
efi/x86: Handle by-ref arguments covering multiple pages in mixed mode
efi: READ_ONCE rng seed size before munmap
block, bfq: get a ref to a group when adding it to a service tree
block, bfq: remove ifdefs from around gets/puts of bfq groups
csky: Implement copy_thread_tls
drm/virtio: module_param_named() requires linux/moduleparam.h
Linux 5.4.25
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change-Id: I8ba29f273c7a2b02bfa54593f7a9087c34607cd5
This commit is contained in:
commit
6d52041543
173 changed files with 1553 additions and 903 deletions
|
|
@ -2867,8 +2867,8 @@ static void cache_postsuspend(struct dm_target *ti)
|
|||
prevent_background_work(cache);
|
||||
BUG_ON(atomic_read(&cache->nr_io_migrations));
|
||||
|
||||
cancel_delayed_work(&cache->waker);
|
||||
flush_workqueue(cache->wq);
|
||||
cancel_delayed_work_sync(&cache->waker);
|
||||
drain_workqueue(cache->wq);
|
||||
WARN_ON(cache->tracker.in_flight);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -199,17 +199,19 @@ struct dm_integrity_c {
|
|||
__u8 log2_blocks_per_bitmap_bit;
|
||||
|
||||
unsigned char mode;
|
||||
int suspending;
|
||||
|
||||
int failed;
|
||||
|
||||
struct crypto_shash *internal_hash;
|
||||
|
||||
struct dm_target *ti;
|
||||
|
||||
/* these variables are locked with endio_wait.lock */
|
||||
struct rb_root in_progress;
|
||||
struct list_head wait_list;
|
||||
wait_queue_head_t endio_wait;
|
||||
struct workqueue_struct *wait_wq;
|
||||
struct workqueue_struct *offload_wq;
|
||||
|
||||
unsigned char commit_seq;
|
||||
commit_id_t commit_ids[N_COMMIT_IDS];
|
||||
|
|
@ -1434,7 +1436,7 @@ static void dec_in_flight(struct dm_integrity_io *dio)
|
|||
dio->range.logical_sector += dio->range.n_sectors;
|
||||
bio_advance(bio, dio->range.n_sectors << SECTOR_SHIFT);
|
||||
INIT_WORK(&dio->work, integrity_bio_wait);
|
||||
queue_work(ic->wait_wq, &dio->work);
|
||||
queue_work(ic->offload_wq, &dio->work);
|
||||
return;
|
||||
}
|
||||
do_endio_flush(ic, dio);
|
||||
|
|
@ -1860,7 +1862,7 @@ static void dm_integrity_map_continue(struct dm_integrity_io *dio, bool from_map
|
|||
|
||||
if (need_sync_io && from_map) {
|
||||
INIT_WORK(&dio->work, integrity_bio_wait);
|
||||
queue_work(ic->metadata_wq, &dio->work);
|
||||
queue_work(ic->offload_wq, &dio->work);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2310,7 +2312,7 @@ static void integrity_writer(struct work_struct *w)
|
|||
unsigned prev_free_sectors;
|
||||
|
||||
/* the following test is not needed, but it tests the replay code */
|
||||
if (READ_ONCE(ic->suspending) && !ic->meta_dev)
|
||||
if (unlikely(dm_suspended(ic->ti)) && !ic->meta_dev)
|
||||
return;
|
||||
|
||||
spin_lock_irq(&ic->endio_wait.lock);
|
||||
|
|
@ -2371,7 +2373,7 @@ static void integrity_recalc(struct work_struct *w)
|
|||
|
||||
next_chunk:
|
||||
|
||||
if (unlikely(READ_ONCE(ic->suspending)))
|
||||
if (unlikely(dm_suspended(ic->ti)))
|
||||
goto unlock_ret;
|
||||
|
||||
range.logical_sector = le64_to_cpu(ic->sb->recalc_sector);
|
||||
|
|
@ -2496,7 +2498,7 @@ static void bitmap_block_work(struct work_struct *w)
|
|||
dio->range.n_sectors, BITMAP_OP_TEST_ALL_SET)) {
|
||||
remove_range(ic, &dio->range);
|
||||
INIT_WORK(&dio->work, integrity_bio_wait);
|
||||
queue_work(ic->wait_wq, &dio->work);
|
||||
queue_work(ic->offload_wq, &dio->work);
|
||||
} else {
|
||||
block_bitmap_op(ic, ic->journal, dio->range.logical_sector,
|
||||
dio->range.n_sectors, BITMAP_OP_SET);
|
||||
|
|
@ -2519,7 +2521,7 @@ static void bitmap_block_work(struct work_struct *w)
|
|||
|
||||
remove_range(ic, &dio->range);
|
||||
INIT_WORK(&dio->work, integrity_bio_wait);
|
||||
queue_work(ic->wait_wq, &dio->work);
|
||||
queue_work(ic->offload_wq, &dio->work);
|
||||
}
|
||||
|
||||
queue_delayed_work(ic->commit_wq, &ic->bitmap_flush_work, ic->bitmap_flush_interval);
|
||||
|
|
@ -2799,8 +2801,6 @@ static void dm_integrity_postsuspend(struct dm_target *ti)
|
|||
|
||||
del_timer_sync(&ic->autocommit_timer);
|
||||
|
||||
WRITE_ONCE(ic->suspending, 1);
|
||||
|
||||
if (ic->recalc_wq)
|
||||
drain_workqueue(ic->recalc_wq);
|
||||
|
||||
|
|
@ -2829,8 +2829,6 @@ static void dm_integrity_postsuspend(struct dm_target *ti)
|
|||
#endif
|
||||
}
|
||||
|
||||
WRITE_ONCE(ic->suspending, 0);
|
||||
|
||||
BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress));
|
||||
|
||||
ic->journal_uptodate = true;
|
||||
|
|
@ -2883,17 +2881,24 @@ static void dm_integrity_resume(struct dm_target *ti)
|
|||
} else {
|
||||
replay_journal(ic);
|
||||
if (ic->mode == 'B') {
|
||||
int mode;
|
||||
ic->sb->flags |= cpu_to_le32(SB_FLAG_DIRTY_BITMAP);
|
||||
ic->sb->log2_blocks_per_bitmap_bit = ic->log2_blocks_per_bitmap_bit;
|
||||
r = sync_rw_sb(ic, REQ_OP_WRITE, REQ_FUA);
|
||||
if (unlikely(r))
|
||||
dm_integrity_io_error(ic, "writing superblock", r);
|
||||
|
||||
mode = ic->recalculate_flag ? BITMAP_OP_SET : BITMAP_OP_CLEAR;
|
||||
block_bitmap_op(ic, ic->journal, 0, ic->provided_data_sectors, mode);
|
||||
block_bitmap_op(ic, ic->recalc_bitmap, 0, ic->provided_data_sectors, mode);
|
||||
block_bitmap_op(ic, ic->may_write_bitmap, 0, ic->provided_data_sectors, mode);
|
||||
block_bitmap_op(ic, ic->journal, 0, ic->provided_data_sectors, BITMAP_OP_CLEAR);
|
||||
block_bitmap_op(ic, ic->recalc_bitmap, 0, ic->provided_data_sectors, BITMAP_OP_CLEAR);
|
||||
block_bitmap_op(ic, ic->may_write_bitmap, 0, ic->provided_data_sectors, BITMAP_OP_CLEAR);
|
||||
if (ic->sb->flags & cpu_to_le32(SB_FLAG_RECALCULATING) &&
|
||||
le64_to_cpu(ic->sb->recalc_sector) < ic->provided_data_sectors) {
|
||||
block_bitmap_op(ic, ic->journal, le64_to_cpu(ic->sb->recalc_sector),
|
||||
ic->provided_data_sectors - le64_to_cpu(ic->sb->recalc_sector), BITMAP_OP_SET);
|
||||
block_bitmap_op(ic, ic->recalc_bitmap, le64_to_cpu(ic->sb->recalc_sector),
|
||||
ic->provided_data_sectors - le64_to_cpu(ic->sb->recalc_sector), BITMAP_OP_SET);
|
||||
block_bitmap_op(ic, ic->may_write_bitmap, le64_to_cpu(ic->sb->recalc_sector),
|
||||
ic->provided_data_sectors - le64_to_cpu(ic->sb->recalc_sector), BITMAP_OP_SET);
|
||||
}
|
||||
rw_journal_sectors(ic, REQ_OP_WRITE, REQ_FUA | REQ_SYNC, 0,
|
||||
ic->n_bitmap_blocks * (BITMAP_BLOCK_SIZE >> SECTOR_SHIFT), NULL);
|
||||
}
|
||||
|
|
@ -2961,7 +2966,7 @@ static void dm_integrity_status(struct dm_target *ti, status_type_t type,
|
|||
DMEMIT(" meta_device:%s", ic->meta_dev->name);
|
||||
if (ic->sectors_per_block != 1)
|
||||
DMEMIT(" block_size:%u", ic->sectors_per_block << SECTOR_SHIFT);
|
||||
if (ic->recalculate_flag)
|
||||
if (ic->sb->flags & cpu_to_le32(SB_FLAG_RECALCULATING))
|
||||
DMEMIT(" recalculate");
|
||||
DMEMIT(" journal_sectors:%u", ic->initial_sectors - SB_SECTORS);
|
||||
DMEMIT(" interleave_sectors:%u", 1U << ic->sb->log2_interleave_sectors);
|
||||
|
|
@ -3607,6 +3612,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
|||
}
|
||||
ti->private = ic;
|
||||
ti->per_io_data_size = sizeof(struct dm_integrity_io);
|
||||
ic->ti = ti;
|
||||
|
||||
ic->in_progress = RB_ROOT;
|
||||
INIT_LIST_HEAD(&ic->wait_list);
|
||||
|
|
@ -3818,6 +3824,14 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
|||
goto bad;
|
||||
}
|
||||
|
||||
ic->offload_wq = alloc_workqueue("dm-integrity-offload", WQ_MEM_RECLAIM,
|
||||
METADATA_WORKQUEUE_MAX_ACTIVE);
|
||||
if (!ic->offload_wq) {
|
||||
ti->error = "Cannot allocate workqueue";
|
||||
r = -ENOMEM;
|
||||
goto bad;
|
||||
}
|
||||
|
||||
ic->commit_wq = alloc_workqueue("dm-integrity-commit", WQ_MEM_RECLAIM, 1);
|
||||
if (!ic->commit_wq) {
|
||||
ti->error = "Cannot allocate workqueue";
|
||||
|
|
@ -4122,6 +4136,8 @@ static void dm_integrity_dtr(struct dm_target *ti)
|
|||
destroy_workqueue(ic->metadata_wq);
|
||||
if (ic->wait_wq)
|
||||
destroy_workqueue(ic->wait_wq);
|
||||
if (ic->offload_wq)
|
||||
destroy_workqueue(ic->offload_wq);
|
||||
if (ic->commit_wq)
|
||||
destroy_workqueue(ic->commit_wq);
|
||||
if (ic->writer_wq)
|
||||
|
|
|
|||
|
|
@ -960,9 +960,9 @@ int dm_pool_metadata_close(struct dm_pool_metadata *pmd)
|
|||
DMWARN("%s: __commit_transaction() failed, error = %d",
|
||||
__func__, r);
|
||||
}
|
||||
pmd_write_unlock(pmd);
|
||||
if (!pmd->fail_io)
|
||||
__destroy_persistent_data_objects(pmd);
|
||||
pmd_write_unlock(pmd);
|
||||
|
||||
kfree(pmd);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -625,6 +625,12 @@ static void writecache_add_to_freelist(struct dm_writecache *wc, struct wc_entry
|
|||
wc->freelist_size++;
|
||||
}
|
||||
|
||||
static inline void writecache_verify_watermark(struct dm_writecache *wc)
|
||||
{
|
||||
if (unlikely(wc->freelist_size + wc->writeback_size <= wc->freelist_high_watermark))
|
||||
queue_work(wc->writeback_wq, &wc->writeback_work);
|
||||
}
|
||||
|
||||
static struct wc_entry *writecache_pop_from_freelist(struct dm_writecache *wc)
|
||||
{
|
||||
struct wc_entry *e;
|
||||
|
|
@ -646,8 +652,8 @@ static struct wc_entry *writecache_pop_from_freelist(struct dm_writecache *wc)
|
|||
list_del(&e->lru);
|
||||
}
|
||||
wc->freelist_size--;
|
||||
if (unlikely(wc->freelist_size + wc->writeback_size <= wc->freelist_high_watermark))
|
||||
queue_work(wc->writeback_wq, &wc->writeback_work);
|
||||
|
||||
writecache_verify_watermark(wc);
|
||||
|
||||
return e;
|
||||
}
|
||||
|
|
@ -838,7 +844,7 @@ static void writecache_suspend(struct dm_target *ti)
|
|||
}
|
||||
wc_unlock(wc);
|
||||
|
||||
flush_workqueue(wc->writeback_wq);
|
||||
drain_workqueue(wc->writeback_wq);
|
||||
|
||||
wc_lock(wc);
|
||||
if (flush_on_suspend)
|
||||
|
|
@ -961,6 +967,8 @@ erase_this:
|
|||
writecache_commit_flushed(wc, false);
|
||||
}
|
||||
|
||||
writecache_verify_watermark(wc);
|
||||
|
||||
wc_unlock(wc);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -533,8 +533,9 @@ static int dmz_queue_chunk_work(struct dmz_target *dmz, struct bio *bio)
|
|||
|
||||
/* Get the BIO chunk work. If one is not active yet, create one */
|
||||
cw = radix_tree_lookup(&dmz->chunk_rxtree, chunk);
|
||||
if (!cw) {
|
||||
|
||||
if (cw) {
|
||||
dmz_get_chunk_work(cw);
|
||||
} else {
|
||||
/* Create a new chunk work */
|
||||
cw = kmalloc(sizeof(struct dm_chunk_work), GFP_NOIO);
|
||||
if (unlikely(!cw)) {
|
||||
|
|
@ -543,7 +544,7 @@ static int dmz_queue_chunk_work(struct dmz_target *dmz, struct bio *bio)
|
|||
}
|
||||
|
||||
INIT_WORK(&cw->work, dmz_chunk_work);
|
||||
refcount_set(&cw->refcount, 0);
|
||||
refcount_set(&cw->refcount, 1);
|
||||
cw->target = dmz;
|
||||
cw->chunk = chunk;
|
||||
bio_list_init(&cw->bio_list);
|
||||
|
|
@ -556,7 +557,6 @@ static int dmz_queue_chunk_work(struct dmz_target *dmz, struct bio *bio)
|
|||
}
|
||||
|
||||
bio_list_add(&cw->bio_list, bio);
|
||||
dmz_get_chunk_work(cw);
|
||||
|
||||
dmz_reclaim_bio_acc(dmz->reclaim);
|
||||
if (queue_work(dmz->chunk_wq, &cw->work))
|
||||
|
|
|
|||
|
|
@ -1790,7 +1790,8 @@ static int dm_any_congested(void *congested_data, int bdi_bits)
|
|||
* With request-based DM we only need to check the
|
||||
* top-level queue for congestion.
|
||||
*/
|
||||
r = md->queue->backing_dev_info->wb.state & bdi_bits;
|
||||
struct backing_dev_info *bdi = md->queue->backing_dev_info;
|
||||
r = bdi->wb.congested->state & bdi_bits;
|
||||
} else {
|
||||
map = dm_get_live_table_fast(md);
|
||||
if (map)
|
||||
|
|
@ -1856,15 +1857,6 @@ static const struct dax_operations dm_dax_ops;
|
|||
|
||||
static void dm_wq_work(struct work_struct *work);
|
||||
|
||||
static void dm_init_normal_md_queue(struct mapped_device *md)
|
||||
{
|
||||
/*
|
||||
* Initialize aspects of queue that aren't relevant for blk-mq
|
||||
*/
|
||||
md->queue->backing_dev_info->congested_data = md;
|
||||
md->queue->backing_dev_info->congested_fn = dm_any_congested;
|
||||
}
|
||||
|
||||
static void dm_destroy_inline_encryption(struct request_queue *q);
|
||||
|
||||
static void cleanup_mapped_device(struct mapped_device *md)
|
||||
|
|
@ -2410,6 +2402,12 @@ static inline void dm_destroy_inline_encryption(struct request_queue *q)
|
|||
}
|
||||
#endif /* !CONFIG_BLK_INLINE_ENCRYPTION */
|
||||
|
||||
static void dm_init_congested_fn(struct mapped_device *md)
|
||||
{
|
||||
md->queue->backing_dev_info->congested_data = md;
|
||||
md->queue->backing_dev_info->congested_fn = dm_any_congested;
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup the DM device's queue based on md's type
|
||||
*/
|
||||
|
|
@ -2426,11 +2424,12 @@ int dm_setup_md_queue(struct mapped_device *md, struct dm_table *t)
|
|||
DMERR("Cannot initialize queue for request-based dm-mq mapped device");
|
||||
return r;
|
||||
}
|
||||
dm_init_congested_fn(md);
|
||||
break;
|
||||
case DM_TYPE_BIO_BASED:
|
||||
case DM_TYPE_DAX_BIO_BASED:
|
||||
case DM_TYPE_NVME_BIO_BASED:
|
||||
dm_init_normal_md_queue(md);
|
||||
dm_init_congested_fn(md);
|
||||
break;
|
||||
case DM_TYPE_NONE:
|
||||
WARN_ON_ONCE(true);
|
||||
|
|
@ -2536,6 +2535,7 @@ static void __dm_destroy(struct mapped_device *md, bool wait)
|
|||
map = dm_get_live_table(md, &srcu_idx);
|
||||
if (!dm_suspended_md(md)) {
|
||||
dm_table_presuspend_targets(map);
|
||||
set_bit(DMF_SUSPENDED, &md->flags);
|
||||
dm_table_postsuspend_targets(map);
|
||||
}
|
||||
/* dm_put_live_table must be before msleep, otherwise deadlock is possible */
|
||||
|
|
|
|||
Loading…
Reference in a new issue