All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: sandeen@sandeen.net, darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 1/3] xfs_scrub: bump work_threads to include the controller thread
Date: Wed, 25 Sep 2019 14:37:23 -0700	[thread overview]
Message-ID: <156944744378.300433.8796143133184996618.stgit@magnolia> (raw)
In-Reply-To: <156944743778.300433.15946504547062490997.stgit@magnolia>

From: Darrick J. Wong <darrick.wong@oracle.com>

Bump @work_threads in the scrub phase setup function because we will
soon want the main thread (i.e. the one that coordinates workers) to be
factored into per-thread data structures.  We'll need this in an
upcoming patch to render error string prefixes to preallocated
per-thread buffers.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 scrub/xfs_scrub.c |    7 +++++++
 1 file changed, 7 insertions(+)


diff --git a/scrub/xfs_scrub.c b/scrub/xfs_scrub.c
index aa98caaa..3b347d86 100644
--- a/scrub/xfs_scrub.c
+++ b/scrub/xfs_scrub.c
@@ -458,6 +458,13 @@ run_scrub_phases(
 					&work_threads, &rshift);
 			if (!moveon)
 				break;
+
+			/*
+			 * The thread that starts the worker threads is also
+			 * allowed to contribute to the progress counters and
+			 * whatever other per-thread data we need to allocate.
+			 */
+			work_threads++;
 			moveon = progress_init_phase(ctx, progress_fp, phase,
 					max_work, rshift, work_threads);
 		} else {


  reply	other threads:[~2019-09-25 21:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 21:37 [PATCH 0/3] xfs_scrub: deferred labelling to save time Darrick J. Wong
2019-09-25 21:37 ` Darrick J. Wong [this message]
2019-10-21 20:16   ` [PATCH 1/3] xfs_scrub: bump work_threads to include the controller thread Eric Sandeen
2019-09-25 21:37 ` [PATCH 2/3] xfs_scrub: implement deferred description string rendering Darrick J. Wong
2019-09-25 21:37 ` [PATCH 3/3] xfs_scrub: adapt phase5 to deferred descriptions Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2019-10-22 18:49 [PATCH 0/3] xfs_scrub: deferred labelling to save time Darrick J. Wong
2019-10-22 18:49 ` [PATCH 1/3] xfs_scrub: bump work_threads to include the controller thread Darrick J. Wong
2019-09-06  3:40 [PATCH 0/3] xfs_scrub: deferred labelling to save time Darrick J. Wong
2019-09-06  3:40 ` [PATCH 1/3] xfs_scrub: bump work_threads to include the controller thread Darrick J. Wong
2019-08-26 21:32 [PATCH 0/3] xfs_scrub: deferred labelling to save time Darrick J. Wong
2019-08-26 21:32 ` [PATCH 1/3] xfs_scrub: bump work_threads to include the controller thread Darrick J. Wong

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=156944744378.300433.8796143133184996618.stgit@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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 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.