stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	Naohiro Aota <naohiro.aota@wdc.com>,
	Filipe Manana <fdmanana@suse.com>,
	David Sterba <dsterba@suse.com>
Subject: [PATCH 5.12 025/292] btrfs: rework chunk allocation to avoid exhaustion of the system chunk array
Date: Mon, 19 Jul 2021 16:51:27 +0200	[thread overview]
Message-ID: <20210719144943.357382074@linuxfoundation.org> (raw)
In-Reply-To: <20210719144942.514164272@linuxfoundation.org>

From: Filipe Manana <fdmanana@suse.com>

commit 79bd37120b149532af5b21953643ed74af69654f upstream.

Commit eafa4fd0ad0607 ("btrfs: fix exhaustion of the system chunk array
due to concurrent allocations") fixed a problem that resulted in
exhausting the system chunk array in the superblock when there are many
tasks allocating chunks in parallel. Basically too many tasks enter the
first phase of chunk allocation without previous tasks having finished
their second phase of allocation, resulting in too many system chunks
being allocated. That was originally observed when running the fallocate
tests of stress-ng on a PowerPC machine, using a node size of 64K.

However that commit also introduced a deadlock where a task in phase 1 of
the chunk allocation waited for another task that had allocated a system
chunk to finish its phase 2, but that other task was waiting on an extent
buffer lock held by the first task, therefore resulting in both tasks not
making any progress. That change was later reverted by a patch with the
subject "btrfs: fix deadlock with concurrent chunk allocations involving
system chunks", since there is no simple and short solution to address it
and the deadlock is relatively easy to trigger on zoned filesystems, while
the system chunk array exhaustion is not so common.

This change reworks the chunk allocation to avoid the system chunk array
exhaustion. It accomplishes that by making the first phase of chunk
allocation do the updates of the device items in the chunk btree and the
insertion of the new chunk item in the chunk btree. This is done while
under the protection of the chunk mutex (fs_info->chunk_mutex), in the
same critical section that checks for available system space, allocates
a new system chunk if needed and reserves system chunk space. This way
we do not have chunk space reserved until the second phase completes.

The same logic is applied to chunk removal as well, since it keeps
reserved system space long after it is done updating the chunk btree.

For direct allocation of system chunks, the previous behaviour remains,
because otherwise we would deadlock on extent buffers of the chunk btree.
Changes to the chunk btree are by large done by chunk allocation and chunk
removal, which first reserve chunk system space and then later do changes
to the chunk btree. The other remaining cases are uncommon and correspond
to adding a device, removing a device and resizing a device. All these
other cases do not pre-reserve system space, they modify the chunk btree
right away, so they don't hold reserved space for a long period like chunk
allocation and chunk removal do.

The diff of this change is huge, but more than half of it is just addition
of comments describing both how things work regarding chunk allocation and
removal, including both the new behavior and the parts of the old behavior
that did not change.

CC: stable@vger.kernel.org # 5.12+
Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tested-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Tested-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/btrfs/block-group.c |  285 ++++++++++++++++++++++++++++++++++-----
 fs/btrfs/block-group.h |    6 
 fs/btrfs/ctree.c       |   67 +--------
 fs/btrfs/transaction.c |   10 -
 fs/btrfs/transaction.h |    2 
 fs/btrfs/volumes.c     |  355 +++++++++++++++++++++++++++++++++++++------------
 fs/btrfs/volumes.h     |    5 
 7 files changed, 546 insertions(+), 184 deletions(-)

--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -2101,6 +2101,13 @@ error:
 	return ret;
 }
 
