linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <yuchao0@huawei.com>
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/5] f2fs: add tracepoint for f2fs_filemap_fault()
Date: Wed, 24 Apr 2019 20:45:03 +0800	[thread overview]
Message-ID: <8919a08e-a548-7bd8-c43e-99596e33ca97@kernel.org> (raw)
In-Reply-To: <20190424091456.GB38756@jaegeuk-macbookpro.roam.corp.google.com>

On 2019-4-24 17:14, Jaegeuk Kim wrote:
> On 04/15, Chao Yu wrote:
>> This patch adds tracepoint for f2fs_filemap_fault().
>>
>> Signed-off-by: Chao Yu <yuchao0@huawei.com>
>> ---
>> v2:
>> - fix wrong type of @ret parameter
>>  fs/f2fs/file.c              |  2 ++
>>  include/trace/events/f2fs.h | 26 ++++++++++++++++++++++++++
>>  2 files changed, 28 insertions(+)
>>
>> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
>> index 30d49467578e..578486e03427 100644
>> --- a/fs/f2fs/file.c
>> +++ b/fs/f2fs/file.c
>> @@ -39,6 +39,8 @@ static vm_fault_t f2fs_filemap_fault(struct vm_fault *vmf)
>>  	ret = filemap_fault(vmf);
>>  	up_read(&F2FS_I(inode)->i_mmap_sem);
>>  
>> +	trace_f2fs_filemap_fault(inode, vmf->pgoff, ret);
> 
> In order to avoid wrong casting warning, how about this?

Confirmed, I used wrong type in v2, thanks for fixing this.

Thanks,

> 
> ---
>  include/trace/events/f2fs.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
> index abe763cc1d0b..c29dea7ac0fe 100644
> --- a/include/trace/events/f2fs.h
> +++ b/include/trace/events/f2fs.h
> @@ -1286,7 +1286,7 @@ DEFINE_EVENT(f2fs__page, f2fs_commit_inmem_page,
>  
>  TRACE_EVENT(f2fs_filemap_fault,
>  
> -	TP_PROTO(struct inode *inode, pgoff_t index, enum vm_fault_reason ret),
> +	TP_PROTO(struct inode *inode, pgoff_t index, vm_fault_t ret),
>  
>  	TP_ARGS(inode, index, ret),
>  
> @@ -1294,7 +1294,7 @@ TRACE_EVENT(f2fs_filemap_fault,
>  		__field(dev_t,	dev)
>  		__field(ino_t,	ino)
>  		__field(pgoff_t, index)
> -		__field(enum vm_fault_reason, ret)
> +		__field(vm_fault_t, ret)
>  	),
>  
>  	TP_fast_assign(
> @@ -1304,10 +1304,10 @@ TRACE_EVENT(f2fs_filemap_fault,
>  		__entry->ret	= ret;
>  	),
>  
> -	TP_printk("dev = (%d,%d), ino = %lu, index = %lu, ret = %u",
> +	TP_printk("dev = (%d,%d), ino = %lu, index = %lu, ret = %lx",
>  		show_dev_ino(__entry),
>  		(unsigned long)__entry->index,
> -		ret)
> +		(unsigned long)__entry->ret)
>  );
>  
>  TRACE_EVENT(f2fs_writepages,
> 

      reply	other threads:[~2019-04-24 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  7:22 [PATCH v2 4/5] f2fs: add tracepoint for f2fs_filemap_fault() Chao Yu
2019-04-24  9:14 ` Jaegeuk Kim
2019-04-24 12:45   ` Chao Yu [this message]

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=8919a08e-a548-7bd8-c43e-99596e33ca97@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).