From: Allison Collins <allison.henderson@oracle.com>
To: Brian Foster <bfoster@redhat.com>, linux-xfs@vger.kernel.org
Subject: Re: [RFC v5 PATCH 8/9] xfs: create an error tag for random relog reservation
Date: Thu, 27 Feb 2020 16:35:58 -0700 [thread overview]
Message-ID: <357287c8-420f-b854-33ae-c716eb6c138b@oracle.com> (raw)
In-Reply-To: <20200227134321.7238-9-bfoster@redhat.com>
On 2/27/20 6:43 AM, Brian Foster wrote:
> Create an errortag to randomly enable relogging on permanent
> transactions. This only stresses relog reservation management and
> does not enable relogging of any particular items. The tag will be
> reused in a subsequent patch to enable random item relogging.
>
> Signed-off-by: Brian Foster <bfoster@redhat.com>
Alrighty, looks ok:
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
> ---
> fs/xfs/libxfs/xfs_errortag.h | 4 +++-
> fs/xfs/xfs_error.c | 3 +++
> fs/xfs/xfs_trans.c | 6 ++++++
> 3 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/fs/xfs/libxfs/xfs_errortag.h b/fs/xfs/libxfs/xfs_errortag.h
> index 79e6c4fb1d8a..ca7bcadb9455 100644
> --- a/fs/xfs/libxfs/xfs_errortag.h
> +++ b/fs/xfs/libxfs/xfs_errortag.h
> @@ -55,7 +55,8 @@
> #define XFS_ERRTAG_FORCE_SCRUB_REPAIR 32
> #define XFS_ERRTAG_FORCE_SUMMARY_RECALC 33
> #define XFS_ERRTAG_IUNLINK_FALLBACK 34
> -#define XFS_ERRTAG_MAX 35
> +#define XFS_ERRTAG_RELOG 35
> +#define XFS_ERRTAG_MAX 36
>
> /*
> * Random factors for above tags, 1 means always, 2 means 1/2 time, etc.
> @@ -95,5 +96,6 @@
> #define XFS_RANDOM_FORCE_SCRUB_REPAIR 1
> #define XFS_RANDOM_FORCE_SUMMARY_RECALC 1
> #define XFS_RANDOM_IUNLINK_FALLBACK (XFS_RANDOM_DEFAULT/10)
> +#define XFS_RANDOM_RELOG XFS_RANDOM_DEFAULT
>
> #endif /* __XFS_ERRORTAG_H_ */
> diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
> index 331765afc53e..2838b909287e 100644
> --- a/fs/xfs/xfs_error.c
> +++ b/fs/xfs/xfs_error.c
> @@ -53,6 +53,7 @@ static unsigned int xfs_errortag_random_default[] = {
> XFS_RANDOM_FORCE_SCRUB_REPAIR,
> XFS_RANDOM_FORCE_SUMMARY_RECALC,
> XFS_RANDOM_IUNLINK_FALLBACK,
> + XFS_RANDOM_RELOG,
> };
>
> struct xfs_errortag_attr {
> @@ -162,6 +163,7 @@ XFS_ERRORTAG_ATTR_RW(buf_lru_ref, XFS_ERRTAG_BUF_LRU_REF);
> XFS_ERRORTAG_ATTR_RW(force_repair, XFS_ERRTAG_FORCE_SCRUB_REPAIR);
> XFS_ERRORTAG_ATTR_RW(bad_summary, XFS_ERRTAG_FORCE_SUMMARY_RECALC);
> XFS_ERRORTAG_ATTR_RW(iunlink_fallback, XFS_ERRTAG_IUNLINK_FALLBACK);
> +XFS_ERRORTAG_ATTR_RW(relog, XFS_ERRTAG_RELOG);
>
> static struct attribute *xfs_errortag_attrs[] = {
> XFS_ERRORTAG_ATTR_LIST(noerror),
> @@ -199,6 +201,7 @@ static struct attribute *xfs_errortag_attrs[] = {
> XFS_ERRORTAG_ATTR_LIST(force_repair),
> XFS_ERRORTAG_ATTR_LIST(bad_summary),
> XFS_ERRORTAG_ATTR_LIST(iunlink_fallback),
> + XFS_ERRORTAG_ATTR_LIST(relog),
> NULL,
> };
>
> diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
> index f7f2411ead4e..24e0208b74b8 100644
> --- a/fs/xfs/xfs_trans.c
> +++ b/fs/xfs/xfs_trans.c
> @@ -19,6 +19,7 @@
> #include "xfs_trace.h"
> #include "xfs_error.h"
> #include "xfs_defer.h"
> +#include "xfs_errortag.h"
>
> kmem_zone_t *xfs_trans_zone;
>
> @@ -263,6 +264,11 @@ xfs_trans_alloc(
> struct xfs_trans *tp;
> int error;
>
> + /* relogging requires permanent transactions */
> + if (XFS_TEST_ERROR(false, mp, XFS_ERRTAG_RELOG) &&
> + resp->tr_logflags & XFS_TRANS_PERM_LOG_RES)
> + flags |= XFS_TRANS_RELOG;
> +
> /*
> * Allocate the handle before we do our freeze accounting and setting up
> * GFP_NOFS allocation context so that we avoid lockdep false positives
>
next prev parent reply other threads:[~2020-02-27 23:36 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 13:43 [RFC v5 PATCH 0/9] xfs: automatic relogging experiment Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 1/9] xfs: set t_task at wait time instead of alloc time Brian Foster
2020-02-27 20:48 ` Allison Collins
2020-02-27 23:28 ` Darrick J. Wong
2020-02-28 0:10 ` Dave Chinner
2020-02-28 13:46 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 2/9] xfs: introduce ->tr_relog transaction Brian Foster
2020-02-27 20:49 ` Allison Collins
2020-02-27 23:31 ` Darrick J. Wong
2020-02-28 13:52 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 3/9] xfs: automatic relogging reservation management Brian Foster
2020-02-27 20:49 ` Allison Collins
2020-02-28 0:02 ` Darrick J. Wong
2020-02-28 13:55 ` Brian Foster
2020-03-02 3:07 ` Dave Chinner
2020-03-02 18:06 ` Brian Foster
2020-03-02 23:25 ` Dave Chinner
2020-03-03 4:07 ` Dave Chinner
2020-03-03 15:12 ` Brian Foster
2020-03-03 21:47 ` Dave Chinner
2020-03-03 14:13 ` Brian Foster
2020-03-03 21:26 ` Dave Chinner
2020-03-04 14:03 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 4/9] xfs: automatic relogging item management Brian Foster
2020-02-27 21:18 ` Allison Collins
2020-03-02 5:58 ` Dave Chinner
2020-03-02 18:08 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 5/9] xfs: automatic log item relog mechanism Brian Foster
2020-02-27 22:54 ` Allison Collins
2020-02-28 0:13 ` Darrick J. Wong
2020-02-28 14:02 ` Brian Foster
2020-03-02 7:32 ` Dave Chinner
2020-03-02 7:18 ` Dave Chinner
2020-03-02 18:52 ` Brian Foster
2020-03-03 0:06 ` Dave Chinner
2020-03-03 14:14 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 6/9] xfs: automatically relog the quotaoff start intent Brian Foster
2020-02-27 23:19 ` Allison Collins
2020-02-28 14:03 ` Brian Foster
2020-02-28 18:55 ` Allison Collins
2020-02-28 1:16 ` Darrick J. Wong
2020-02-28 14:04 ` Brian Foster
2020-02-29 5:35 ` Darrick J. Wong
2020-02-29 12:15 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 7/9] xfs: buffer relogging support prototype Brian Foster
2020-02-27 23:33 ` Allison Collins
2020-02-28 14:04 ` Brian Foster
2020-03-02 7:47 ` Dave Chinner
2020-03-02 19:00 ` Brian Foster
2020-03-03 0:09 ` Dave Chinner
2020-03-03 14:14 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 8/9] xfs: create an error tag for random relog reservation Brian Foster
2020-02-27 23:35 ` Allison Collins [this message]
2020-02-27 13:43 ` [RFC v5 PATCH 9/9] xfs: relog random buffers based on errortag Brian Foster
2020-02-27 23:48 ` Allison Collins
2020-02-28 14:06 ` Brian Foster
2020-02-27 15:09 ` [RFC v5 PATCH 0/9] xfs: automatic relogging experiment Darrick J. Wong
2020-02-27 15:18 ` Brian Foster
2020-02-27 15:22 ` 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=357287c8-420f-b854-33ae-c716eb6c138b@oracle.com \
--to=allison.henderson@oracle.com \
--cc=bfoster@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox