All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Btrfs stable updates for 4.0
@ 2015-06-11 16:06 David Sterba
  2015-06-11 16:06 ` [PATCH 7/7] Btrfs: fix regression in raid level conversion David Sterba
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: David Sterba @ 2015-06-11 16:06 UTC (permalink / raw)
  To: stable; +Cc: David Sterba, linux-btrfs, clm

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 7/7] Btrfs: fix regression in raid level conversion
  2015-06-11 16:06 Btrfs stable updates for 4.0 David Sterba
@ 2015-06-11 16:06 ` David Sterba
  2015-06-17 14:47   ` Luis Henriques
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: David Sterba @ 2015-06-11 16:06 UTC (permalink / raw)
  To: stable; +Cc: David Sterba, linux-btrfs, clm

From: Chris Mason <clm@fb.com>

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.

Signed-off-by: Chris Mason <clm@fb.com>
Tested-by: Dave Sterba <dsterba@suse.cz>
Reported-by: Holger Hoffstaette <holger.hoffstaette@googlemail.com>
[adapted for stable kernel branch, v4.0.5]
Signed-off-by: David Sterba <dsterba@suse.cz>
---
 fs/btrfs/extent-tree.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 8b33da6ec3dd..63be2a96ed6a 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -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)
-- 
2.1.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: Btrfs stable updates for 4.0
  2015-06-11 16:06 Btrfs stable updates for 4.0 David Sterba
@ 2015-06-17 14:47   ` Luis Henriques
  2015-06-17 14:47   ` Luis Henriques
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Luis Henriques @ 2015-06-17 14:47 UTC (permalink / raw)
  To: David Sterba; +Cc: stable, linux-btrfs, clm

On Thu, Jun 11, 2015 at 06:06:32PM +0200, David Sterba wrote:
> 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+

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

Cheers,
--
Lu�s

> 	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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Btrfs stable updates for 4.0
@ 2015-06-17 14:47   ` Luis Henriques
  0 siblings, 0 replies; 10+ messages in thread
From: Luis Henriques @ 2015-06-17 14:47 UTC (permalink / raw)
  To: David Sterba; +Cc: stable, linux-btrfs, clm

On Thu, Jun 11, 2015 at 06:06:32PM +0200, David Sterba wrote:
> 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+

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

Cheers,
--
Luís

> 	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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Btrfs stable updates for 4.0
  2015-06-11 16:06 Btrfs stable updates for 4.0 David Sterba
@ 2015-06-19 20:31   ` Greg KH
  2015-06-17 14:47   ` Luis Henriques
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2015-06-19 20:31 UTC (permalink / raw)
  To: David Sterba; +Cc: stable, linux-btrfs, clm

On Thu, Jun 11, 2015 at 06:06:32PM +0200, David Sterba wrote:
> 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+

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 stable" in

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Btrfs stable updates for 4.0
@ 2015-06-19 20:31   ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2015-06-19 20:31 UTC (permalink / raw)
  To: David Sterba; +Cc: stable, linux-btrfs, clm

On Thu, Jun 11, 2015 at 06:06:32PM +0200, David Sterba wrote:
> 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+

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Btrfs stable updates for 4.0
  2015-06-11 16:06 Btrfs stable updates for 4.0 David Sterba
@ 2015-06-19 20:32   ` Greg KH
  2015-06-17 14:47   ` Luis Henriques
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2015-06-19 20:32 UTC (permalink / raw)
  To: David Sterba; +Cc: stable, linux-btrfs, clm

On Thu, Jun 11, 2015 at 06:06:32PM +0200, David Sterba wrote:
> 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+

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Btrfs stable updates for 4.0
@ 2015-06-19 20:32   ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2015-06-19 20:32 UTC (permalink / raw)
  To: David Sterba; +Cc: stable, linux-btrfs, clm

On Thu, Jun 11, 2015 at 06:06:32PM +0200, David Sterba wrote:
> 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+

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Btrfs stable updates for 4.0
  2015-06-19 20:31   ` Greg KH
  (?)
@ 2015-06-25 15:10   ` David Sterba
  2015-06-25 15:59     ` Greg KH
  -1 siblings, 1 reply; 10+ messages in thread
From: David Sterba @ 2015-06-25 15:10 UTC (permalink / raw)
  To: Greg KH; +Cc: David Sterba, stable, linux-btrfs, clm

On Fri, Jun 19, 2015 at 01:31:31PM -0700, Greg KH wrote:
> > 	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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Btrfs stable updates for 4.0
  2015-06-25 15:10   ` David Sterba
@ 2015-06-25 15:59     ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2015-06-25 15:59 UTC (permalink / raw)
  To: dsterba, stable, linux-btrfs, clm

On Thu, Jun 25, 2015 at 05:10:29PM +0200, David Sterba wrote:
> On Fri, Jun 19, 2015 at 01:31:31PM -0700, Greg KH wrote:
> > > 	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.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-06-25 15:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11 16:06 Btrfs stable updates for 4.0 David Sterba
2015-06-11 16:06 ` [PATCH 7/7] Btrfs: fix regression in raid level conversion David Sterba
2015-06-17 14:47 ` Btrfs stable updates for 4.0 Luis Henriques
2015-06-17 14:47   ` Luis Henriques
2015-06-19 20:31 ` Greg KH
2015-06-19 20:31   ` Greg KH
2015-06-25 15:10   ` David Sterba
2015-06-25 15:59     ` Greg KH
2015-06-19 20:32 ` Greg KH
2015-06-19 20:32   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.