linux-stable/drivers
ZiyangZhang c732a852b4 ublk_drv: add START_USER_RECOVERY and END_USER_RECOVERY support
START_USER_RECOVERY and END_USER_RECOVERY are two new control commands
to support user recovery feature.

After a crash, user should send START_USER_RECOVERY, it will:
(1) check if (a)current ublk_device is UBLK_S_DEV_QUIESCED which was
    set by quiesce_work and (b)chardev is released
(2) reinit all ubqs, including:
    (a) put the task_struct and reset ->ubq_daemon to NULL.
    (b) reset all ublk_io.
(3) reset ub->mm to NULL.

Then, user should start a new process and send FETCH_REQ on each
ubq_daemon.

Finally, user should send END_USER_RECOVERY, it will:
(1) wait for all new ubq_daemons getting ready.
(2) update ublksrv_pid
(3) unquiesce the request queue and expect incoming ublk_queue_rq()
(4) convert ub's state to UBLK_S_DEV_LIVE

Note: we can handle STOP_DEV between START_USER_RECOVERY and
END_USER_RECOVERY. This is helpful to users who cannot start new process
after sending START_USER_RECOVERY ctrl-cmd.

Signed-off-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220923153919.44078-7-ZiyangZhang@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-09-23 19:09:56 -06:00
..
accessibility TTY / Serial driver changes for 6.0-rc1 2022-08-08 11:31:40 -07:00
acpi More ACPI updates for 5.20-rc1 2022-08-11 13:26:09 -07:00
amba ARM: 9220/1: amba: Remove deferred device addition 2022-07-28 15:09:23 +01:00
android - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
ata ata: libata-eh: Add missing command name 2022-08-16 05:42:51 +09:00
atm atm: idt77252: fix use-after-free bugs caused by tst_timer 2022-08-08 20:51:59 -07:00
auxdisplay
base Driver core / kernfs changes for 6.0-rc1 2022-08-04 11:31:20 -07:00
bcma
block ublk_drv: add START_USER_RECOVERY and END_USER_RECOVERY support 2022-09-23 19:09:56 -06:00
bluetooth SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
bus SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
cdrom
char s390 updates for 5.20 merge window 2022-08-06 17:05:21 -07:00
clk The clk core gains a new set of APIs that allow drivers to both acquire clks 2022-08-04 18:40:08 -07:00
clocksource RISC-V: Add Sstc extension support 2022-08-11 14:41:52 -07:00
comedi pci-v5.20-changes 2022-08-04 19:30:35 -07:00
connector
counter
cpufreq More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
cpuidle More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
crypto This update includes the following changes: 2022-08-02 17:45:14 -07:00
cxl cxl/hdm: Fix skip allocations vs multiple pmem allocations 2022-08-05 16:11:38 -07:00
dax
dca
devfreq More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
dio
dma pci-v5.20-changes 2022-08-04 19:30:35 -07:00
dma-buf drm for 5.20/6.0 2022-08-03 19:52:08 -07:00
edac powerpc updates for 6.0 2022-08-06 16:38:17 -07:00
eisa
extcon
firewire firewire: net: Make use of get_unaligned_be48(), put_unaligned_be48() 2022-07-28 22:21:54 -07:00
firmware RISC-V Patches for the 5.20 Merge Window, Part 1 2022-08-06 15:04:48 -07:00
fpga
fsi
gnss
gpio gpio: updates for v6.0-rc1 2022-08-04 18:34:05 -07:00
gpu Merge tag 'amd-drm-fixes-6.0-2022-08-17' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes 2022-08-19 09:45:22 +10:00
greybus
hid platform-drivers-x86 for v6.0-1 2022-08-04 18:19:14 -07:00
hsi
hte
hv
hwmon hwmon: (nct6775) Fix platform driver suspend regression 2022-08-10 06:37:01 -07:00
hwspinlock
hwtracing asm-generic: updates for 6.0 2022-08-05 10:07:23 -07:00
i2c i2c: imx: Make sure to unregister adapter on remove() 2022-08-21 10:27:33 +02:00
i3c
idle Power management updates for 5.20-rc1 2022-08-02 11:17:00 -07:00
iio
infiniband RDMA: Handle the return code from dma_resv_wait_timeout() properly 2022-08-16 17:13:23 +03:00
input Input updates for 5.20 (6.0) merge window: 2022-08-11 09:23:08 -07:00
interconnect
iommu irqchip fixes for 6.0, take #1 2022-08-18 17:37:22 +02:00
ipack
irqchip irqchip fixes for 6.0, take #1 2022-08-18 17:37:22 +02:00
isdn
leds LED updates for 5.20: new driver for bcm63138, is31fl319x updates, 2022-08-08 11:36:21 -07:00
macintosh
mailbox - mtk: use rx_callback instead of cmdq_task_cb. 2022-08-08 10:19:40 -07:00
mcb
md md: Fix spelling mistake in comments of r5l_log 2022-09-22 00:05:06 -07:00
media More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
memory More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
memstick MMC core: 2022-08-04 19:41:09 -07:00
message
mfd - Core Frameworks 2022-08-06 10:25:16 -07:00
misc - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
mmc mmc: sdhci-of-dwcmshc: Re-enable support for the BlueField-3 SoC 2022-08-15 19:31:04 +02:00
most
mtd MTD core changes: 2022-08-05 14:13:45 -07:00
mux
net v6.0 first rc pull request 2022-08-20 10:49:02 -07:00
nfc
ntb NTB: epf: Allow more flexibility in the memory BAR map method 2022-08-09 17:54:03 -04:00
nubus
nvdimm virtio: fatures, fixes 2022-08-12 09:50:34 -07:00
nvme nvme-tcp: print actual source IP address through sysfs "address" attr 2022-09-19 17:55:28 +02:00
nvmem SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
of RISC-V Patches for the 5.20 Merge Window, Part 2 2022-08-12 18:39:43 -07:00
opp OPP updates for 5.20-rc1 2022-08-03 17:49:38 +02:00
parisc parisc architecture fixes and updates for kernel v5.20-rc1: 2022-08-05 09:58:58 -07:00
parport
pci Fix of heap data and clang warnings, support for a new Intel NTB device, 2022-08-13 14:00:45 -07:00
pcmcia
peci
perf perf: riscv legacy: fix kerneldoc comment warning 2022-08-18 14:19:26 -07:00
phy pci-v5.20-changes 2022-08-04 19:30:35 -07:00
pinctrl Pin control bulk changes for v6.0: 2022-08-10 11:01:44 -07:00
platform sound fixes for 6.0-rc2 2022-08-19 09:46:11 -07:00
pnp PCI: Remove pci_get_legacy_ide_irq() and asm-generic/pci.h 2022-07-22 17:23:45 -05:00
power power supply and reset changes for the v6.0 series 2022-08-12 09:37:33 -07:00
powercap Power management updates for 5.20-rc1 2022-08-02 11:17:00 -07:00
pps
ps3
ptp SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
pwm SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
rapidio
ras
regulator regulator: Fixes for v6.0 2022-08-16 11:36:38 -07:00
remoteproc virtio: Revert "virtio: find_vqs() add arg sizes" 2022-08-16 01:40:24 -04:00
reset ARM: SoC: late updates for 6.0 2022-08-05 10:02:33 -07:00
rpmsg
rtc rtc: spear: set range max 2022-08-09 00:56:41 +02:00
s390 s390/dasd: add device ping attribute 2022-09-21 08:32:51 -06:00
sbus
scsi block: Change the return type of blk_mq_map_queues() into void 2022-08-22 10:07:53 -06:00
sh
siox
slimbus
soc More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
soundwire sound updates for 6.0-rc1 2022-08-06 10:19:51 -07:00
spi spi: Fixes for v6.0 2022-08-16 11:40:15 -07:00
spmi
ssb
staging Staging driver patches for 6.0-rc1 2022-08-04 12:01:42 -07:00
target SCSI misc on 20220813 2022-08-13 13:41:48 -07:00
tc
tee tee: add overflow check in register_shm_helper() 2022-08-18 09:20:27 -07:00
thermal More thermal control updates for 5.20-rc1 2022-08-08 14:23:37 -07:00
thunderbolt USB / Thunderbolt changes for 6.0-rc1 2022-08-04 11:41:28 -07:00
tty TTY / Serial driver changes for 6.0-rc1 2022-08-08 11:31:40 -07:00
ufs block: Change the return type of blk_mq_map_queues() into void 2022-08-22 10:07:53 -06:00
uio
usb TTY / Serial driver changes for 6.0-rc1 2022-08-08 11:31:40 -07:00
vdpa vdpa/mlx5: Fix possible uninitialized return value 2022-08-11 10:00:36 -04:00
vfio vfio: Move vfio.c to vfio_main.c 2022-08-08 14:33:41 -06:00
vhost virtio: fatures, fixes 2022-08-12 09:50:34 -07:00
video TTY / Serial driver changes for 6.0-rc1 2022-08-08 11:31:40 -07:00
virt Char / Misc driver changes for 6.0-rc1 2022-08-04 11:05:48 -07:00
virtio virtio: kerneldocs fixes and enhancements 2022-08-16 01:40:24 -04:00
vlynq
w1
watchdog linux-watchdog 5.20-rc1 tag 2022-08-08 15:04:04 -07:00
xen xen: branch for v6.0-rc1b 2022-08-14 09:28:54 -07:00
zorro
Kconfig
Makefile Staging driver patches for 6.0-rc1 2022-08-04 12:01:42 -07:00