Skip to contentSkip to conversation

Btrfs stable updates for 4.0

PATCH New David Sterba 4 participants 7 messages Jun 11, 2015 – Jun 25, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

please queue the following patches to 4.0 stable. There are fixes for user visible bugs and one usability regression with RAID1 -> single conversion during balance.

One of the patches does not apply cleanly to 4.0.5, there's a minor conflict in patch context (153c35b6cccc0c72de9fae06c8e2c8b2c47d79d4, the last one). A reply to this mail is the adapted version or you can pull/cherry-pick from

git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-stable-4.0

Subjects:
Btrfs: send, add missing check for dead clone root
Btrfs: send, don't leave without decrementing clone root's send_progress
btrfs: incorrect handling for fiemap_fill_next_extent return
btrfs: cleanup orphans while looking up default subvolume
Btrfs: fix range cloning when same inode used as source and destination
Btrfs: fix uninit variable in clone ioctl
Btrfs: fix regression in raid level conversion
Commits:

	5cc2b17e80cf5770f2e585c2d90fd8af1b901258 # 3.14+
	2f1f465ae6da244099af55c066e5355abd8ff620 # 3.14+
	26e726afe01c1c82072cf23a5ed89ce25f39d9f2 # 3.10+
	727b9784b6085c99c2f836bf4fcc2848dc9cf904 # 3.14+
	df858e76723ace61342b118aa4302bd09de4e386 # 4.0+
	de249e66a73d696666281cd812087979c6fae552 # 4.0+
	153c35b6cccc0c72de9fae06c8e2c8b2c47d79d4 # 4.0+

Thanks.

#1 lore raw

PATCH 7/7 Btrfs: fix regression in raid level conversion

From: Chris Mason <[email protected]>

Commit 2f0810880f082fa8ba66ab2c33b02e4ff9770a5e changed btrfs_set_block_group_ro to avoid trying to allocate new chunks with the new raid profile during conversion. This fixed failures when there was no space on the drive to allocate a new chunk, but the metadata reserves were sufficient to continue the conversion.

But this ended up causing a regression when the drive had plenty of space to allocate new chunks, mostly because reduce_alloc_profile isn't using the new raid profile.

Fixing btrfs_reduce_alloc_profile is a bigger patch. For now, do a partial revert of 2f0810880, and don't error out if we hit ENOSPC.

[adapted for stable kernel branch, v4.0.5]
---
 fs/btrfs/extent-tree.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
