* [PATCH 0/2] xfsprogs: env var stuff
@ 2018-09-26 21:23 Eric Sandeen
2018-09-26 21:25 ` [PATCH 1/2] scrub: remove redundant debug test Eric Sandeen
2018-09-26 21:27 ` [PATCH 2/2] xfsprogs: document environment variables Eric Sandeen
0 siblings, 2 replies; 5+ messages in thread
From: Eric Sandeen @ 2018-09-26 21:23 UTC (permalink / raw)
To: linux-xfs
We've started using env vars for a few things; clean up one nit
and document them.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] scrub: remove redundant debug test
2018-09-26 21:23 [PATCH 0/2] xfsprogs: env var stuff Eric Sandeen
@ 2018-09-26 21:25 ` Eric Sandeen
2018-09-26 23:12 ` Darrick J. Wong
2018-09-26 21:27 ` [PATCH 2/2] xfsprogs: document environment variables Eric Sandeen
1 sibling, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2018-09-26 21:25 UTC (permalink / raw)
To: linux-xfs
From: Eric Sandeen <sandeen@redhat.com>
debug_tweak_on() already tests for debug.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/scrub/xfs_scrub.c b/scrub/xfs_scrub.c
index 076a86a..33b83a5 100644
--- a/scrub/xfs_scrub.c
+++ b/scrub/xfs_scrub.c
@@ -425,7 +425,7 @@ run_scrub_phases(
unsigned int nr_threads;
int rshift;
- if (debug && debug_tweak_on("XFS_SCRUB_PHASE"))
+ if (debug_tweak_on("XFS_SCRUB_PHASE"))
debug_phase = atoi(getenv("XFS_SCRUB_PHASE"));
/* Run all phases of the scrub tool. */
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] scrub: remove redundant debug test
2018-09-26 21:25 ` [PATCH 1/2] scrub: remove redundant debug test Eric Sandeen
@ 2018-09-26 23:12 ` Darrick J. Wong
0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2018-09-26 23:12 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
On Wed, Sep 26, 2018 at 04:25:12PM -0500, Eric Sandeen wrote:
> From: Eric Sandeen <sandeen@redhat.com>
>
> debug_tweak_on() already tests for debug.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
>
> diff --git a/scrub/xfs_scrub.c b/scrub/xfs_scrub.c
> index 076a86a..33b83a5 100644
> --- a/scrub/xfs_scrub.c
> +++ b/scrub/xfs_scrub.c
> @@ -425,7 +425,7 @@ run_scrub_phases(
> unsigned int nr_threads;
> int rshift;
>
> - if (debug && debug_tweak_on("XFS_SCRUB_PHASE"))
> + if (debug_tweak_on("XFS_SCRUB_PHASE"))
> debug_phase = atoi(getenv("XFS_SCRUB_PHASE"));
>
> /* Run all phases of the scrub tool. */
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] xfsprogs: document environment variables
2018-09-26 21:23 [PATCH 0/2] xfsprogs: env var stuff Eric Sandeen
2018-09-26 21:25 ` [PATCH 1/2] scrub: remove redundant debug test Eric Sandeen
@ 2018-09-26 21:27 ` Eric Sandeen
2018-09-26 23:13 ` Darrick J. Wong
1 sibling, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2018-09-26 21:27 UTC (permalink / raw)
To: linux-xfs
From: Eric Sandeen <sandeen@redhat.com>
Document the various environment variables used in the code,
almost all are for debugging.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/doc/README-env-vars.txt b/doc/README-env-vars.txt
new file mode 100644
index 0000000..eec59a8
--- /dev/null
+++ b/doc/README-env-vars.txt
@@ -0,0 +1,26 @@
+Several environment variables are used within the code, primarily for
+for debugging purposes; they are documented here. In most cases simply
+setting the environment variable enables the behavior, but in some
+cases the value assigned influences behavior as well, as noted below.
+
+General
+-------
+LIBXFS_LEAK_CHECK -- warn and exit(1) if zone-allocated memory
+ is leaked at exit.
+xfs_fsr
+-------
+FSRXFSTEST -- enable -C nfrag in theory coalesces into
+ nfrag extents. Doesn't work.
+xfs_scrub
+---------
+Known debug tweaks (pass -d and set the environment variable):
+XFS_SCRUB_FORCE_ERROR -- pretend all metadata is corrupt
+XFS_SCRUB_FORCE_REPAIR -- repair all metadata even if it's ok
+XFS_SCRUB_NO_KERNEL -- pretend there is no kernel ioctl
+XFS_SCRUB_NO_SCSI_VERIFY -- disable SCSI VERIFY (if present)
+XFS_SCRUB_PHASE -- run only this scrub phase
+XFS_SCRUB_THREADS -- start exactly this number of threads
+
+Available even in non-debug mode:
+SERVICE_MODE -- compress all error codes to 1 for LSB
+ service action compliance
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] xfsprogs: document environment variables
2018-09-26 21:27 ` [PATCH 2/2] xfsprogs: document environment variables Eric Sandeen
@ 2018-09-26 23:13 ` Darrick J. Wong
0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2018-09-26 23:13 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
On Wed, Sep 26, 2018 at 04:27:27PM -0500, Eric Sandeen wrote:
> From: Eric Sandeen <sandeen@redhat.com>
>
> Document the various environment variables used in the code,
> almost all are for debugging.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/doc/README-env-vars.txt b/doc/README-env-vars.txt
> new file mode 100644
> index 0000000..eec59a8
> --- /dev/null
> +++ b/doc/README-env-vars.txt
> @@ -0,0 +1,26 @@
> +Several environment variables are used within the code, primarily for
> +for debugging purposes; they are documented here. In most cases simply
> +setting the environment variable enables the behavior, but in some
> +cases the value assigned influences behavior as well, as noted below.
> +
> +General
> +-------
> +LIBXFS_LEAK_CHECK -- warn and exit(1) if zone-allocated memory
> + is leaked at exit.
> +xfs_fsr
> +-------
> +FSRXFSTEST -- enable -C nfrag in theory coalesces into
> + nfrag extents. Doesn't work.
<eyeroll> Maybe someone should fix/remove that?
Anyway, for the documentation,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> +xfs_scrub
> +---------
> +Known debug tweaks (pass -d and set the environment variable):
> +XFS_SCRUB_FORCE_ERROR -- pretend all metadata is corrupt
> +XFS_SCRUB_FORCE_REPAIR -- repair all metadata even if it's ok
> +XFS_SCRUB_NO_KERNEL -- pretend there is no kernel ioctl
> +XFS_SCRUB_NO_SCSI_VERIFY -- disable SCSI VERIFY (if present)
> +XFS_SCRUB_PHASE -- run only this scrub phase
> +XFS_SCRUB_THREADS -- start exactly this number of threads
> +
> +Available even in non-debug mode:
> +SERVICE_MODE -- compress all error codes to 1 for LSB
> + service action compliance
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-09-27 5:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-26 21:23 [PATCH 0/2] xfsprogs: env var stuff Eric Sandeen
2018-09-26 21:25 ` [PATCH 1/2] scrub: remove redundant debug test Eric Sandeen
2018-09-26 23:12 ` Darrick J. Wong
2018-09-26 21:27 ` [PATCH 2/2] xfsprogs: document environment variables Eric Sandeen
2018-09-26 23:13 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).