Thread (27 messages) 27 messages, 3 authors, 2021-01-27

Re: [PATCH v3 04/12] btrfs: introduce a FORCE_COMMIT_TRANS flush operation

From: David Sterba <hidden>
Date: 2021-01-26 23:06:06

On Thu, Oct 29, 2020 at 06:03:30PM +0100, David Sterba wrote:
On Fri, Oct 09, 2020 at 09:28:21AM -0400, Josef Bacik wrote:
quoted
Sole-y for preemptive flushing, we want to be able to force the
transaction commit without any of the ambiguity of
may_commit_transaction().  This is because may_commit_transaction()
checks tickets and such, and in preemptive flushing we already know
it'll be helpful, so use this to keep the code nice and clean and
straightforward.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/ctree.h             | 1 +
 fs/btrfs/space-info.c        | 8 ++++++++
 include/trace/events/btrfs.h | 3 ++-
 3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index e817b3b3483d..84c5db91dc44 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2654,6 +2654,7 @@ enum btrfs_flush_state {
 	ALLOC_CHUNK_FORCE	=	8,
 	RUN_DELAYED_IPUTS	=	9,
 	COMMIT_TRANS		=	10,
+	FORCE_COMMIT_TRANS	=	11,
This new state is not documented in space-info.c (before
btrfs_space_info_used).
I've used to changelog and turned it to the comment.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help