fs/btrfs/extent-tree.c +18 -0
index 8b33da6ec3dd..63be2a96ed6a 100644
@@ -8535,6 +8535,24 @@ int btrfs_set_block_group_ro(struct btrfs_root *root,
 	trans = btrfs_join_transaction(root);
 	if (IS_ERR(trans))
 		return PTR_ERR(trans);
+	/*
+	 * if we are changing raid levels, try to allocate a corresponding
+	 * block group with the new raid level.
+	 */
+	alloc_flags = update_block_group_flags(root, cache->flags);
+	if (alloc_flags != cache->flags) {
+		ret = do_chunk_alloc(trans, root, alloc_flags,
+				     CHUNK_ALLOC_FORCE);
+		/*
+		 * ENOSPC is allowed here, we may have enough space
+		 * already allocated at the new raid level to
+		 * carry on
+		 */
+		if (ret == -ENOSPC)
+			ret = 0;
+		if (ret < 0)
+			goto out;
+	}
 
 	ret = set_block_group_ro(cache, 0);
 	if (!ret)
Signature · 1 line
2.1.3
#2 lore raw
In reply to David Sterba
Quoted 21 lines · David Sterba

Hi,

please queue the following patches to 4.0 stable. There are fixes for user visible bugs and one usability regression with RAID1 -> single conversion during balance.

One of the patches does not apply cleanly to 4.0.5, there's a minor conflict in patch context (153c35b6cccc0c72de9fae06c8e2c8b2c47d79d4, the last one). A reply to this mail is the adapted version or you can pull/cherry-pick from

git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-stable-4.0

Subjects:
Btrfs: send, add missing check for dead clone root
Btrfs: send, don't leave without decrementing clone root's send_progress
btrfs: incorrect handling for fiemap_fill_next_extent return
btrfs: cleanup orphans while looking up default subvolume
Btrfs: fix range cloning when same inode used as source and destination
Btrfs: fix uninit variable in clone ioctl
Btrfs: fix regression in raid level conversion
Commits:

Quoted 4 lines
	5cc2b17e80cf5770f2e585c2d90fd8af1b901258 # 3.14+
	2f1f465ae6da244099af55c066e5355abd8ff620 # 3.14+
	26e726afe01c1c82072cf23a5ed89ce25f39d9f2 # 3.10+
	727b9784b6085c99c2f836bf4fcc2848dc9cf904 # 3.14+

Thanks, I'm applying the above commits to 3.16 kernel as well.

Cheers,
--
Luís

Quoted 9 lines
	df858e76723ace61342b118aa4302bd09de4e386 # 4.0+
	de249e66a73d696666281cd812087979c6fae552 # 4.0+
	153c35b6cccc0c72de9fae06c8e2c8b2c47d79d4 # 4.0+

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#3 lore raw
In reply to David Sterba
Quoted 21 lines · David Sterba

Hi,

please queue the following patches to 4.0 stable. There are fixes for user visible bugs and one usability regression with RAID1 -> single conversion during balance.

One of the patches does not apply cleanly to 4.0.5, there's a minor conflict in patch context (153c35b6cccc0c72de9fae06c8e2c8b2c47d79d4, the last one). A reply to this mail is the adapted version or you can pull/cherry-pick from

git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-stable-4.0

Subjects:
Btrfs: send, add missing check for dead clone root
Btrfs: send, don't leave without decrementing clone root's send_progress
btrfs: incorrect handling for fiemap_fill_next_extent return
btrfs: cleanup orphans while looking up default subvolume
Btrfs: fix range cloning when same inode used as source and destination
Btrfs: fix uninit variable in clone ioctl
Btrfs: fix regression in raid level conversion
Commits:

Quoted 1 line
	5cc2b17e80cf5770f2e585c2d90fd8af1b901258 # 3.14+

Does not build on 3.14+, sorry. Please provide a backported version if you want to see it there.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in

#4 lore raw
Quoted 4 lines · Greg KH
Quoted 1 line
	5cc2b17e80cf5770f2e585c2d90fd8af1b901258 # 3.14+

Does not build on 3.14+, sorry. Please provide a backported version if you want to see it there.

I'm sorry about the hassle with applying to older version. My main goal is to provide a set of patches for the latest stable series, and they get reviewed and tested properly. I try to look whether the patches are relvant for older versions but this takes extra time. I don't have particular interest in these so it's only best effort, but so far it hasn't met the 'best' premise. I'll try better next time.

maintainer
#5 lore raw
Quoted 6 lines · David Sterba
Quoted 4 lines · Greg KH
Quoted 1 line
	5cc2b17e80cf5770f2e585c2d90fd8af1b901258 # 3.14+

Does not build on 3.14+, sorry. Please provide a backported version if you want to see it there.

Quoted 6 lines

I'm sorry about the hassle with applying to older version. My main goal is to provide a set of patches for the latest stable series, and they get reviewed and tested properly. I try to look whether the patches are relvant for older versions but this takes extra time. I don't have particular interest in these so it's only best effort, but so far it hasn't met the 'best' premise. I'll try better next time.

That's fine, no need to work hard for any longterm kernel if you don't want to, just letting you know that this patch didn't work there. I don't care if it doesn't make it if you don't :)

thanks,

greg k-h

#6 lore raw
In reply to David Sterba
Quoted 21 lines · David Sterba

Hi,

please queue the following patches to 4.0 stable. There are fixes for user visible bugs and one usability regression with RAID1 -> single conversion during balance.

One of the patches does not apply cleanly to 4.0.5, there's a minor conflict in patch context (153c35b6cccc0c72de9fae06c8e2c8b2c47d79d4, the last one). A reply to this mail is the adapted version or you can pull/cherry-pick from

git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-stable-4.0

Subjects:
Btrfs: send, add missing check for dead clone root
Btrfs: send, don't leave without decrementing clone root's send_progress
btrfs: incorrect handling for fiemap_fill_next_extent return
btrfs: cleanup orphans while looking up default subvolume
Btrfs: fix range cloning when same inode used as source and destination
Btrfs: fix uninit variable in clone ioctl
Btrfs: fix regression in raid level conversion
Commits:

Quoted 2 lines
	5cc2b17e80cf5770f2e585c2d90fd8af1b901258 # 3.14+
	2f1f465ae6da244099af55c066e5355abd8ff620 # 3.14+

Because 5cc2b17e80cf5770f2e585c2d90fd8af1b901258 breaks the build, 2f1f465ae6da244099af55c066e5355abd8ff620 does not apply to 3.14 either :(
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in