[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161221140848.GB12081@suse.cz>
Date: Wed, 21 Dec 2016 15:08:48 +0100
From: David Sterba <dsterba@...e.cz>
To: Qu Wenruo <quwenruo@...fujitsu.com>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Chris Mason <clm@...com>, Josef Bacik <jbacik@...com>,
David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] btrfs: drop trace_btrfs_all_work_done() from
normal_work_helper()
On Wed, Dec 21, 2016 at 04:45:06PM +0800, Qu Wenruo wrote:
>
>
> At 12/21/2016 04:28 PM, Sebastian Andrzej Siewior wrote:
> > On 2016-12-21 08:33:03 [+0800], Qu Wenruo wrote:
> >> The trace point only uses the pointer, and this helps us to pair with
> >> btrfs_work_queued/sched.
> >
> > | /* For situiations that the work is freed */
> > | DECLARE_EVENT_CLASS(btrfs__work__done,
> > |
> > | TP_PROTO(struct btrfs_work *work),
> > |
> > | TP_ARGS(work),
> > |
> > | TP_STRUCT__entry_btrfs(
> > | __field( void *, work )
> > | ),
> > |
> > | TP_fast_assign_btrfs(btrfs_work_owner(work),
> > | __entry->work = work;
> > | ),
> > |
> > | TP_printk_btrfs("work->%p", __entry->work)
> > | );
> >
> > and btrfs_work_owner exapnds to:
> >
> > | struct btrfs_fs_info *
> > | btrfs_work_owner(struct btrfs_work *work)
> > | {
> > | return work->wq->fs_info;
> > | }
> >
> > voilĂ
>
> Oh I got it, thanks very much.
>
> The btrfs_work_owner() is newly introduced, no wonder I didn't know that.
>
>
> I think we can fix it by extracting fs_info pointer before running the
> work, and using the extracted one in the trace point.
That sounds like an easy fix to preserve the tracepoint.
Powered by blists - more mailing lists