Skip to contentSkip to conversation

FAILED: patch "[PATCH] btrfs: release metadata before running delayed refs" failed to apply to 4.4-stable tree

PATCH In review [email protected] 3 participants 9 messages Nov 12, 2018 – Dec 12, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From f45c752b65af46bf42963295c332865d95f97fff Mon Sep 17 00:00:00 2001

From: Josef Bacik <[email protected]>
Date: Fri, 28 Sep 2018 07:17:48 -0400
Subject: [PATCH] btrfs: release metadata before running delayed refs

We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation.

fs/btrfs/transaction.c +3 -3
index cadc747292d9..e7f618b17b07 100644
@@ -1932,6 +1932,9 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
 		return ret;
 	}
 
+	btrfs_trans_release_metadata(trans);
+	trans->block_rsv = NULL;
+
 	/* make a pass through all the delayed refs we have so far
 	 * any runnings procs may add more while we are here
 	 */
@@ -1941,9 +1944,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
 		return ret;
 	}
 
-	btrfs_trans_release_metadata(trans);
-	trans->block_rsv = NULL;
-
 	cur_trans = trans->transaction;
 
 	/*
#1 lore raw

PATCH 1/3 btrfs: release metadata before running delayed refs

From: Josef Bacik <[email protected]>

We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation.

---

Hello Greg,

Here is a fixed up backport for upstream commit f45c752b65af46bf42963295c332865d95f97fff This one applies cleanly to 4.4.y and 4.9.y

 fs/btrfs/transaction.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/btrfs/transaction.c +3 -3
index be8eae80ff65..098016338f98 100644
@@ -1821,6 +1821,9 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
 		return ret;
 	}
 
+	btrfs_trans_release_metadata(trans, root);
+	trans->block_rsv = NULL;
+
 	/* make a pass through all the delayed refs we have so far
 	 * any runnings procs may add more while we are here
 	 */
@@ -1830,9 +1833,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
 		return ret;
 	}
 
