mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
Merge tag 'block-6.6-2023-10-06' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe: "Just two minor fixes, for nbd and md" * tag 'block-6.6-2023-10-06' of git://git.kernel.dk/linux: nbd: don't call blk_mark_disk_dead nbd_clear_sock_ioctl md/raid5: release batch_last before waiting for another stripe_head
This commit is contained in:
@@ -1436,8 +1436,9 @@ static int nbd_start_device_ioctl(struct nbd_device *nbd)
|
|||||||
|
|
||||||
static void nbd_clear_sock_ioctl(struct nbd_device *nbd)
|
static void nbd_clear_sock_ioctl(struct nbd_device *nbd)
|
||||||
{
|
{
|
||||||
blk_mark_disk_dead(nbd->disk);
|
|
||||||
nbd_clear_sock(nbd);
|
nbd_clear_sock(nbd);
|
||||||
|
disk_force_media_change(nbd->disk);
|
||||||
|
nbd_bdev_reset(nbd);
|
||||||
if (test_and_clear_bit(NBD_RT_HAS_CONFIG_REF,
|
if (test_and_clear_bit(NBD_RT_HAS_CONFIG_REF,
|
||||||
&nbd->config->runtime_flags))
|
&nbd->config->runtime_flags))
|
||||||
nbd_config_put(nbd);
|
nbd_config_put(nbd);
|
||||||
|
|||||||
@@ -854,6 +854,13 @@ struct stripe_head *raid5_get_active_stripe(struct r5conf *conf,
|
|||||||
|
|
||||||
set_bit(R5_INACTIVE_BLOCKED, &conf->cache_state);
|
set_bit(R5_INACTIVE_BLOCKED, &conf->cache_state);
|
||||||
r5l_wake_reclaim(conf->log, 0);
|
r5l_wake_reclaim(conf->log, 0);
|
||||||
|
|
||||||
|
/* release batch_last before wait to avoid risk of deadlock */
|
||||||
|
if (ctx && ctx->batch_last) {
|
||||||
|
raid5_release_stripe(ctx->batch_last);
|
||||||
|
ctx->batch_last = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
wait_event_lock_irq(conf->wait_for_stripe,
|
wait_event_lock_irq(conf->wait_for_stripe,
|
||||||
is_inactive_blocked(conf, hash),
|
is_inactive_blocked(conf, hash),
|
||||||
*(conf->hash_locks + hash));
|
*(conf->hash_locks + hash));
|
||||||
|
|||||||
Reference in New Issue
Block a user