OpenCloudOS-Kernel/drivers
Damien Le Moal 78e1663f19 sd_zbc: clear zone resources for non-zoned case
For host-aware ZBC disk, setting the device zoned model to BLK_ZONED_HA
using blk_queue_set_zoned() in sd_read_block_characteristics() may
result in the block device effective zoned model to be "none"
(BLK_ZONED_NONE) if partitions are present on the device. In this case,
sd_zbc_read_zones() should not setup the zone related queue limits for
the disk so that the device limits and configuration is consistent with
a regular disk and resources not uselessly allocated (e.g. the zone
write pointer tracking array for zone append emulation).

Furthermore, if the disk zoned model changes at run time due to the
creation of a partition by the user, the zone related resources can be
released.

Fix both problems by introducing the function sd_zbc_clear_zone_info()
to reset the scsi disk zone information and free resources and by
returning early in sd_zbc_read_zones() for a block device that has a
zoned model equal to BLK_ZONED_NONE.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@edc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-02-10 07:44:41 -07:00
..
accessibility speakup: fix uninitialized flush_lock 2020-12-09 15:38:13 +01:00
acpi ACPI: scan: Make acpi_bus_get_device() clear return pointer on error 2021-01-20 19:20:20 +01:00
amba
android Merge branch 'exec-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2020-12-15 19:29:43 -08:00
ata
atm atm: idt77252: call pci_disable_device() on error path 2020-12-21 17:34:09 -08:00
auxdisplay
base Driver core fixes for 5.11-rc5 2021-01-24 11:05:48 -08:00
bcma
block nullb: use blk_queue_set_zoned() to setup zoned devices 2021-02-10 07:44:40 -07:00
bluetooth Bluetooth: btusb: Add workaround for remote-wakeup issues with Barrot 8041a02 fake CSR controllers 2020-12-07 17:01:54 +02:00
bus ARM: SoC drivers for v5.11 2020-12-16 16:38:41 -08:00
cdrom block: remove unnecessary argument from blk_execute_rq 2021-01-24 21:52:39 -07:00
char UAPI Changes: 2020-12-18 12:38:28 -08:00
clk clk: tegra30: Add hda clock default rates to clock driver 2021-01-12 14:43:53 +01:00
clocksource asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
connector net/connector: Add const qualifier to cb_id 2020-12-16 11:06:49 -08:00
counter counter:ti-eqep: remove floor 2021-01-14 20:56:56 +00:00
cpufreq cpufreq: intel_pstate: remove obsolete functions 2021-01-07 18:22:46 +01:00
cpuidle ARM: SoC drivers for v5.11 2020-12-16 16:38:41 -08:00
crypto crypto: omap-sham - Fix link error without crypto-engine 2021-01-08 15:37:55 +11:00
dax libnvdimm for 5.11 2020-12-24 12:18:11 -08:00
dca
devfreq Merge branches 'pm-devfreq' and 'pm-tools' 2020-12-15 15:27:16 +01:00
dio
dma dmaengine: stm32-mdma: fix STM32_MDMA_VERY_HIGH_PRIORITY value 2021-01-04 21:27:45 +05:30
dma-buf dma-buf: cma_heap: Fix memory leak in CMA heap 2021-01-10 23:08:21 +05:30
edac Merge branch 'akpm' (patches from Andrew) 2020-12-15 12:53:37 -08:00
eisa
extcon extcon: max77693: Fix modalias string 2020-12-11 17:18:10 +09:00
firewire
firmware EFI updates collected by Ard Biesheuvel: 2020-12-24 12:40:07 -08:00
fpga Merge 5.10-rc7 into char-misc-next 2020-12-07 10:08:14 +01:00
fsi hwmon patches for v5.11 2020-12-15 16:06:14 -08:00
gnss
gpio gpio: tegra: Add missing dependencies 2021-01-19 13:37:10 +01:00
gpu Merge tag 'amd-drm-fixes-5.11-2021-01-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes 2021-01-22 09:43:21 +10:00
greybus
hid HID: logitech-hidpp: Add product ID for MX Ergo in Bluetooth mode 2021-01-14 13:27:35 +01:00
hsi HSI: core: fix a kernel-doc markup 2020-12-02 22:35:44 +01:00
hv x86/hyperv: Fix kexec panic/hang issues 2021-01-05 17:52:04 +00:00
hwmon hwmon: (amd_energy) fix allocation of hwmon_channel_info config 2021-01-08 07:31:03 -08:00
hwspinlock hwspinlock: sirf: Remove the redundant 'of_match_ptr' 2020-12-10 13:34:40 -06:00
hwtracing intel_th: pci: Add Alder Lake-P support 2021-01-21 18:54:43 +01:00
i2c i2c: sprd: depend on COMMON_CLK to fix compile tests 2021-01-22 10:13:33 +01:00
i3c i3c/master/mipi-i3c-hci: quiet maybe-unused variable warning 2020-12-17 10:31:30 +01:00
ide block: remove unnecessary argument from blk_execute_rq 2021-01-24 21:52:39 -07:00
idle intel_idle: add SnowRidge C-state table 2020-12-30 18:25:34 +01:00
iio iio: sx9310: Fix semtech,avg-pos-strength setting when > 16 2021-01-14 21:01:22 +00:00
infiniband RDMA/cma: Fix error flow in default_roce_mode_store 2021-01-14 12:53:13 -04:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2020-12-15 16:18:23 -08:00
interconnect interconnect: imx8mq: Use icc_sync_state 2020-12-28 14:03:02 +02:00
iommu iommu/vt-d: Fix duplicate included linux/dma-map-ops.h 2021-01-12 16:56:20 +00:00
ipack
irqchip irqchip fixes for 5.11, take #1 2021-01-12 21:23:55 +01:00
isdn misdn: dsp: select CONFIG_BITREVERSE 2021-01-05 15:50:36 -08:00
leds
lightnvm block: store a block_device pointer in struct bio 2021-01-24 18:17:20 -07:00
macintosh macintosh/adb-iop: Send correct poll command 2020-12-07 10:48:16 +01:00
mailbox mailbox: arm_mhuv2: Add driver 2020-12-09 19:26:02 -06:00
mcb
md md/raid10: remove dead code in reshape_request 2021-02-08 08:33:16 -07:00
media ARM: SoC drivers for v5.11 2020-12-16 16:38:41 -08:00
memory Merge tag 'memory-controller-drv-tegra-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers 2020-12-09 00:40:02 +01:00
memstick memstick: r592: Fix error return in r592_probe() 2020-12-04 12:27:10 +01:00
message SCSI misc on 20201216 2020-12-16 13:34:31 -08:00
mfd mfd: ab8500-debugfs: Remove extraneous seq_putc 2020-12-26 09:19:49 -08:00
misc misc: rtsx: init value of aspm_enabled 2021-01-22 11:04:53 +01:00
mmc block: remove unnecessary argument from blk_execute_rq 2021-01-24 21:52:39 -07:00
most
mtd mtd: rawnand: omap: Use BCH private fields in the specific OOB layout 2021-01-20 23:38:00 +01:00
mux
net linux-can-fixes-for-5.11-20210120 2021-01-20 09:16:01 -08:00
nfc nfc: s3fwrn5: Remove unused NCI prop commands 2020-12-16 13:09:35 -08:00
ntb Big fix for IDT NTB and Intel NTB LTR management support 2020-12-27 09:22:55 -08:00
nubus
nvdimm block: store a block_device pointer in struct bio 2021-01-24 18:17:20 -07:00
nvme nvme: cleanup zone information initialization 2021-02-10 07:44:40 -07:00
nvmem
of Driver core updates for 5.11-rc1 2020-12-15 14:02:26 -08:00
opp opp: Call the missing clk_put() on error 2020-12-28 10:56:22 +05:30
oprofile
parisc
parport
pci pci-v5.11-fixes-1 2020-12-25 20:17:40 -08:00
pcmcia Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux 2020-12-19 12:50:10 -08:00
perf Revert "arm64: Enable perf events based hard lockup detector" 2021-01-13 15:08:41 +00:00
phy phy: mediatek: allow compile-testing the dsi phy 2021-01-04 13:00:54 +05:30
pinctrl pinctrl: qcom: Don't clear pending interrupts when enabling 2021-01-18 16:07:08 +01:00
platform platform/x86: thinkpad_acpi: Add P53/73 firmware to fan_quirk_table for dual fan control 2021-01-18 21:42:01 +01:00
pnp
power power: supply: Fix a typo in warning message 2020-12-13 01:00:10 +01:00
powercap Merge branches 'pm-sleep', 'pm-acpi', 'pm-domains' and 'powercap' 2020-12-15 15:26:14 +01:00
pps
ps3 powerpc/ps3: use dma_mapping_error() 2020-12-15 22:50:12 +11:00
ptp ptp: ptp_ines: prevent build when HAS_IOMEM is not set 2021-01-06 16:17:23 -08:00
pwm pwm: Changes for v5.11-rc1 2020-12-19 11:51:32 -08:00
rapidio rapidio: remove unused rio_get_asm() and rio_get_device() 2020-12-15 22:46:18 -08:00
ras
regulator Merge qcom driver fix into regulator-5.11 2021-01-04 16:23:20 +00:00
remoteproc ARM: SoC drivers for v5.11 2020-12-16 16:38:41 -08:00
reset ARM: SoC drivers for v5.11 2020-12-16 16:38:41 -08:00
rpmsg
rtc RTC for 5.11 2020-12-20 10:12:06 -08:00
s390 block: add a disk_uevent helper 2021-01-24 18:17:20 -07:00
sbus
scsi sd_zbc: clear zone resources for non-zoned case 2021-02-10 07:44:41 -07:00
sfi
sh sh/intc: Restore devm_ioremap() alignment 2021-01-06 19:55:29 -05:00
siox siox: Make remove callback return void 2020-12-10 16:17:15 +01:00
slimbus slimbus: qcom: fix potential NULL dereference in qcom_slim_prg_slew() 2020-12-10 16:23:56 +01:00
soc soc: litex: Fix compile warning when device tree is not configured 2021-01-14 09:34:00 +09:00
soundwire soundwire: intel: fix another unused-function warning 2020-12-05 13:11:54 +05:30
spi spi: cadence: cache reference clock rate during probe 2021-01-15 14:14:38 +00:00
spmi spmi: Add driver shutdown support 2020-12-10 10:45:36 +01:00
ssb
staging staging: ION: remove some references to CONFIG_ION 2021-01-06 17:39:38 +01:00
target target/file: allocate the bvec array as part of struct target_core_file_cmd 2021-01-25 08:58:24 -07:00
tc
tee ARM: SoC drivers for v5.11 2020-12-16 16:38:41 -08:00
thermal - Add Alder Lake support ACPI ids (Srinivas Pandruvada) 2020-12-18 12:19:37 -08:00
thunderbolt thunderbolt: Drop duplicated 0x prefix from format string 2021-01-07 15:14:44 +03:00
tty TTY/Serial fixes for 5.11-rc5 2021-01-24 10:56:45 -08:00
uio uio: uio_hv_generic: use devm_kzalloc() for private data alloc 2020-12-09 19:59:00 +01:00
usb usb: bdc: Make bdc pci driver depend on BROKEN 2021-01-19 14:10:46 +01:00
vdpa virtio,vdpa: features, cleanups, fixes 2020-12-24 12:06:46 -08:00
vfio ARM: 2020-12-20 10:44:05 -08:00
vhost vhost: bugfix 2021-01-05 13:30:28 -08:00
video UAPI Changes: 2020-12-18 12:38:28 -08:00
virt
virtio virtio,vdpa: features, cleanups, fixes 2020-12-24 12:06:46 -08:00
visorbus
vlynq
vme vme: switch from 'pci_' to 'dma_' API 2020-12-09 19:44:34 +01:00
w1
watchdog linux-watchdog 5.11-rc1 tag 2020-12-23 15:01:49 -08:00
xen xen: branch for v5.11-rc4 2021-01-15 10:52:00 -08:00
zorro
Kconfig
Makefile asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00