-	btrfs_trans_release_metadata(trans, root);
-	trans->block_rsv = NULL;
-
 	cur_trans = trans->transaction;
 
 	/*
Signature · 1 line
2.17.1
author maintainer
#2 lore raw

Re: [PATCH 1/3] btrfs: release metadata before running delayed refs

Quoted 12 lines · Nikolay Borisov

From: Josef Bacik <[email protected]>

We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation.

Quoted 6 lines

---

Hello Greg,

Here is a fixed up backport for upstream commit f45c752b65af46bf42963295c332865d95f97fff This one applies cleanly to 4.4.y and 4.9.y

What about 4.14.y? I don't want to apply this to only 4.4 and 4.9 and not 4.14. Can you provide a working backport there too?

And I don't see the 2/3 patch in this series, has that already been handled?

thanks,

greg k-h

#3 lore raw

Re: [PATCH 1/3] btrfs: release metadata before running delayed refs

Quoted 15 lines · Greg KH
Quoted 14 lines · Nikolay Borisov

From: Josef Bacik <[email protected]>

We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation.

---

Quoted 7 lines
Quoted 4 lines

Hello Greg,

Here is a fixed up backport for upstream commit f45c752b65af46bf42963295c332865d95f97fff This one applies cleanly to 4.4.y and 4.9.y

What about 4.14.y? I don't want to apply this to only 4.4 and 4.9 and not 4.14. Can you provide a working backport there too?

I've only made backports as a result of your "failed to apply" emails. If there isn't a backport for 4.14 then this means it's either handled or you didn't send such an email, or i wasn't cced

Quoted 8 lines

And I don't see the 2/3 patch in this series, has that already been handled?

thanks,

greg k-h

author maintainer
#4 lore raw

Re: [PATCH 1/3] btrfs: release metadata before running delayed refs

Quoted 23 lines · Nikolay Borisov
Quoted 20 lines · Greg KH
Quoted 18 lines · Nikolay Borisov

From: Josef Bacik <[email protected]>

We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation.

---

Hello Greg,

Here is a fixed up backport for upstream commit f45c752b65af46bf42963295c332865d95f97fff This one applies cleanly to 4.4.y and 4.9.y

Quoted 6 lines
Quoted 2 lines

What about 4.14.y? I don't want to apply this to only 4.4 and 4.9 and not 4.14. Can you provide a working backport there too?

I've only made backports as a result of your "failed to apply" emails. If there isn't a backport for 4.14 then this means it's either handled or you didn't send such an email, or i wasn't cced

If you got one for older kernels, you should have also gotten one for 4.14, I don't know what failed there, sorry.

Anyway, I need a 4.14 patch before I can apply this one.

thanks,

greg k-h

maintainer
#5 lore raw

Re: [PATCH 1/3] btrfs: release metadata before running delayed refs

In reply to Nikolay Borisov
Quoted 23 lines · Nikolay Borisov
Quoted 20 lines · Greg KH
Quoted 18 lines · Nikolay Borisov

From: Josef Bacik <[email protected]>

We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation.

---

Hello Greg,

Here is a fixed up backport for upstream commit f45c752b65af46bf42963295c332865d95f97fff This one applies cleanly to 4.4.y and 4.9.y

Quoted 10 lines
Quoted 2 lines

What about 4.14.y? I don't want to apply this to only 4.4 and 4.9 and not 4.14. Can you provide a working backport there too?

I've only made backports as a result of your "failed to apply" emails. If there isn't a backport for 4.14 then this means it's either handled or you didn't send such an email, or i wasn't cced

Quoted 3 lines

And I don't see the 2/3 patch in this series, has that already been handled?

I see commit 2/3 failed to apply on 4.9 and 4.4:
https://www.spinics.net/lists/stable/msg267061.html would you send a backport for it as well?

--
Thanks,
Sasha

#6 lore raw

Re: [PATCH 1/3] btrfs: release metadata before running delayed refs

Quoted 33 lines · Sasha Levin
Quoted 32 lines · Nikolay Borisov
Quoted 15 lines · Greg KH
Quoted 14 lines · Nikolay Borisov

From: Josef Bacik <[email protected]>

We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation.

---

Quoted 8 lines
Quoted 5 lines

Hello Greg,

Here is a fixed up backport for upstream commit
f45c752b65af46bf42963295c332865d95f97fff
This one applies cleanly to 4.4.y and 4.9.y

What about 4.14.y?  I don't want to apply this to only 4.4 and 4.9 and not 4.14.  Can you provide a working backport there too?

I've only made backports as a result of your "failed to apply" emails. If there isn't a backport for 4.14 then this means it's either handled or you didn't send such an email, or i wasn't cced

Quoted 1 line
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

And I don't see the 2/3 patch in this series, has that already been handled?

I see commit 2/3 failed to apply on 4.9 and 4.4:
https://www.spinics.net/lists/stable/msg267061.html would you send a backport for it as well?

I think not, because the memalloc_xxx_save/restore infrastructure is missing and actually plumbing GFP flags to btrfs_iget so that in only 1 unique context we can pass GFP_NOFS will be rather invasive.

Quoted 5 lines
Signature · 3 lines
-- 
Thanks,
Sasha
#7 lore raw

PATCH 1/1 btrfs: release metadata before running delayed refs

In reply to Greg KH

From: Josef Bacik <[email protected]>

We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation.

---

Hi Greg,

Please apply this backport of upstream commit f45c752b65af46bf42963295c332865d95f97fff to 4.14.y.

 fs/btrfs/transaction.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/btrfs/transaction.c +3 -3
index f74005ca8f08..73c1fbca0c35 100644
@@ -1955,6 +1955,9 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
 		return ret;
 	}
 
+	btrfs_trans_release_metadata(trans, fs_info);
+	trans->block_rsv = NULL;
+
 	/* make a pass through all the delayed refs we have so far
 	 * any runnings procs may add more while we are here
 	 */
@@ -1964,9 +1967,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
 		return ret;
 	}
 
-	btrfs_trans_release_metadata(trans, fs_info);
-	trans->block_rsv = NULL;
-
 	cur_trans = trans->transaction;
 
 	/*
Signature · 1 line
2.17.1
maintainer Applied
#8 lore raw

Re: [PATCH] btrfs: release metadata before running delayed refs

Quoted 12 lines · Nikolay Borisov

From: Josef Bacik <[email protected]>

We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation.

Quoted 6 lines

---

Hi Greg,

Please apply this backport of upstream commit f45c752b65af46bf42963295c332865d95f97fff to 4.14.y.

I've queued this one for 4.14, and the one you previously sent to 4.9 and 4.4. Thank you.

--
Thanks,
Sasha