From: Jens Axboe Date: Wed, 13 Nov 2024 14:39:12 +0000 (-0700) Subject: Merge branch 'for-6.13/block' into for-next X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b73f60a98dc617c2aa8817e20ffdd0e28ae2486a;p=users%2Fhch%2Fmisc.git Merge branch 'for-6.13/block' into for-next * for-6.13/block: (87 commits) block: remove the ioprio field from struct request block: remove the write_hint field from struct request nvme-multipath: don't bother clearing max_hw_zone_append_sectors block: pre-calculate max_zone_append_sectors block: lift bio_is_zone_append to bio.h block: fix bio_split_rw_at to take zone_write_granularity into account block: take chunk_sectors into account in bio_split_write_zeroes md/raid10: Handle bio_split() errors md/raid1: Handle bio_split() errors md/raid0: Handle bio_split() errors block: Handle bio_split() errors in bio_submit_split() block: Error an attempt to split an atomic write in bio_split() block: Rework bio_split() return value ublk: fix ublk_ch_mmap() for 64K page size s390/dasd: Fix typo in comment s390/dasd: fix redundant /proc/dasd* entries removal loop: fix type of block size MAINTAINERS: Make Yu Kuai co-maintainer of md/raid subsystem md/raid5: Wait sync io to finish before changing group cnt block: don't verify IO lock for freeze/unfreeze in elevator_init_mq() ... Signed-off-by: Jens Axboe --- b73f60a98dc617c2aa8817e20ffdd0e28ae2486a diff --cc drivers/nvme/host/core.c index 855b42c92284,3de7555a7de7..67c4dd26c2de --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@@ -4893,9 -4863,8 +4893,9 @@@ void nvme_unfreeze(struct nvme_ctrl *ct int srcu_idx; srcu_idx = srcu_read_lock(&ctrl->srcu); - list_for_each_entry_rcu(ns, &ctrl->namespaces, list) + list_for_each_entry_srcu(ns, &ctrl->namespaces, list, + srcu_read_lock_held(&ctrl->srcu)) - blk_mq_unfreeze_queue(ns->queue); + blk_mq_unfreeze_queue_non_owner(ns->queue); srcu_read_unlock(&ctrl->srcu, srcu_idx); clear_bit(NVME_CTRL_FROZEN, &ctrl->flags); } @@@ -4938,9 -4905,13 +4938,14 @@@ void nvme_start_freeze(struct nvme_ctr set_bit(NVME_CTRL_FROZEN, &ctrl->flags); srcu_idx = srcu_read_lock(&ctrl->srcu); - list_for_each_entry_rcu(ns, &ctrl->namespaces, list) + list_for_each_entry_srcu(ns, &ctrl->namespaces, list, + srcu_read_lock_held(&ctrl->srcu)) - blk_freeze_queue_start(ns->queue); + /* + * Typical non_owner use case is from pci driver, in which + * start_freeze is called from timeout work function, but + * unfreeze is done in reset work context + */ + blk_freeze_queue_start_non_owner(ns->queue); srcu_read_unlock(&ctrl->srcu, srcu_idx); } EXPORT_SYMBOL_GPL(nvme_start_freeze);