+/*
+ * This function, insert_block_group_item(), belongs to the phase 2 of chunk
+ * allocation.
+ *
+ * See the comment at btrfs_chunk_alloc() for details about the chunk allocation
+ * phases.
+ */
 static int insert_block_group_item(struct btrfs_trans_handle *trans,
 				   struct btrfs_block_group *block_group)
 {
@@ -2123,15 +2130,19 @@ static int insert_block_group_item(struc
 	return btrfs_insert_item(trans, root, &key, &bgi, sizeof(bgi));
 }
 
+/*
+ * This function, btrfs_create_pending_block_groups(), belongs to the phase 2 of
+ * chunk allocation.
+ *
+ * See the comment at btrfs_chunk_alloc() for details about the chunk allocation
+ * phases.
+ */
 void btrfs_create_pending_block_groups(struct btrfs_trans_handle *trans)
 {
 	struct btrfs_fs_info *fs_info = trans->fs_info;
 	struct btrfs_block_group *block_group;
 	int ret = 0;
 
-	if (!trans->can_flush_pending_bgs)
-		return;
-
 	while (!list_empty(&trans->new_bgs)) {
 		int index;
 
@@ -2146,6 +2157,13 @@ void btrfs_create_pending_block_groups(s
 		ret = insert_block_group_item(trans, block_group);
 		if (ret)
 			btrfs_abort_transaction(trans, ret);
+		if (!block_group->chunk_item_inserted) {
+			mutex_lock(&fs_info->chunk_mutex);
+			ret = btrfs_chunk_alloc_add_chunk_item(trans, block_group);
+			mutex_unlock(&fs_info->chunk_mutex);
+			if (ret)
+				btrfs_abort_transaction(trans, ret);
+		}
 		ret = btrfs_finish_chunk_alloc(trans, block_group->start,
 					block_group->length);
 		if (ret)
@@ -2169,8 +2187,9 @@ next:
 	btrfs_trans_release_chunk_metadata(trans);
 }
 
-int btrfs_make_block_group(struct btrfs_trans_handle *trans, u64 bytes_used,
-			   u64 type, u64 chunk_offset, u64 size)
+struct btrfs_block_group *btrfs_make_block_group(struct btrfs_trans_handle *trans,
+						 u64 bytes_used, u64 type,
+						 u64 chunk_offset, u64 size)
 {
 	struct btrfs_fs_info *fs_info = trans->fs_info;
 	struct btrfs_block_group *cache;
@@ -2180,7 +2199,7 @@ int btrfs_make_block_group(struct btrfs_
 
 	cache = btrfs_create_block_group_cache(fs_info, chunk_offset);
 	if (!cache)
-		return -ENOMEM;
+		return ERR_PTR(-ENOMEM);
 
 	cache->length = size;
 	set_free_space_tree_thresholds(cache);
@@ -2194,7 +2213,7 @@ int btrfs_make_block_group(struct btrfs_
 	ret = btrfs_load_block_group_zone_info(cache, true);
 	if (ret) {
 		btrfs_put_block_group(cache);
-		return ret;
+		return ERR_PTR(ret);
 	}
 
 	ret = exclude_super_stripes(cache);
@@ -2202,7 +2221,7 @@ int btrfs_make_block_group(struct btrfs_
 		/* We may have excluded something, so call this just in case */
 		btrfs_free_excluded_extents(cache);
 		btrfs_put_block_group(cache);
-		return ret;
+		return ERR_PTR(ret);
 	}
 
 	add_new_free_space(cache, chunk_offset, chunk_offset + size);
@@ -2229,7 +2248,7 @@ int btrfs_make_block_group(struct btrfs_
 	if (ret) {
 		btrfs_remove_free_space_cache(cache);
 		btrfs_put_block_group(cache);
-		return ret;
+		return ERR_PTR(ret);
 	}
 
 	/*
@@ -2248,7 +2267,7 @@ int btrfs_make_block_group(struct btrfs_
 	btrfs_update_delayed_refs_rsv(trans);
 
 	set_avail_alloc_bits(fs_info, type);
-	return 0;
+	return cache;
 }
 
 /*
@@ -3124,11 +3143,203 @@ int btrfs_force_chunk_alloc(struct btrfs
 	return btrfs_chunk_alloc(trans, alloc_flags, CHUNK_ALLOC_FORCE);
 }
 
+static int do_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags)
+{
+	struct btrfs_block_group *bg;
+	int ret;
+
+	/*
+	 * Check if we have enough space in the system space info because we
+	 * will need to update device items in the chunk btree and insert a new
+	 * chunk item in the chunk btree as well. This will allocate a new
+	 * system block group if needed.
+	 */
+	check_system_chunk(trans, flags);
+
+	bg = btrfs_alloc_chunk(trans, flags);
+	if (IS_ERR(bg)) {
+		ret = PTR_ERR(bg);
+		goto out;
+	}
+
+	/*
+	 * If this is a system chunk allocation then stop right here and do not
+	 * add the chunk item to the chunk btree. This is to prevent a deadlock
+	 * because this system chunk allocation can be triggered while COWing
+	 * some extent buffer of the chunk btree and while holding a lock on a
+	 * parent extent buffer, in which case attempting to insert the chunk
+	 * item (or update the device item) would result in a deadlock on that
+	 * parent extent buffer. In this case defer the chunk btree updates to
+	 * the second phase of chunk allocation and keep our reservation until
+	 * the second phase completes.
+	 *
+	 * This is a rare case and can only be triggered by the very few cases
+	 * we have where we need to touch the chunk btree outside chunk allocation
+	 * and chunk removal. These cases are basically adding a device, removing
+	 * a device or resizing a device.
+	 */
+	if (flags & BTRFS_BLOCK_GROUP_SYSTEM)
+		return 0;
+
+	ret = btrfs_chunk_alloc_add_chunk_item(trans, bg);
+	/*
+	 * Normally we are not expected to fail with -ENOSPC here, since we have
+	 * previously reserved space in the system space_info and allocated one
+	 * new system chunk if necessary. However there are two exceptions:
+	 *
+	 * 1) We may have enough free space in the system space_info but all the
+	 *    existing system block groups have a profile which can not be used
+	 *    for extent allocation.
+	 *
+	 *    This happens when mounting in degraded mode. For example we have a
+	 *    RAID1 filesystem with 2 devices, lose one device and mount the fs
+	 *    using the other device in degraded mode. If we then allocate a chunk,
+	 *    we may have enough free space in the existing system space_info, but
+	 *    none of the block groups can be used for extent allocation since they
+	 *    have a RAID1 profile, and because we are in degraded mode with a
+	 *    single device, we are forced to allocate a new system chunk with a
+	 *    SINGLE profile. Making check_system_chunk() iterate over all system
+	 *    block groups and check if they have a usable profile and enough space
+	 *    can be slow on very large filesystems, so we tolerate the -ENOSPC and
+	 *    try again after forcing allocation of a new system chunk. Like this
+	 *    we avoid paying the cost of that search in normal circumstances, when
+	 *    we were not mounted in degraded mode;
+	 *
+	 * 2) We had enough free space info the system space_info, and one suitable
+	 *    block group to allocate from when we called check_system_chunk()
+	 *    above. However right after we called it, the only system block group
+	 *    with enough free space got turned into RO mode by a running scrub,
+	 *    and in this case we have to allocate a new one and retry. We only
+	 *    need do this allocate and retry once, since we have a transaction
+	 *    handle and scrub uses the commit root to search for block groups.
+	 */
+	if (ret == -ENOSPC) {
+		const u64 sys_flags = btrfs_system_alloc_profile(trans->fs_info);
+		struct btrfs_block_group *sys_bg;
+
+		sys_bg = btrfs_alloc_chunk(trans, sys_flags);
+		if (IS_ERR(sys_bg)) {
+			ret = PTR_ERR(sys_bg);
+			btrfs_abort_transaction(trans, ret);
+			goto out;
+		}
+
+		ret = btrfs_chunk_alloc_add_chunk_item(trans, sys_bg);
+		if (ret) {
+			btrfs_abort_transaction(trans, ret);
+			goto out;
+		}
+
+		ret = btrfs_chunk_alloc_add_chunk_item(trans, bg);
+		if (ret) {
+			btrfs_abort_transaction(trans, ret);
+			goto out;
+		}
+	} else if (ret) {
+		btrfs_abort_transaction(trans, ret);
+		goto out;
+	}
+out:
+	btrfs_trans_release_chunk_metadata(trans);
+
+	return ret;
+}
+
 /*
- * If force is CHUNK_ALLOC_FORCE:
+ * Chunk allocation is done in 2 phases:
+ *
+ * 1) Phase 1 - through btrfs_chunk_alloc() we allocate device extents for
+ *    the chunk, the chunk mapping, create its block group and add the items
+ *    that belong in the chunk btree to it - more specifically, we need to
+ *    update device items in the chunk btree and add a new chunk item to it.
+ *
+ * 2) Phase 2 - through btrfs_create_pending_block_groups(), we add the block
+ *    group item to the extent btree and the device extent items to the devices
+ *    btree.
+ *
+ * This is done to prevent deadlocks. For example when COWing a node from the
+ * extent btree we are holding a write lock on the node's parent and if we
+ * trigger chunk allocation and attempted to insert the new block group item
+ * in the extent btree right way, we could deadlock because the path for the
+ * insertion can include that parent node. At first glance it seems impossible
+ * to trigger chunk allocation after starting a transaction since tasks should
+ * reserve enough transaction units (metadata space), however while that is true
+ * most of the time, chunk allocation may still be triggered for several reasons:
+ *
+ * 1) When reserving metadata, we check if there is enough free space in the
+ *    metadata space_info and therefore don't trigger allocation of a new chunk.
+ *    However later when the task actually tries to COW an extent buffer from
+ *    the extent btree or from the device btree for example, it is forced to
+ *    allocate a new block group (chunk) because the only one that had enough
+ *    free space was just turned to RO mode by a running scrub for example (or
+ *    device replace, block group reclaim thread, etc), so we can not use it
+ *    for allocating an extent and end up being forced to allocate a new one;
+ *
+ * 2) Because we only check that the metadata space_info has enough free bytes,
+ *    we end up not allocating a new metadata chunk in that case. However if
+ *    the filesystem was mounted in degraded mode, none of the existing block
+ *    groups might be suitable for extent allocation due to their incompatible
+ *    profile (for e.g. mounting a 2 devices filesystem, where all block groups
+ *    use a RAID1 profile, in degraded mode using a single device). In this case
+ *    when the task attempts to COW some extent buffer of the extent btree for
+ *    example, it will trigger allocation of a new metadata block group with a
+ *    suitable profile (SINGLE profile in the example of the degraded mount of
+ *    the RAID1 filesystem);
+ *
+ * 3) The task has reserved enough transaction units / metadata space, but when
+ *    it attempts to COW an extent buffer from the extent or device btree for
+ *    example, it does not find any free extent in any metadata block group,
+ *    therefore forced to try to allocate a new metadata block group.
+ *    This is because some other task allocated all available extents in the
+ *    meanwhile - this typically happens with tasks that don't reserve space
+ *    properly, either intentionally or as a bug. One example where this is
+ *    done intentionally is fsync, as it does not reserve any transaction units
+ *    and ends up allocating a variable number of metadata extents for log
+ *    tree extent buffers.
+ *
+ * We also need this 2 phases setup when adding a device to a filesystem with
+ * a seed device - we must create new metadata and system chunks without adding
+ * any of the block group items to the chunk, extent and device btrees. If we
+ * did not do it this way, we would get ENOSPC when attempting to update those
+ * btrees, since all the chunks from the seed device are read-only.
+ *
+ * Phase 1 does the updates and insertions to the chunk btree because if we had
+ * it done in phase 2 and have a thundering herd of tasks allocating chunks in
+ * parallel, we risk having too many system chunks allocated by many tasks if
+ * many tasks reach phase 1 without the previous ones completing phase 2. In the
+ * extreme case this leads to exhaustion of the system chunk array in the
+ * superblock. This is easier to trigger if using a btree node/leaf size of 64K
+ * and with RAID filesystems (so we have more device items in the chunk btree).
+ * This has happened before and commit eafa4fd0ad0607 ("btrfs: fix exhaustion of
+ * the system chunk array due to concurrent allocations") provides more details.
+ *
+ * For allocation of system chunks, we defer the updates and insertions into the
+ * chunk btree to phase 2. This is to prevent deadlocks on extent buffers because
+ * if the chunk allocation is triggered while COWing an extent buffer of the
+ * chunk btree, we are holding a lock on the parent of that extent buffer and
+ * doing the chunk btree updates and insertions can require locking that parent.
+ * This is for the very few and rare cases where we update the chunk btree that
+ * are not chunk allocation or chunk removal: adding a device, removing a device
+ * or resizing a device.
+ *
+ * The reservation of system space, done through check_system_chunk(), as well
+ * as all the updates and insertions into the chunk btree must be done while
+ * holding fs_info->chunk_mutex. This is important to guarantee that while COWing
+ * an extent buffer from the chunks btree we never trigger allocation of a new
+ * system chunk, which would result in a deadlock (trying to lock twice an
+ * extent buffer of the chunk btree, first time before triggering the chunk
+ * allocation and the second time during chunk allocation while attempting to
+ * update the chunks btree). The system chunk array is also updated while holding
+ * that mutex. The same logic applies to removing chunks - we must reserve system
+ * space, update the chunk btree and the system chunk array in the superblock
+ * while holding fs_info->chunk_mutex.
+ *
+ * This function, btrfs_chunk_alloc(), belongs to phase 1.
+ *
+ * If @force is CHUNK_ALLOC_FORCE:
  *    - return 1 if it successfully allocates a chunk,
  *    - return errors including -ENOSPC otherwise.
- * If force is NOT CHUNK_ALLOC_FORCE:
+ * If @force is NOT CHUNK_ALLOC_FORCE:
  *    - return 0 if it doesn't need to allocate a new chunk,
  *    - return 1 if it successfully allocates a chunk,
  *    - return errors including -ENOSPC otherwise.
@@ -3145,6 +3356,13 @@ int btrfs_chunk_alloc(struct btrfs_trans
 	/* Don't re-enter if we're already allocating a chunk */
 	if (trans->allocating_chunk)
 		return -ENOSPC;
+	/*
+	 * If we are removing a chunk, don't re-enter or we would deadlock.
+	 * System space reservation and system chunk allocation is done by the
+	 * chunk remove operation (btrfs_remove_chunk()).
+	 */
+	if (trans->removing_chunk)
+		return -ENOSPC;
 
 	space_info = btrfs_find_space_info(fs_info, flags);
 	ASSERT(space_info);
@@ -3208,13 +3426,7 @@ int btrfs_chunk_alloc(struct btrfs_trans
 			force_metadata_allocation(fs_info);
 	}
 
-	/*
-	 * Check if we have enough space in SYSTEM chunk because we may need
-	 * to update devices.
-	 */
-	check_system_chunk(trans, flags);
-
-	ret = btrfs_alloc_chunk(trans, flags);
+	ret = do_chunk_alloc(trans, flags);
 	trans->allocating_chunk = false;
 
 	spin_lock(&space_info->lock);
@@ -3233,22 +3445,6 @@ out:
 	space_info->chunk_alloc = 0;
 	spin_unlock(&space_info->lock);
 	mutex_unlock(&fs_info->chunk_mutex);
-	/*
-	 * When we allocate a new chunk we reserve space in the chunk block
-	 * reserve to make sure we can COW nodes/leafs in the chunk tree or
-	 * add new nodes/leafs to it if we end up needing to do it when
-	 * inserting the chunk item and updating device items as part of the
-	 * second phase of chunk allocation, performed by
-	 * btrfs_finish_chunk_alloc(). So make sure we don't accumulate a
-	 * large number of new block groups to create in our transaction
-	 * handle's new_bgs list to avoid exhausting the chunk block reserve
-	 * in extreme cases - like having a single transaction create many new
-	 * block groups when starting to write out the free space caches of all
-	 * the block groups that were made dirty during the lifetime of the
-	 * transaction.
-	 */
-	if (trans->chunk_bytes_reserved >= (u64)SZ_2M)
-		btrfs_create_pending_block_groups(trans);
 
 	return ret;
 }
@@ -3301,14 +3497,31 @@ void check_system_chunk(struct btrfs_tra
 
 	if (left < thresh) {
 		u64 flags = btrfs_system_alloc_profile(fs_info);
+		struct btrfs_block_group *bg;
 
 		/*
 		 * Ignore failure to create system chunk. We might end up not
 		 * needing it, as we might not need to COW all nodes/leafs from
 		 * the paths we visit in the chunk tree (they were already COWed
 		 * or created in the current transaction for example).
+		 *
+		 * Also, if our caller is allocating a system chunk, do not
+		 * attempt to insert the chunk item in the chunk btree, as we
+		 * could deadlock on an extent buffer since our caller may be
+		 * COWing an extent buffer from the chunk btree.
 		 */
-		ret = btrfs_alloc_chunk(trans, flags);
+		bg = btrfs_alloc_chunk(trans, flags);
+		if (IS_ERR(bg)) {
+			ret = PTR_ERR(bg);
+		} else if (!(type & BTRFS_BLOCK_GROUP_SYSTEM)) {
+			/*
+			 * If we fail to add the chunk item here, we end up
+			 * trying again at phase 2 of chunk allocation, at
+			 * btrfs_create_pending_block_groups(). So ignore
+			 * any error here.
+			 */
+			btrfs_chunk_alloc_add_chunk_item(trans, bg);
+		}
 	}
 
 	if (!ret) {
--- a/fs/btrfs/block-group.h
+++ b/fs/btrfs/block-group.h
@@ -97,6 +97,7 @@ struct btrfs_block_group {
 	unsigned int removed:1;
 	unsigned int to_copy:1;
 	unsigned int relocating_repair:1;
+	unsigned int chunk_item_inserted:1;
 
 	int disk_cache_state;
 
@@ -265,8 +266,9 @@ int btrfs_remove_block_group(struct btrf
 void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info);
 void btrfs_mark_bg_unused(struct btrfs_block_group *bg);
 int btrfs_read_block_groups(struct btrfs_fs_info *info);
-int btrfs_make_block_group(struct btrfs_trans_handle *trans, u64 bytes_used,
-			   u64 type, u64 chunk_offset, u64 size);
+struct btrfs_block_group *btrfs_make_block_group(struct btrfs_trans_handle *trans,
+						 u64 bytes_used, u64 type,
+						 u64 chunk_offset, u64 size);
 void btrfs_create_pending_block_groups(struct btrfs_trans_handle *trans);
 int btrfs_inc_block_group_ro(struct btrfs_block_group *cache,
 			     bool do_chunk_alloc);
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -954,49 +954,6 @@ static noinline int update_ref_for_cow(s
 	return 0;
 }
 
-static struct extent_buffer *alloc_tree_block_no_bg_flush(
-					  struct btrfs_trans_handle *trans,
-					  struct btrfs_root *root,
-					  u64 parent_start,
-					  const struct btrfs_disk_key *disk_key,
-					  int level,
-					  u64 hint,
-					  u64 empty_size,
-					  enum btrfs_lock_nesting nest)
-{
-	struct btrfs_fs_info *fs_info = root->fs_info;
-	struct extent_buffer *ret;
-
-	/*
-	 * If we are COWing a node/leaf from the extent, chunk, device or free
-	 * space trees, make sure that we do not finish block group creation of
-	 * pending block groups. We do this to avoid a deadlock.
-	 * COWing can result in allocation of a new chunk, and flushing pending
-	 * block groups (btrfs_create_pending_block_groups()) can be triggered
-	 * when finishing allocation of a new chunk. Creation of a pending block
-	 * group modifies the extent, chunk, device and free space trees,
-	 * therefore we could deadlock with ourselves since we are holding a
-	 * lock on an extent buffer that btrfs_create_pending_block_groups() may
-	 * try to COW later.
-	 * For similar reasons, we also need to delay flushing pending block
-	 * groups when splitting a leaf or node, from one of those trees, since
-	 * we are holding a write lock on it and its parent or when inserting a
-	 * new root node for one of those trees.
-	 */
-	if (root == fs_info->extent_root ||
-	    root == fs_info->chunk_root ||
-	    root == fs_info->dev_root ||
-	    root == fs_info->free_space_root)
-		trans->can_flush_pending_bgs = false;
-
-	ret = btrfs_alloc_tree_block(trans, root, parent_start,
-				     root->root_key.objectid, disk_key, level,
-				     hint, empty_size, nest);
-	trans->can_flush_pending_bgs = true;
-
-	return ret;
-}
-
 /*
  * does the dirty work in cow of a single block.  The parent block (if
  * supplied) is updated to point to the new cow copy.  The new buffer is marked
@@ -1045,8 +1002,9 @@ static noinline int __btrfs_cow_block(st
 	if ((root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) && parent)
 		parent_start = parent->start;
 
-	cow = alloc_tree_block_no_bg_flush(trans, root, parent_start, &disk_key,
-					   level, search_start, empty_size, nest);
+	cow = btrfs_alloc_tree_block(trans, root, parent_start,
+				     root->root_key.objectid, &disk_key, level,
+				     search_start, empty_size, nest);
 	if (IS_ERR(cow))
 		return PTR_ERR(cow);
 
@@ -3340,9 +3298,9 @@ static noinline int insert_new_root(stru
 	else
 		btrfs_node_key(lower, &lower_key, 0);
 
-	c = alloc_tree_block_no_bg_flush(trans, root, 0, &lower_key, level,
-					 root->node->start, 0,
-					 BTRFS_NESTING_NEW_ROOT);
+	c = btrfs_alloc_tree_block(trans, root, 0, root->root_key.objectid,
+				   &lower_key, level, root->node->start, 0,
+				   BTRFS_NESTING_NEW_ROOT);
 	if (IS_ERR(c))
 		return PTR_ERR(c);
 
@@ -3471,8 +3429,9 @@ static noinline int split_node(struct bt
 	mid = (c_nritems + 1) / 2;
 	btrfs_node_key(c, &disk_key, mid);
 
-	split = alloc_tree_block_no_bg_flush(trans, root, 0, &disk_key, level,
-					     c->start, 0, BTRFS_NESTING_SPLIT);
+	split = btrfs_alloc_tree_block(trans, root, 0, root->root_key.objectid,
+				       &disk_key, level, c->start, 0,
+				       BTRFS_NESTING_SPLIT);
 	if (IS_ERR(split))
 		return PTR_ERR(split);
 
@@ -4263,10 +4222,10 @@ again:
 	 * BTRFS_NESTING_SPLIT_THE_SPLITTENING if we need to, but for now just
 	 * use BTRFS_NESTING_NEW_ROOT.
 	 */
-	right = alloc_tree_block_no_bg_flush(trans, root, 0, &disk_key, 0,
-					     l->start, 0, num_doubles ?
-					     BTRFS_NESTING_NEW_ROOT :
-					     BTRFS_NESTING_SPLIT);
+	right = btrfs_alloc_tree_block(trans, root, 0, root->root_key.objectid,
+				       &disk_key, 0, l->start, 0,
+				       num_doubles ? BTRFS_NESTING_NEW_ROOT :
+				       BTRFS_NESTING_SPLIT);
 	if (IS_ERR(right))
 		return PTR_ERR(right);
 
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -254,8 +254,11 @@ static inline int extwriter_counter_read
 }
 
 /*
- * To be called after all the new block groups attached to the transaction
- * handle have been created (btrfs_create_pending_block_groups()).
+ * To be called after doing the chunk btree updates right after allocating a new
+ * chunk (after btrfs_chunk_alloc_add_chunk_item() is called), when removing a
+ * chunk after all chunk btree updates and after finishing the second phase of
+ * chunk allocation (btrfs_create_pending_block_groups()) in case some block
+ * group had its chunk item insertion delayed to the second phase.
  */
 void btrfs_trans_release_chunk_metadata(struct btrfs_trans_handle *trans)
 {
@@ -264,8 +267,6 @@ void btrfs_trans_release_chunk_metadata(
 	if (!trans->chunk_bytes_reserved)
 		return;
 
-	WARN_ON_ONCE(!list_empty(&trans->new_bgs));
-
 	btrfs_block_rsv_release(fs_info, &fs_info->chunk_block_rsv,
 				trans->chunk_bytes_reserved, NULL);
 	trans->chunk_bytes_reserved = 0;
@@ -697,7 +698,6 @@ again:
 	h->fs_info = root->fs_info;
 
 	h->type = type;
-	h->can_flush_pending_bgs = true;
 	INIT_LIST_HEAD(&h->new_bgs);
 
 	smp_mb();
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -134,7 +134,7 @@ struct btrfs_trans_handle {
 	short aborted;
 	bool adding_csums;
 	bool allocating_chunk;
-	bool can_flush_pending_bgs;
+	bool removing_chunk;
 	bool reloc_reserved;
 	bool in_fsync;
 	struct btrfs_root *root;
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1744,19 +1744,14 @@ again:
 		extent = btrfs_item_ptr(leaf, path->slots[0],
 					struct btrfs_dev_extent);
 	} else {
-		btrfs_handle_fs_error(fs_info, ret, "Slot search failed");
 		goto out;
 	}
 
 	*dev_extent_len = btrfs_dev_extent_length(leaf, extent);
 
 	ret = btrfs_del_item(trans, root, path);
-	if (ret) {
-		btrfs_handle_fs_error(fs_info, ret,
-				      "Failed to remove dev extent item");
-	} else {
+	if (ret == 0)
 		set_bit(BTRFS_TRANS_HAVE_FREE_BGS, &trans->transaction->flags);
-	}
 out:
 	btrfs_free_path(path);
 	return ret;
@@ -2941,7 +2936,7 @@ static int btrfs_del_sys_chunk(struct bt
 	u32 cur;
 	struct btrfs_key key;
 
-	mutex_lock(&fs_info->chunk_mutex);
+	lockdep_assert_held(&fs_info->chunk_mutex);
 	array_size = btrfs_super_sys_array_size(super_copy);
 
 	ptr = super_copy->sys_chunk_array;
@@ -2971,7 +2966,6 @@ static int btrfs_del_sys_chunk(struct bt
 			cur += len;
 		}
 	}
-	mutex_unlock(&fs_info->chunk_mutex);
 	return ret;
 }
 
@@ -3011,6 +3005,29 @@ struct extent_map *btrfs_get_chunk_map(s
 	return em;
 }
 
+static int remove_chunk_item(struct btrfs_trans_handle *trans,
+			     struct map_lookup *map, u64 chunk_offset)
+{
+	int i;
+
+	/*
+	 * Removing chunk items and updating the device items in the chunks btree
+	 * requires holding the chunk_mutex.
+	 * See the comment at btrfs_chunk_alloc() for the details.
+	 */
+	lockdep_assert_held(&trans->fs_info->chunk_mutex);
+
+	for (i = 0; i < map->num_stripes; i++) {
+		int ret;
+
+		ret = btrfs_update_device(trans, map->stripes[i].dev);
+		if (ret)
+			return ret;
+	}
+
+	return btrfs_free_chunk(trans, chunk_offset);
+}
+
 int btrfs_remove_chunk(struct btrfs_trans_handle *trans, u64 chunk_offset)
 {
 	struct btrfs_fs_info *fs_info = trans->fs_info;
@@ -3031,14 +3048,16 @@ int btrfs_remove_chunk(struct btrfs_tran
 		return PTR_ERR(em);
 	}
 	map = em->map_lookup;
-	mutex_lock(&fs_info->chunk_mutex);
-	check_system_chunk(trans, map->type);
-	mutex_unlock(&fs_info->chunk_mutex);
 
 	/*
-	 * Take the device list mutex to prevent races with the final phase of
-	 * a device replace operation that replaces the device object associated
-	 * with map stripes (dev-replace.c:btrfs_dev_replace_finishing()).
+	 * First delete the device extent items from the devices btree.
+	 * We take the device_list_mutex to avoid racing with the finishing phase
+	 * of a device replace operation. See the comment below before acquiring
+	 * fs_info->chunk_mutex. Note that here we do not acquire the chunk_mutex
+	 * because that can result in a deadlock when deleting the device extent
+	 * items from the devices btree - COWing an extent buffer from the btree
+	 * may result in allocating a new metadata chunk, which would attempt to
+	 * lock again fs_info->chunk_mutex.
 	 */
 	mutex_lock(&fs_devices->device_list_mutex);
 	for (i = 0; i < map->num_stripes; i++) {
@@ -3060,18 +3079,73 @@ int btrfs_remove_chunk(struct btrfs_tran
 			btrfs_clear_space_info_full(fs_info);
 			mutex_unlock(&fs_info->chunk_mutex);
 		}
+	}
+	mutex_unlock(&fs_devices->device_list_mutex);
 
-		ret = btrfs_update_device(trans, device);
+	/*
+	 * We acquire fs_info->chunk_mutex for 2 reasons:
+	 *
+	 * 1) Just like with the first phase of the chunk allocation, we must
+	 *    reserve system space, do all chunk btree updates and deletions, and
+	 *    update the system chunk array in the superblock while holding this
+	 *    mutex. This is for similar reasons as explained on the comment at
+	 *    the top of btrfs_chunk_alloc();
+	 *
+	 * 2) Prevent races with the final phase of a device replace operation
+	 *    that replaces the device object associated with the map's stripes,
+	 *    because the device object's id can change at any time during that
+	 *    final phase of the device replace operation
+	 *    (dev-replace.c:btrfs_dev_replace_finishing()), so we could grab the
+	 *    replaced device and then see it with an ID of
+	 *    BTRFS_DEV_REPLACE_DEVID, which would cause a failure when updating
+	 *    the device item, which does not exists on the chunk btree.
+	 *    The finishing phase of device replace acquires both the
+	 *    device_list_mutex and the chunk_mutex, in that order, so we are
+	 *    safe by just acquiring the chunk_mutex.
+	 */
+	trans->removing_chunk = true;
+	mutex_lock(&fs_info->chunk_mutex);
+
+	check_system_chunk(trans, map->type);
+
+	ret = remove_chunk_item(trans, map, chunk_offset);
+	/*
+	 * Normally we should not get -ENOSPC since we reserved space before
+	 * through the call to check_system_chunk().
+	 *
+	 * Despite our system space_info having enough free space, we may not
+	 * be able to allocate extents from its block groups, because all have
+	 * an incompatible profile, which will force us to allocate a new system
+	 * block group with the right profile, or right after we called
+	 * check_system_space() above, a scrub turned the only system block group
+	 * with enough free space into RO mode.
+	 * This is explained with more detail at do_chunk_alloc().
+	 *
+	 * So if we get -ENOSPC, allocate a new system chunk and retry once.
+	 */
+	if (ret == -ENOSPC) {
+		const u64 sys_flags = btrfs_system_alloc_profile(fs_info);
+		struct btrfs_block_group *sys_bg;
+
+		sys_bg = btrfs_alloc_chunk(trans, sys_flags);
+		if (IS_ERR(sys_bg)) {
+			ret = PTR_ERR(sys_bg);
+			btrfs_abort_transaction(trans, ret);
+			goto out;
+		}
+
+		ret = btrfs_chunk_alloc_add_chunk_item(trans, sys_bg);
 		if (ret) {
-			mutex_unlock(&fs_devices->device_list_mutex);
 			btrfs_abort_transaction(trans, ret);
 			goto out;
 		}
-	}
-	mutex_unlock(&fs_devices->device_list_mutex);
 
-	ret = btrfs_free_chunk(trans, chunk_offset);
-	if (ret) {
+		ret = remove_chunk_item(trans, map, chunk_offset);
+		if (ret) {
+			btrfs_abort_transaction(trans, ret);
+			goto out;
+		}
+	} else if (ret) {
 		btrfs_abort_transaction(trans, ret);
 		goto out;
 	}
@@ -3086,6 +3160,15 @@ int btrfs_remove_chunk(struct btrfs_tran
 		}
 	}
 
+	mutex_unlock(&fs_info->chunk_mutex);
+	trans->removing_chunk = false;
+
+	/*
+	 * We are done with chunk btree updates and deletions, so release the
+	 * system space we previously reserved (with check_system_chunk()).
+	 */
+	btrfs_trans_release_chunk_metadata(trans);
+
 	ret = btrfs_remove_block_group(trans, chunk_offset, em);
 	if (ret) {
 		btrfs_abort_transaction(trans, ret);
@@ -3093,6 +3176,10 @@ int btrfs_remove_chunk(struct btrfs_tran
 	}
 
 out:
+	if (trans->removing_chunk) {
+		mutex_unlock(&fs_info->chunk_mutex);
+		trans->removing_chunk = false;
+	}
 	/* once for us */
 	free_extent_map(em);
 	return ret;
@@ -4851,13 +4938,12 @@ static int btrfs_add_system_chunk(struct
 	u32 array_size;
 	u8 *ptr;
 
-	mutex_lock(&fs_info->chunk_mutex);
+	lockdep_assert_held(&fs_info->chunk_mutex);
+
 	array_size = btrfs_super_sys_array_size(super_copy);
 	if (array_size + item_size + sizeof(disk_key)
-			> BTRFS_SYSTEM_CHUNK_ARRAY_SIZE) {
-		mutex_unlock(&fs_info->chunk_mutex);
+			> BTRFS_SYSTEM_CHUNK_ARRAY_SIZE)
 		return -EFBIG;
-	}
 
 	ptr = super_copy->sys_chunk_array + array_size;
 	btrfs_cpu_key_to_disk(&disk_key, key);
@@ -4866,7 +4952,6 @@ static int btrfs_add_system_chunk(struct
 	memcpy(ptr, chunk, item_size);
 	item_size += sizeof(disk_key);
 	btrfs_set_super_sys_array_size(super_copy, array_size + item_size);
-	mutex_unlock(&fs_info->chunk_mutex);
 
 	return 0;
 }
@@ -5216,13 +5301,14 @@ static int decide_stripe_size(struct btr
 	}
 }
 
-static int create_chunk(struct btrfs_trans_handle *trans,
+static struct btrfs_block_group *create_chunk(struct btrfs_trans_handle *trans,
 			struct alloc_chunk_ctl *ctl,
 			struct btrfs_device_info *devices_info)
 {
 	struct btrfs_fs_info *info = trans->fs_info;
 	struct map_lookup *map = NULL;
 	struct extent_map_tree *em_tree;
+	struct btrfs_block_group *block_group;
 	struct extent_map *em;
 	u64 start = ctl->start;
 	u64 type = ctl->type;
@@ -5232,7 +5318,7 @@ static int create_chunk(struct btrfs_tra
 
 	map = kmalloc(map_lookup_size(ctl->num_stripes), GFP_NOFS);
 	if (!map)
-		return -ENOMEM;
+		return ERR_PTR(-ENOMEM);
 	map->num_stripes = ctl->num_stripes;
 
 	for (i = 0; i < ctl->ndevs; ++i) {
@@ -5254,7 +5340,7 @@ static int create_chunk(struct btrfs_tra
 	em = alloc_extent_map();
 	if (!em) {
 		kfree(map);
-		return -ENOMEM;
+		return ERR_PTR(-ENOMEM);
 	}
 	set_bit(EXTENT_FLAG_FS_MAPPING, &em->flags);
 	em->map_lookup = map;
@@ -5270,12 +5356,12 @@ static int create_chunk(struct btrfs_tra
 	if (ret) {
 		write_unlock(&em_tree->lock);
 		free_extent_map(em);
-		return ret;
+		return ERR_PTR(ret);
 	}
 	write_unlock(&em_tree->lock);
 
-	ret = btrfs_make_block_group(trans, 0, type, start, ctl->chunk_size);
-	if (ret)
+	block_group = btrfs_make_block_group(trans, 0, type, start, ctl->chunk_size);
+	if (IS_ERR(block_group))
 		goto error_del_extent;
 
 	for (i = 0; i < map->num_stripes; i++) {
@@ -5295,7 +5381,7 @@ static int create_chunk(struct btrfs_tra
 	check_raid56_incompat_flag(info, type);
 	check_raid1c34_incompat_flag(info, type);
 
-	return 0;
+	return block_group;
 
 error_del_extent:
 	write_lock(&em_tree->lock);
@@ -5307,34 +5393,36 @@ error_del_extent:
 	/* One for the tree reference */
 	free_extent_map(em);
 
-	return ret;
+	return block_group;
 }
 
-int btrfs_alloc_chunk(struct btrfs_trans_handle *trans, u64 type)
+struct btrfs_block_group *btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
+					    u64 type)
 {
 	struct btrfs_fs_info *info = trans->fs_info;
 	struct btrfs_fs_devices *fs_devices = info->fs_devices;
 	struct btrfs_device_info *devices_info = NULL;
 	struct alloc_chunk_ctl ctl;
+	struct btrfs_block_group *block_group;
 	int ret;
 
 	lockdep_assert_held(&info->chunk_mutex);
 
 	if (!alloc_profile_is_valid(type, 0)) {
 		ASSERT(0);
-		return -EINVAL;
+		return ERR_PTR(-EINVAL);
 	}
 
 	if (list_empty(&fs_devices->alloc_list)) {
 		if (btrfs_test_opt(info, ENOSPC_DEBUG))
 			btrfs_debug(info, "%s: no writable device", __func__);
-		return -ENOSPC;
+		return ERR_PTR(-ENOSPC);
 	}
 
 	if (!(type & BTRFS_BLOCK_GROUP_TYPE_MASK)) {
 		btrfs_err(info, "invalid chunk type 0x%llx requested", type);
 		ASSERT(0);
-		return -EINVAL;
+		return ERR_PTR(-EINVAL);
 	}
 
 	ctl.start = find_next_chunk(info);
@@ -5344,46 +5432,43 @@ int btrfs_alloc_chunk(struct btrfs_trans
 	devices_info = kcalloc(fs_devices->rw_devices, sizeof(*devices_info),
 			       GFP_NOFS);
 	if (!devices_info)
-		return -ENOMEM;
+		return ERR_PTR(-ENOMEM);
 
 	ret = gather_device_info(fs_devices, &ctl, devices_info);
-	if (ret < 0)
+	if (ret < 0) {
+		block_group = ERR_PTR(ret);
 		goto out;
+	}
 
 	ret = decide_stripe_size(fs_devices, &ctl, devices_info);
-	if (ret < 0)
+	if (ret < 0) {
+		block_group = ERR_PTR(ret);
 		goto out;
+	}
 
-	ret = create_chunk(trans, &ctl, devices_info);
+	block_group = create_chunk(trans, &ctl, devices_info);
 
 out:
 	kfree(devices_info);
-	return ret;
+	return block_group;
 }
 
 /*
- * Chunk allocation falls into two parts. The first part does work
- * that makes the new allocated chunk usable, but does not do any operation
- * that modifies the chunk tree. The second part does the work that
- * requires modifying the chunk tree. This division is important for the
- * bootstrap process of adding storage to a seed btrfs.
+ * This function, btrfs_finish_chunk_alloc(), belongs to phase 2.
+ *
+ * See the comment at btrfs_chunk_alloc() for details about the chunk allocation
+ * phases.
  */
 int btrfs_finish_chunk_alloc(struct btrfs_trans_handle *trans,
 			     u64 chunk_offset, u64 chunk_size)
 {
 	struct btrfs_fs_info *fs_info = trans->fs_info;
-	struct btrfs_root *extent_root = fs_info->extent_root;
-	struct btrfs_root *chunk_root = fs_info->chunk_root;
-	struct btrfs_key key;
 	struct btrfs_device *device;
-	struct btrfs_chunk *chunk;
-	struct btrfs_stripe *stripe;
 	struct extent_map *em;
 	struct map_lookup *map;
-	size_t item_size;
 	u64 dev_offset;
 	u64 stripe_size;
-	int i = 0;
+	int i;
 	int ret = 0;
 
 	em = btrfs_get_chunk_map(fs_info, chunk_offset, chunk_size);
@@ -5391,53 +5476,117 @@ int btrfs_finish_chunk_alloc(struct btrf
 		return PTR_ERR(em);
 
 	map = em->map_lookup;
-	item_size = btrfs_chunk_item_size(map->num_stripes);
 	stripe_size = em->orig_block_len;
 
-	chunk = kzalloc(item_size, GFP_NOFS);
-	if (!chunk) {
-		ret = -ENOMEM;
-		goto out;
-	}
-
 	/*
 	 * Take the device list mutex to prevent races with the final phase of
 	 * a device replace operation that replaces the device object associated
 	 * with the map's stripes, because the device object's id can change
 	 * at any time during that final phase of the device replace operation
-	 * (dev-replace.c:btrfs_dev_replace_finishing()).
+	 * (dev-replace.c:btrfs_dev_replace_finishing()), so we could grab the
+	 * replaced device and then see it with an ID of BTRFS_DEV_REPLACE_DEVID,
+	 * resulting in persisting a device extent item with such ID.
 	 */
 	mutex_lock(&fs_info->fs_devices->device_list_mutex);
 	for (i = 0; i < map->num_stripes; i++) {
 		device = map->stripes[i].dev;
 		dev_offset = map->stripes[i].physical;
 
-		ret = btrfs_update_device(trans, device);
-		if (ret)
-			break;
 		ret = btrfs_alloc_dev_extent(trans, device, chunk_offset,
 					     dev_offset, stripe_size);
 		if (ret)
 			break;
 	}
-	if (ret) {
-		mutex_unlock(&fs_info->fs_devices->device_list_mutex);
+	mutex_unlock(&fs_info->fs_devices->device_list_mutex);
+
+	free_extent_map(em);
+	return ret;
+}
+
+/*
+ * This function, btrfs_chunk_alloc_add_chunk_item(), typically belongs to the
+ * phase 1 of chunk allocation. It belongs to phase 2 only when allocating system
+ * chunks.
+ *
+ * See the comment at btrfs_chunk_alloc() for details about the chunk allocation
+ * phases.
+ */
+int btrfs_chunk_alloc_add_chunk_item(struct btrfs_trans_handle *trans,
+				     struct btrfs_block_group *bg)
+{
+	struct btrfs_fs_info *fs_info = trans->fs_info;
+	struct btrfs_root *extent_root = fs_info->extent_root;
+	struct btrfs_root *chunk_root = fs_info->chunk_root;
+	struct btrfs_key key;
+	struct btrfs_chunk *chunk;
+	struct btrfs_stripe *stripe;
+	struct extent_map *em;
+	struct map_lookup *map;
+	size_t item_size;
+	int i;
+	int ret;
+
+	/*
+	 * We take the chunk_mutex for 2 reasons:
+	 *
+	 * 1) Updates and insertions in the chunk btree must be done while holding
+	 *    the chunk_mutex, as well as updating the system chunk array in the
+	 *    superblock. See the comment on top of btrfs_chunk_alloc() for the
+	 *    details;
+	 *
+	 * 2) To prevent races with the final phase of a device replace operation
+	 *    that replaces the device object associated with the map's stripes,
+	 *    because the device object's id can change at any time during that
+	 *    final phase of the device replace operation
+	 *    (dev-replace.c:btrfs_dev_replace_finishing()), so we could grab the
+	 *    replaced device and then see it with an ID of BTRFS_DEV_REPLACE_DEVID,
+	 *    which would cause a failure when updating the device item, which does
+	 *    not exists, or persisting a stripe of the chunk item with such ID.
+	 *    Here we can't use the device_list_mutex because our caller already
+	 *    has locked the chunk_mutex, and the final phase of device replace
+	 *    acquires both mutexes - first the device_list_mutex and then the
+	 *    chunk_mutex. Using any of those two mutexes protects us from a
+	 *    concurrent device replace.
+	 */
+	lockdep_assert_held(&fs_info->chunk_mutex);
+
+	em = btrfs_get_chunk_map(fs_info, bg->start, bg->length);
+	if (IS_ERR(em)) {
+		ret = PTR_ERR(em);
+		btrfs_abort_transaction(trans, ret);
+		return ret;
+	}
+
+	map = em->map_lookup;
+	item_size = btrfs_chunk_item_size(map->num_stripes);
+
+	chunk = kzalloc(item_size, GFP_NOFS);
+	if (!chunk) {
+		ret = -ENOMEM;
+		btrfs_abort_transaction(trans, ret);
 		goto out;
 	}
 
+	for (i = 0; i < map->num_stripes; i++) {
+		struct btrfs_device *device = map->stripes[i].dev;
+
+		ret = btrfs_update_device(trans, device);
+		if (ret)
+			goto out;
+	}
+
 	stripe = &chunk->stripe;
 	for (i = 0; i < map->num_stripes; i++) {
-		device = map->stripes[i].dev;
-		dev_offset = map->stripes[i].physical;
+		struct btrfs_device *device = map->stripes[i].dev;
+		const u64 dev_offset = map->stripes[i].physical;
 
 		btrfs_set_stack_stripe_devid(stripe, device->devid);
 		btrfs_set_stack_stripe_offset(stripe, dev_offset);
 		memcpy(stripe->dev_uuid, device->uuid, BTRFS_UUID_SIZE);
 		stripe++;
 	}
-	mutex_unlock(&fs_info->fs_devices->device_list_mutex);
 
-	btrfs_set_stack_chunk_length(chunk, chunk_size);
+	btrfs_set_stack_chunk_length(chunk, bg->length);
 	btrfs_set_stack_chunk_owner(chunk, extent_root->root_key.objectid);
 	btrfs_set_stack_chunk_stripe_len(chunk, map->stripe_len);
 	btrfs_set_stack_chunk_type(chunk, map->type);
@@ -5449,15 +5598,18 @@ int btrfs_finish_chunk_alloc(struct btrf
 
 	key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID;
 	key.type = BTRFS_CHUNK_ITEM_KEY;
-	key.offset = chunk_offset;
+	key.offset = bg->start;
 
 	ret = btrfs_insert_item(trans, chunk_root, &key, chunk, item_size);
-	if (ret == 0 && map->type & BTRFS_BLOCK_GROUP_SYSTEM) {
-		/*
-		 * TODO: Cleanup of inserted chunk root in case of
-		 * failure.
-		 */
+	if (ret)
+		goto out;
+
+	bg->chunk_item_inserted = 1;
+
+	if (map->type & BTRFS_BLOCK_GROUP_SYSTEM) {
 		ret = btrfs_add_system_chunk(fs_info, &key, chunk, item_size);
+		if (ret)
+			goto out;
 	}
 
 out:
@@ -5470,16 +5622,41 @@ static noinline int init_first_rw_device
 {
 	struct btrfs_fs_info *fs_info = trans->fs_info;
 	u64 alloc_profile;
-	int ret;
+	struct btrfs_block_group *meta_bg;
+	struct btrfs_block_group *sys_bg;
+
+	/*
+	 * When adding a new device for sprouting, the seed device is read-only
+	 * so we must first allocate a metadata and a system chunk. But before
+	 * adding the block group items to the extent, device and chunk btrees,
+	 * we must first:
+	 *
+	 * 1) Create both chunks without doing any changes to the btrees, as
+	 *    otherwise we would get -ENOSPC since the block groups from the
+	 *    seed device are read-only;
+	 *
+	 * 2) Add the device item for the new sprout device - finishing the setup
+	 *    of a new block group requires updating the device item in the chunk
+	 *    btree, so it must exist when we attempt to do it. The previous step
+	 *    ensures this does not fail with -ENOSPC.
+	 *
+	 * After that we can add the block group items to their btrees:
+	 * update existing device item in the chunk btree, add a new block group
+	 * item to the extent btree, add a new chunk item to the chunk btree and
+	 * finally add the new device extent items to the devices btree.
+	 */
 
 	alloc_profile = btrfs_metadata_alloc_profile(fs_info);
-	ret = btrfs_alloc_chunk(trans, alloc_profile);
-	if (ret)
-		return ret;
+	meta_bg = btrfs_alloc_chunk(trans, alloc_profile);
+	if (IS_ERR(meta_bg))
+		return PTR_ERR(meta_bg);
 
 	alloc_profile = btrfs_system_alloc_profile(fs_info);
-	ret = btrfs_alloc_chunk(trans, alloc_profile);
-	return ret;
+	sys_bg = btrfs_alloc_chunk(trans, alloc_profile);
+	if (IS_ERR(sys_bg))
+		return PTR_ERR(sys_bg);
+
+	return 0;
 }
 
 static inline int btrfs_chunk_max_errors(struct map_lookup *map)
@@ -7359,10 +7536,18 @@ int btrfs_read_chunk_tree(struct btrfs_f
 			total_dev++;
 		} else if (found_key.type == BTRFS_CHUNK_ITEM_KEY) {
 			struct btrfs_chunk *chunk;
+
+			/*
+			 * We are only called at mount time, so no need to take
+			 * fs_info->chunk_mutex. Plus, to avoid lockdep warnings,
+			 * we always lock first fs_info->chunk_mutex before
+			 * acquiring any locks on the chunk tree. This is a
+			 * requirement for chunk allocation, see the comment on
+			 * top of btrfs_chunk_alloc() for details.
+			 */
+			ASSERT(!test_bit(BTRFS_FS_OPEN, &fs_info->flags));
 			chunk = btrfs_item_ptr(leaf, slot, struct btrfs_chunk);
-			mutex_lock(&fs_info->chunk_mutex);
 			ret = read_one_chunk(&found_key, leaf, chunk);
-			mutex_unlock(&fs_info->chunk_mutex);
 			if (ret)
 				goto error;
 		}
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -447,7 +447,8 @@ int btrfs_get_io_geometry(struct btrfs_f
 			  struct btrfs_io_geometry *io_geom);
 int btrfs_read_sys_array(struct btrfs_fs_info *fs_info);
 int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info);
-int btrfs_alloc_chunk(struct btrfs_trans_handle *trans, u64 type);
+struct btrfs_block_group *btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
+					    u64 type);
 void btrfs_mapping_tree_free(struct extent_map_tree *tree);
 blk_status_t btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
 			   int mirror_num);
@@ -505,6 +506,8 @@ unsigned long btrfs_full_stripe_len(stru
 				    u64 logical);
 int btrfs_finish_chunk_alloc(struct btrfs_trans_handle *trans,
 			     u64 chunk_offset, u64 chunk_size);
+int btrfs_chunk_alloc_add_chunk_item(struct btrfs_trans_handle *trans,
+				     struct btrfs_block_group *bg);
 int btrfs_remove_chunk(struct btrfs_trans_handle *trans, u64 chunk_offset);
 struct extent_map *btrfs_get_chunk_map(struct btrfs_fs_info *fs_info,
 				       u64 logical, u64 length);



  parent reply	other threads:[~2021-07-19 16:23 UTC|newest]

Thread overview: 294+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 14:51 [PATCH 5.12 000/292] 5.12.19-rc1 review Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 001/292] cifs: use the expiry output of dns_query to schedule next resolution Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 002/292] cifs: handle reconnect of tcon when there is no cached dfs referral Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 003/292] cifs: Do not use the original cruid when following DFS links for multiuser mounts Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 004/292] KVM: mmio: Fix use-after-free Read in kvm_vm_ioctl_unregister_coalesced_mmio Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 005/292] KVM: x86: Use guest MAXPHYADDR from CPUID.0x8000_0008 iff TDP is enabled Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 006/292] KVM: x86/mmu: Do not apply HPA (memory encryption) mask to GPAs Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 007/292] KVM: nSVM: Check the value written to MSR_VM_HSAVE_PA Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 008/292] KVM: X86: Disable hardware breakpoints unconditionally before kvm_x86->run() Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 009/292] scsi: core: Fix bad pointer dereference when ehandler kthread is invalid Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 010/292] scsi: zfcp: Report port fc_security as unknown early during remote cable pull Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 011/292] iommu/vt-d: Global devTLB flush when present context entry changed Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 012/292] iommu/vt-d: Fix clearing real DMA devices scalable-mode context entries Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 013/292] tracing: Do not reference char * as a string in histograms Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 014/292] drm/amdgpu: add another Renoir DID Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 015/292] drm/i915/gtt: drop the page table optimisation Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 016/292] drm/i915/gt: Fix -EDEADLK handling regression Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 017/292] cgroup: verify that source is a string Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 018/292] fbmem: Do not delete the mode that is still in use Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 019/292] EDAC/igen6: fix core dependency AGAIN Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 020/292] mm/hugetlb: fix refs calculation from unaligned @vaddr Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 021/292] arm64: Avoid premature usercopy failure Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 022/292] io_uring: use right task for exiting checks Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 023/292] btrfs: properly split extent_map for REQ_OP_ZONE_APPEND Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 024/292] btrfs: fix deadlock with concurrent chunk allocations involving system chunks Greg Kroah-Hartman
2021-07-19 14:51 ` Greg Kroah-Hartman [this message]
2021-07-19 14:51 ` [PATCH 5.12 026/292] btrfs: zoned: fix wrong mutex unlock on failure to allocate log root tree Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 027/292] drm/dp_mst: Do not set proposed vcpi directly Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 028/292] drm/dp_mst: Avoid to mess up payload table by ports in stale topology Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 029/292] drm/dp_mst: Add missing drm parameters to recently added call to drm_dbg_kms() Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 030/292] io_uring: put link timeout req consistently Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 031/292] io_uring: fix link timeout refs Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 032/292] net: bridge: multicast: fix PIM hello router port marking race Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 033/292] net: bridge: multicast: fix MRD advertisement " Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 034/292] leds: tlc591xx: fix return value check in tlc591xx_probe() Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 035/292] ASoC: Intel: sof_sdw: add mutual exclusion between PCH DMIC and RT715 Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 036/292] dmaengine: fsl-qdma: check dma_set_mask return value Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 037/292] scsi: arcmsr: Fix the wrong CDB payload report to IOP Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 038/292] srcu: Fix broken node geometry after early ssp init Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 039/292] rcu: Reject RCU_LOCKDEP_WARN() false positives Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 040/292] usb: dwc3: pci: Fix DEFINE for Intel Elkhart Lake Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 041/292] tty: serial: fsl_lpuart: fix the potential risk of division or modulo by zero Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 042/292] serial: fsl_lpuart: disable DMA for console and fix sysrq Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 043/292] misc/libmasm/module: Fix two use after free in ibmasm_init_one Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 044/292] misc: alcor_pci: fix null-ptr-deref when there is no PCI bridge Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 045/292] ASoC: intel/boards: add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 046/292] partitions: msdos: fix one-byte get_unaligned() Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 047/292] iio: imu: st_lsm6dsx: correct ODR in header Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 048/292] iio: gyro: fxa21002c: Balance runtime pm + use pm_runtime_resume_and_get() Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 049/292] iio: magn: bmc150: " Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 050/292] ALSA: usx2y: Avoid camelCase Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 051/292] ALSA: usx2y: Dont call free_pages_exact() with NULL address Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 052/292] Revert "ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro" Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 053/292] usb: common: usb-conn-gpio: fix NULL pointer dereference of charger Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 054/292] w1: ds2438: fixing bug that would always get page0 Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 055/292] ASoC: Intel: sof_sdw: add quirk support for Brya and BT-offload Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 056/292] scsi: arcmsr: Fix doorbell status being updated late on ARC-1886 Greg Kroah-Hartman
2021-07-19 14:51 ` [PATCH 5.12 057/292] scsi: hisi_sas: Propagate errors in interrupt_init_v1_hw() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 058/292] scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 059/292] scsi: lpfc: Fix crash when lpfc_sli4_hba_setup() fails to initialize the SGLs Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 060/292] scsi: core: Cap scsi_host cmd_per_lun at can_queue Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 061/292] ALSA: ac97: fix PM reference leak in ac97_bus_remove() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 062/292] tty: serial: 8250: serial_cs: Fix a memory leak in error handling path Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 063/292] scsi: mpt3sas: Fix deadlock while cancelling the running firmware event Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 064/292] scsi: core: Fixup calling convention for scsi_mode_sense() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 065/292] scsi: scsi_dh_alua: Check for negative result value Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 066/292] fs/jfs: Fix missing error code in lmLogInit() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 067/292] scsi: megaraid_sas: Fix resource leak in case of probe failure Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 068/292] scsi: megaraid_sas: Early detection of VD deletion through RaidMap update Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 069/292] scsi: megaraid_sas: Handle missing interrupts while re-enabling IRQs Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 070/292] scsi: iscsi: Add iscsi_cls_conn refcount helpers Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 071/292] scsi: iscsi: Fix conn use after free during resets Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 072/292] scsi: iscsi: Fix shost->max_id use Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 073/292] scsi: qedi: Fix null ref during abort handling Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 074/292] scsi: qedi: Fix race during abort timeouts Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 075/292] scsi: qedi: Fix TMF session block/unblock use Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 076/292] scsi: qedi: Fix cleanup " Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 077/292] mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 078/292] mfd: cpcap: Fix cpcap dmamask not set warnings Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 079/292] ASoC: img: Fix PM reference leak in img_i2s_in_probe() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 080/292] fsi: Add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 081/292] serial: tty: uartlite: fix console setup Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 082/292] s390/sclp_vt220: fix console name to match device Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 083/292] s390: disable SSP when needed Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 084/292] selftests: timers: rtcpie: skip test if default RTC device does not exist Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 085/292] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 086/292] ALSA: sb: Fix potential double-free of CSP mixer elements Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 087/292] powerpc/ps3: Add dma_mask to ps3_dma_region Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 088/292] iommu/arm-smmu: Fix arm_smmu_device refcount leak when arm_smmu_rpm_get fails Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 089/292] iommu/arm-smmu: Fix arm_smmu_device refcount leak in address translation Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 090/292] ALSA: n64: check return value after calling platform_get_resource() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 091/292] ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 092/292] gpio: zynq: Check return value of pm_runtime_get_sync Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 093/292] gpio: zynq: Check return value of irq_get_irq_data Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 094/292] scsi: storvsc: Correctly handle multiple flags in srb_status Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 095/292] ALSA: ppc: fix error return code in snd_pmac_probe() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 096/292] selftests/powerpc: Fix "no_handler" EBB selftest Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 097/292] gpio: pca953x: Add support for the On Semi pca9655 Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 098/292] powerpc/mm/book3s64: Fix possible build error Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 099/292] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 100/292] xhci: handle failed buffer copy to URB sg list and fix a W=1 copiler warning Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 101/292] habanalabs/gaudi: set the correct cpu_id on MME2_QM failure Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 102/292] habanalabs: fix mask to obtain page offset Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 103/292] habanalabs: set rc as valid in case of intentional func exit Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 104/292] habanalabs: remove node from list before freeing the node Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 105/292] habanalabs/gaudi: set the correct rc in case of err Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 106/292] s390/processor: always inline stap() and __load_psw_mask() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 107/292] s390/ipl_parm: fix program check new psw handling Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 108/292] s390/mem_detect: fix diag260() " Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 109/292] s390/mem_detect: fix tprot() " Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 110/292] Input: hideep - fix the uninitialized use in hideep_nvm_unlock() Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 111/292] ALSA: bebob: add support for ToneWeal FW66 Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 112/292] m68knommu: fix missing LCD splash screen data initializer Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 113/292] ALSA: usb-audio: scarlett2: Fix 18i8 Gen 2 PCM Input count Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 114/292] ALSA: usb-audio: scarlett2: Fix data_mutex lock Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 115/292] ALSA: usb-audio: scarlett2: Fix scarlett2_*_ctl_put() return values Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 116/292] usb: gadget: f_hid: fix endianness issue with descriptors Greg Kroah-Hartman
2021-07-19 14:52 ` [PATCH 5.12 117/292] usb: gadget: hid: fix error return code in hid_bind() Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 118/292] powerpc/boot: Fixup device-tree on little endian Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 119/292] ASoC: fsl_xcvr: check return value after calling platform_get_resource_byname() Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 120/292] ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20 characters Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 121/292] backlight: lm3630a: Fix return code of .update_status() callback Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 122/292] ALSA: hda: Add IRQ check for platform_get_irq() Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 123/292] ALSA: usb-audio: scarlett2: Fix 6i6 Gen 2 line out descriptions Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 124/292] ALSA: firewire-motu: fix detection for S/PDIF source on optical interface in v2 protocol Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 125/292] leds: turris-omnia: add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 126/292] staging: rtl8723bs: fix macro value for 2.4Ghz only device Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 127/292] intel_th: Wait until port is in reset before programming it Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 128/292] i2c: core: Disable client irq on reboot/shutdown Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 129/292] phy: intel: Fix for warnings due to EMMC clock 175Mhz change in FIP Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 130/292] lib/decompress_unlz4.c: correctly handle zero-padding around initrds Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 131/292] kcov: add __no_sanitize_coverage to fix noinstr for all architectures Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 132/292] power: supply: sc27xx: Add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 133/292] power: supply: sc2731_charger: " Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 134/292] pwm: spear: Dont modify HW state in .remove callback Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 135/292] PCI: ftpci100: Rename macro name collision Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 136/292] power: supply: ab8500: Avoid NULL pointers Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 137/292] PCI: hv: Fix a race condition when removing the device Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 138/292] power: supply: max17042: Do not enforce (incorrect) interrupt trigger type Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 139/292] power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 140/292] ARM: 9087/1: kprobes: test-thumb: fix for LLVM_IAS=1 Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 141/292] PCI/P2PDMA: Avoid pci_get_slot(), which may sleep Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 142/292] NFSv4: Fix delegation return in cases where we have to retry Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 143/292] PCI: pciehp: Ignore Link Down/Up caused by DPC Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 144/292] PCI: Dynamically map ECAM regions Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 145/292] watchdog: Fix possible use-after-free in wdt_startup() Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 146/292] watchdog: sc520_wdt: Fix possible use-after-free in wdt_turnoff() Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 147/292] watchdog: Fix possible use-after-free by calling del_timer_sync() Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 148/292] watchdog: imx_sc_wdt: fix pretimeout Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 149/292] watchdog: iTCO_wdt: Account for rebooting on second timeout Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 150/292] x86/fpu: Return proper error codes from user access functions Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 151/292] remoteproc: core: Fix cdev remove and rproc del Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 152/292] PCI: tegra: Add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 153/292] orangefs: fix orangefs df output Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 154/292] ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 155/292] drm/gma500: Add the missed drm_gem_object_put() in psb_user_framebuffer_create() Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 156/292] NFS: nfs_find_open_context() may only select open files Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 157/292] power: reset: regulator-poweroff: add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 158/292] power: supply: charger-manager: " Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 159/292] power: supply: ab8500: " Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 160/292] power: supply: axp288_fuel_gauge: Make "T3 MRD" no_battery_list DMI entry more generic Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 161/292] drm/amdgpu: fix Navi1x tcp power gating hang when issuing lightweight invalidaiton Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 162/292] drm/amdkfd: fix sysfs kobj leak Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 163/292] pwm: img: Fix PM reference leak in img_pwm_enable() Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 164/292] pwm: tegra: Dont modify HW state in .remove callback Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 165/292] ACPI: AMBA: Fix resource name in /proc/iomem Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 166/292] ACPI: video: Add quirk for the Dell Vostro 3350 Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 167/292] PCI: rockchip: Register IRQ handlers after device and data are ready Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 168/292] ext4: fix WARN_ON_ONCE(!buffer_uptodate) after an error writing the superblock Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 169/292] virtio-blk: Fix memory leak among suspend/resume procedure Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 170/292] virtio_net: Fix error handling in virtnet_restore() Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 171/292] virtio_console: Assure used length from device is limited Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 172/292] block: fix the problem of io_ticks becoming smaller Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 173/292] f2fs: atgc: fix to set default age threshold Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 174/292] NFSD: Fix TP_printk() format specifier in nfsd_clid_class Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 175/292] x86/signal: Detect and prevent an alternate signal stack overflow Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 176/292] module: correctly exit module_kallsyms_on_each_symbol when fn() != 0 Greg Kroah-Hartman
2021-07-19 14:53 ` [PATCH 5.12 177/292] f2fs: add MODULE_SOFTDEP to ensure crc32 is included in the initramfs Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 178/292] f2fs: compress: fix to disallow temp extension Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 179/292] remoteproc: k3-r5: Fix an error message Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 180/292] PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 181/292] power: supply: rt5033_battery: Fix device tree enumeration Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 182/292] NFSv4: Initialise connection to the server in nfs4_alloc_client() Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 183/292] NFSv4: Fix an Oops in pnfs_mark_request_commit() when doing O_DIRECT Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 184/292] sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base() Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 185/292] um: Fix stack pointer alignment Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 186/292] um: fix error return code in slip_open() Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 187/292] um: fix error return code in winch_tramp() Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 188/292] ubifs: journal: Fix error return code in ubifs_jnl_write_inode() Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 189/292] watchdog: keembay: Update WDT pre-timeout during the initialization Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 190/292] watchdog: keembay: Upadate WDT pretimeout for every update in timeout Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 191/292] watchdog: keembay: Update pretimeout to zero in the TH ISR Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 192/292] watchdog: keembay: Clear either the TO or TH interrupt bit Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 193/292] watchdog: keembay: Remove timeout update in the WDT start function Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 194/292] watchdog: keembay: Removed timeout update in the TO ISR Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 195/292] watchdog: aspeed: fix hardware timeout calculation Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 196/292] watchdog: jz4740: Fix return value check in jz4740_wdt_probe() Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 197/292] SUNRPC: prevent port reuse on transports which dont request it Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 198/292] nfs: fix acl memory leak of posix_acl_create() Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 199/292] ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 200/292] PCI: iproc: Fix multi-MSI base vector number allocation Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 201/292] PCI: iproc: Support multi-MSI only on uniprocessor kernel Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 202/292] f2fs: fix to avoid adding tab before doc section Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 203/292] x86/fpu: Fix copy_xstate_to_kernel() gap handling Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 204/292] x86/fpu: Limit xstate copy size in xstateregs_set() Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 205/292] PCI: intel-gw: Fix INTx enable Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 206/292] pwm: imx1: Dont disable clocks at device remove time Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 207/292] PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 208/292] vdpa/mlx5: Fix umem sizes assignments on VQ create Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 209/292] vdpa/mlx5: Fix possible failure in umem size calculation Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 210/292] vdp/mlx5: Fix setting the correct dma_device Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 211/292] virtio_net: move tx vq operation under tx queue lock Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 212/292] nvme-tcp: cant set sk_user_data without write_lock Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 213/292] powerpc/bpf: Fix detecting BPF atomic instructions Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 214/292] nfsd: Reduce contention for the nfsd_file nf_rwsem Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 215/292] ALSA: isa: Fix error return code in snd_cmi8330_probe() Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 216/292] vdpa/mlx5: Clear vq ready indication upon device reset Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 217/292] virtio-mem: dont read big block size in Sub Block Mode Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 218/292] NFS: Fix fscache read from NFS after cache error Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 219/292] NFSv4/pnfs: Fix the layout barrier update Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 220/292] NFSv4/pnfs: Fix layoutget behaviour after invalidation Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 221/292] NFSv4/pNFS: Dont call _nfs4_pnfs_v3_ds_connect multiple times Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 222/292] hexagon: handle {,SOFT}IRQENTRY_TEXT in linker script Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 223/292] hexagon: use common DISCARDS macro Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 224/292] ARM: dts: gemini-rut1xx: remove duplicate ethernet node Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 225/292] arm64: dts: rockchip: Drop fephy pinctrl from gmac2phy on rk3328 rock-pi-e Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 226/292] reset: RESET_BRCMSTB_RESCAL should depend on ARCH_BRCMSTB Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 227/292] reset: RESET_INTEL_GW should depend on X86 Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 228/292] reset: a10sr: add missing of_match_table reference Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 229/292] ARM: exynos: add missing of_node_put for loop iteration Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 230/292] ARM: dts: exynos: fix PWM LED max brightness on Odroid XU/XU3 Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 231/292] ARM: dts: exynos: fix PWM LED max brightness on Odroid HC1 Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 232/292] ARM: dts: exynos: fix PWM LED max brightness on Odroid XU4 Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 233/292] memory: stm32-fmc2-ebi: add missing of_node_put for loop iteration Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 234/292] memory: atmel-ebi: " Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 235/292] reset: brcmstb: Add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 236/292] memory: pl353: Fix error return code in pl353_smc_probe() Greg Kroah-Hartman
2021-07-19 14:54 ` [PATCH 5.12 237/292] ARM: dts: sun8i: h3: orangepi-plus: Fix ethernet phy-mode Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 238/292] rtc: fix snprintf() checking in is_rtc_hctosys() Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 239/292] arm64: dts: renesas: v3msk: Fix memory size Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 240/292] ARM: dts: r8a7779, marzen: Fix DU clock names Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 241/292] arm64: dts: qcom: sdm845-oneplus-common: guard rmtfs-mem Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 242/292] arm64: dts: ti: j7200-main: Enable USB2 PHY RX sensitivity workaround Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 243/292] arm64: dts: renesas: Add missing opp-suspend properties Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 244/292] arm64: dts: renesas: r8a7796[01]: Fix OPP table entry voltages Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 245/292] ARM: dts: stm32: Rework LAN8710Ai PHY reset on DHCOM SoM Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 246/292] arm64: dts: qcom: msm8994-angler: Fix gpio-reserved-ranges 85-88 Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 247/292] arm64: dts: qcom: trogdor: Add no-hpd to DSI bridge node Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 248/292] arm64: dts: qcom: c630: " Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 249/292] firmware: tegra: Fix error return code in tegra210_bpmp_init() Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 250/292] soc: mtk-pm-domains: do not register smi node as syscon Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 251/292] soc: mtk-pm-domains: Fix the clock prepared issue Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 252/292] firmware: arm_scmi: Reset Rx buffer to max size during async commands Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 253/292] dt-bindings: i2c: at91: fix example for scl-gpios Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 254/292] ARM: dts: BCM5301X: Fixup SPI binding Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 255/292] reset: bail if try_module_get() fails Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 256/292] arm64: dts: renesas: r8a779a0: Drop power-domains property from GIC node Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 257/292] Revert "ARM: dts: bcm283x: increase dwc2s RX FIFO size" Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 258/292] arm64: dts: ti: k3-j721e-main: Fix external refclk input to SERDES Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 259/292] arm64: dts: ti: k3-j721e-common-proc-board: Use external clock for SERDES Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 260/292] arm64: dts: ti: k3-j721e-common-proc-board: Re-name "link" name as "phy" Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 261/292] memory: fsl_ifc: fix leak of IO mapping on probe failure Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 262/292] memory: fsl_ifc: fix leak of private memory " Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 263/292] arm64: dts: allwinner: a64-sopine-baseboard: change RGMII mode to TXID Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 264/292] ARM: dts: dra7: Fix duplicate USB4 target module node Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 265/292] ARM: dts: am335x: align ti,pindir-d0-out-d1-in property with dt-shema Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 266/292] ARM: dts: am437x: " Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 267/292] thermal/drivers/sprd: Add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 268/292] ARM: dts: imx6q-dhcom: Fix ethernet reset time properties Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 269/292] ARM: dts: imx6q-dhcom: Fix ethernet plugin detection problems Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 270/292] ARM: dts: imx6q-dhcom: Add gpios pinctrl for i2c bus recovery Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 271/292] thermal/drivers/rcar_gen3_thermal: Fix coefficient calculations Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 272/292] firmware: turris-mox-rwtm: fix reply status decoding function Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 273/292] firmware: turris-mox-rwtm: report failures better Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 274/292] firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 275/292] firmware: turris-mox-rwtm: show message about HWRNG registration Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 276/292] arm64: dts: rockchip: Re-add regulator-boot-on, regulator-always-on for vdd_gpu on rk3399-roc-pc Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 277/292] arm64: dts: rockchip: Re-add regulator-always-on for vcc_sdio for rk3399-roc-pc Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 278/292] scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe() Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 279/292] sched/uclamp: Ignore max aggregation if rq is idle Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 280/292] jump_label: Fix jump_label_text_reserved() vs __init Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 281/292] static_call: Fix static_call_text_reserved() " Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 282/292] kprobe/static_call: Restore missing static_call_text_reserved() Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 283/292] mips: always link byteswap helpers into decompressor Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 284/292] mips: disable branch profiling in boot/decompress.o Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 285/292] perf report: Fix --task and --stat with pipe input Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 286/292] perf script python: Fix buffer size to report iregs in perf script Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 287/292] s390/irq: remove HAVE_IRQ_EXIT_ON_IRQ_STACK Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 288/292] MIPS: vdso: Invalid GIC access through VDSO Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 289/292] cpufreq: CPPC: Fix potential memleak in cppc_cpufreq_cpu_init Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 290/292] certs: add x509_revocation_list to gitignore Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 291/292] scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg() Greg Kroah-Hartman
2021-07-19 14:55 ` [PATCH 5.12 292/292] misc: alcor_pci: fix inverted branch condition Greg Kroah-Hartman
2021-07-19 17:28 ` [PATCH 5.12 000/292] 5.12.19-rc1 review Naresh Kamboju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210719144943.357382074@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=dsterba@suse.com \
    --cc=fdmanana@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naohiro.aota@wdc.com \
    --cc=shinichiro.kawasaki@wdc.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).