[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190410113115.GB4610@linux-x5ow.site>
Date: Wed, 10 Apr 2019 13:31:15 +0200
From: Johannes Thumshirn <jthumshirn@...e.de>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>, x86@...nel.org,
Andy Lutomirski <luto@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Alexander Potapenko <glider@...gle.com>,
David Sterba <dsterba@...e.com>, Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>, linux-btrfs@...r.kernel.org
Subject: Re: [RFC patch 29/41] btrfs: ref-verify: Simplify stack trace
retrieval
On Wed, Apr 10, 2019 at 12:28:23PM +0200, Thomas Gleixner wrote:
> Replace the indirection through struct stack_trace with an invocation of
> the storage array based interface.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: David Sterba <dsterba@...e.com>
> Cc: Chris Mason <clm@...com>
> Cc: Josef Bacik <josef@...icpanda.com>
> Cc: linux-btrfs@...r.kernel.org
> ---
> fs/btrfs/ref-verify.c | 15 ++-------------
> 1 file changed, 2 insertions(+), 13 deletions(-)
>
> --- a/fs/btrfs/ref-verify.c
> +++ b/fs/btrfs/ref-verify.c
> @@ -205,28 +205,17 @@ static struct root_entry *lookup_root_en
> #ifdef CONFIG_STACKTRACE
> static void __save_stack_trace(struct ref_action *ra)
> {
> - struct stack_trace stack_trace;
> -
> - stack_trace.max_entries = MAX_TRACE;
> - stack_trace.nr_entries = 0;
> - stack_trace.entries = ra->trace;
> - stack_trace.skip = 2;
> - save_stack_trace(&stack_trace);
> - ra->trace_len = stack_trace.nr_entries;
> + ra->trace_len = stack_trace_save(ra->trace, MAX_TRACE, 2);
Stupid question: why are you passing a '2' for 'skipnr' and in
stack_trace_save() from your series you set stack_trace::skip as skipnr + 1.
Wouldn't this result in a stack_trace::skip = 3? Or is it the number of
functions to be skipped and you don't want to have stack_trace_save() saved as
well?
Thanks,
Johannes
--
Johannes Thumshirn SUSE Labs Filesystems
jthumshirn@...e.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Powered by blists - more mailing lists