linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event
@ 2023-05-16 12:07 Wu Bo via Linux-f2fs-devel
  2023-05-17  2:44 ` Chao Yu
  0 siblings, 1 reply; 7+ messages in thread
From: Wu Bo via Linux-f2fs-devel @ 2023-05-16 12:07 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu; +Cc: wubo.oduw, linux-kernel, Wu Bo, linux-f2fs-devel

Modify the order between 'trace_f2fs_iget' & 'unlock_new_inode', so the
I_NEW can pass to the trace event when the inode initialised.

Signed-off-by: Wu Bo <bo.wu@vivo.com>
---
 fs/f2fs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index cf4327ad106c..caf959289fe7 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -577,8 +577,8 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino)
 		file_dont_truncate(inode);
 	}
 
-	unlock_new_inode(inode);
 	trace_f2fs_iget(inode);
+	unlock_new_inode(inode);
 	return inode;
 
 bad_inode:
-- 
2.35.3



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event
  2023-05-16 12:07 [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event Wu Bo via Linux-f2fs-devel
@ 2023-05-17  2:44 ` Chao Yu
  2023-05-17  3:59   ` Wu Bo via Linux-f2fs-devel
  0 siblings, 1 reply; 7+ messages in thread
From: Chao Yu @ 2023-05-17  2:44 UTC (permalink / raw)
  To: Wu Bo, Jaegeuk Kim; +Cc: wubo.oduw, linux-kernel, linux-f2fs-devel

On 2023/5/16 20:07, Wu Bo wrote:
> Modify the order between 'trace_f2fs_iget' & 'unlock_new_inode', so the
> I_NEW can pass to the trace event when the inode initialised.

Why is it needed? And trace_f2fs_iget() won't print inode->i_state?

Thanks,

> 
> Signed-off-by: Wu Bo <bo.wu@vivo.com>
> ---
>   fs/f2fs/inode.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
> index cf4327ad106c..caf959289fe7 100644
> --- a/fs/f2fs/inode.c
> +++ b/fs/f2fs/inode.c
> @@ -577,8 +577,8 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino)
>   		file_dont_truncate(inode);
>   	}
>   
> -	unlock_new_inode(inode);
>   	trace_f2fs_iget(inode);
> +	unlock_new_inode(inode);
>   	return inode;
>   
>   bad_inode:


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event
  2023-05-17  2:44 ` Chao Yu
@ 2023-05-17  3:59   ` Wu Bo via Linux-f2fs-devel
  2023-05-17  8:36     ` Chao Yu
  0 siblings, 1 reply; 7+ messages in thread
From: Wu Bo via Linux-f2fs-devel @ 2023-05-17  3:59 UTC (permalink / raw)
  To: chao; +Cc: wubo.oduw, jaegeuk, linux-kernel, bo.wu, linux-f2fs-devel

On 2023/5/17 10:44, Chao Yu wrote:
> On 2023/5/16 20:07, Wu Bo wrote:
>> Modify the order between 'trace_f2fs_iget' & 'unlock_new_inode', so the
>> I_NEW can pass to the trace event when the inode initialised.
>
> Why is it needed? And trace_f2fs_iget() won't print inode->i_state?

When connect a trace_probe to f2fs_iget, it will be able to determine whether
the inode is new initialised in order to do different process.

>
> Thanks,
>
>>
>> Signed-off-by: Wu Bo <bo.wu@vivo.com>
>> ---
>>   fs/f2fs/inode.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
>> index cf4327ad106c..caf959289fe7 100644
>> --- a/fs/f2fs/inode.c
>> +++ b/fs/f2fs/inode.c
>> @@ -577,8 +577,8 @@ struct inode *f2fs_iget(struct super_block *sb,
>> unsigned long ino)
>>           file_dont_truncate(inode);
>>       }
>>   -    unlock_new_inode(inode);
>>       trace_f2fs_iget(inode);
>> +    unlock_new_inode(inode);
>>       return inode;
>>     bad_inode:
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event
  2023-05-17  3:59   ` Wu Bo via Linux-f2fs-devel
@ 2023-05-17  8:36     ` Chao Yu
  2023-05-17 14:31       ` Wu Bo
  0 siblings, 1 reply; 7+ messages in thread
From: Chao Yu @ 2023-05-17  8:36 UTC (permalink / raw)
  To: Wu Bo; +Cc: wubo.oduw, jaegeuk, linux-kernel, linux-f2fs-devel

On 2023/5/17 11:59, Wu Bo wrote:
> On 2023/5/17 10:44, Chao Yu wrote:
>> On 2023/5/16 20:07, Wu Bo wrote:
>>> Modify the order between 'trace_f2fs_iget' & 'unlock_new_inode', so the
>>> I_NEW can pass to the trace event when the inode initialised.
>>
>> Why is it needed? And trace_f2fs_iget() won't print inode->i_state?
> 
> When connect a trace_probe to f2fs_iget, it will be able to determine whether
> the inode is new initialised in order to do different process.

I didn't get it, you want to hook __tracepoint_f2fs_iget() w/ your own callback?

Thanks,

> 
>>
>> Thanks,
>>
>>>
>>> Signed-off-by: Wu Bo <bo.wu@vivo.com>
>>> ---
>>>    fs/f2fs/inode.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
>>> index cf4327ad106c..caf959289fe7 100644
>>> --- a/fs/f2fs/inode.c
>>> +++ b/fs/f2fs/inode.c
>>> @@ -577,8 +577,8 @@ struct inode *f2fs_iget(struct super_block *sb,
>>> unsigned long ino)
>>>            file_dont_truncate(inode);
>>>        }
>>>    -    unlock_new_inode(inode);
>>>        trace_f2fs_iget(inode);
>>> +    unlock_new_inode(inode);
>>>        return inode;
>>>      bad_inode:
>>
>>
>> _______________________________________________
>> Linux-f2fs-devel mailing list
>> Linux-f2fs-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>>


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event
  2023-05-17  8:36     ` Chao Yu
@ 2023-05-17 14:31       ` Wu Bo
  2023-05-18  0:32         ` Jaegeuk Kim
  0 siblings, 1 reply; 7+ messages in thread
From: Wu Bo @ 2023-05-17 14:31 UTC (permalink / raw)
  To: Chao Yu, Wu Bo; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

On 2023/5/17 16:36, Chao Yu wrote:
> On 2023/5/17 11:59, Wu Bo wrote:
>> On 2023/5/17 10:44, Chao Yu wrote:
>>> On 2023/5/16 20:07, Wu Bo wrote:
>>>> Modify the order between 'trace_f2fs_iget' & 'unlock_new_inode', so 
>>>> the
>>>> I_NEW can pass to the trace event when the inode initialised.
>>>
>>> Why is it needed? And trace_f2fs_iget() won't print inode->i_state?
>>
>> When connect a trace_probe to f2fs_iget, it will be able to determine 
>> whether
>> the inode is new initialised in order to do different process.
>
> I didn't get it, you want to hook __tracepoint_f2fs_iget() w/ your own 
> callback?
Yes,  to use 'tracepoint_probe_register ' to register a probe at 
trace_f2fs_iget
>
> Thanks,
>
>>
>>>
>>> Thanks,
>>>
>>>>
>>>> Signed-off-by: Wu Bo <bo.wu@vivo.com>
>>>> ---
>>>>    fs/f2fs/inode.c | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
>>>> index cf4327ad106c..caf959289fe7 100644
>>>> --- a/fs/f2fs/inode.c
>>>> +++ b/fs/f2fs/inode.c
>>>> @@ -577,8 +577,8 @@ struct inode *f2fs_iget(struct super_block *sb,
>>>> unsigned long ino)
>>>>            file_dont_truncate(inode);
>>>>        }
>>>>    -    unlock_new_inode(inode);
>>>>        trace_f2fs_iget(inode);
>>>> +    unlock_new_inode(inode);
>>>>        return inode;
>>>>      bad_inode:
>>>
>>>
>>> _______________________________________________
>>> Linux-f2fs-devel mailing list
>>> Linux-f2fs-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>>>


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event
  2023-05-17 14:31       ` Wu Bo
@ 2023-05-18  0:32         ` Jaegeuk Kim
  2023-05-18 15:02           ` Wu Bo
  0 siblings, 1 reply; 7+ messages in thread
From: Jaegeuk Kim @ 2023-05-18  0:32 UTC (permalink / raw)
  To: Wu Bo; +Cc: linux-kernel, Wu Bo, linux-f2fs-devel

On 05/17, Wu Bo wrote:
> On 2023/5/17 16:36, Chao Yu wrote:
> > On 2023/5/17 11:59, Wu Bo wrote:
> > > On 2023/5/17 10:44, Chao Yu wrote:
> > > > On 2023/5/16 20:07, Wu Bo wrote:
> > > > > Modify the order between 'trace_f2fs_iget' &
> > > > > 'unlock_new_inode', so the
> > > > > I_NEW can pass to the trace event when the inode initialised.
> > > > 
> > > > Why is it needed? And trace_f2fs_iget() won't print inode->i_state?
> > > 
> > > When connect a trace_probe to f2fs_iget, it will be able to
> > > determine whether
> > > the inode is new initialised in order to do different process.
> > 
> > I didn't get it, you want to hook __tracepoint_f2fs_iget() w/ your own
> > callback?
> Yes,  to use 'tracepoint_probe_register ' to register a probe at
> trace_f2fs_iget

Why?

> > 
> > Thanks,
> > 
> > > 
> > > > 
> > > > Thanks,
> > > > 
> > > > > 
> > > > > Signed-off-by: Wu Bo <bo.wu@vivo.com>
> > > > > ---
> > > > >    fs/f2fs/inode.c | 2 +-
> > > > >    1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
> > > > > index cf4327ad106c..caf959289fe7 100644
> > > > > --- a/fs/f2fs/inode.c
> > > > > +++ b/fs/f2fs/inode.c
> > > > > @@ -577,8 +577,8 @@ struct inode *f2fs_iget(struct super_block *sb,
> > > > > unsigned long ino)
> > > > >            file_dont_truncate(inode);
> > > > >        }
> > > > >    -    unlock_new_inode(inode);
> > > > >        trace_f2fs_iget(inode);
> > > > > +    unlock_new_inode(inode);
> > > > >        return inode;
> > > > >      bad_inode:
> > > > 
> > > > 
> > > > _______________________________________________
> > > > Linux-f2fs-devel mailing list
> > > > Linux-f2fs-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> > > > 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event
  2023-05-18  0:32         ` Jaegeuk Kim
@ 2023-05-18 15:02           ` Wu Bo
  0 siblings, 0 replies; 7+ messages in thread
From: Wu Bo @ 2023-05-18 15:02 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-kernel, Wu Bo, linux-f2fs-devel

On 2023/5/18 08:32, Jaegeuk Kim wrote:
> On 05/17, Wu Bo wrote:
>> On 2023/5/17 16:36, Chao Yu wrote:
>>> On 2023/5/17 11:59, Wu Bo wrote:
>>>> On 2023/5/17 10:44, Chao Yu wrote:
>>>>> On 2023/5/16 20:07, Wu Bo wrote:
>>>>>> Modify the order between 'trace_f2fs_iget' &
>>>>>> 'unlock_new_inode', so the
>>>>>> I_NEW can pass to the trace event when the inode initialised.
>>>>> Why is it needed? And trace_f2fs_iget() won't print inode->i_state?
>>>> When connect a trace_probe to f2fs_iget, it will be able to
>>>> determine whether
>>>> the inode is new initialised in order to do different process.
>>> I didn't get it, you want to hook __tracepoint_f2fs_iget() w/ your own
>>> callback?
>> Yes,  to use 'tracepoint_probe_register ' to register a probe at
>> trace_f2fs_iget
> Why?

Sorry, I don't understand what is your real question.

In my understanding, a trace_event is also a  non-volatile point in 
kernel for probing.

And for my case, I want to develop a tool by trace_probe to collect some 
information.

Thanks

>
>>> Thanks,
>>>
>>>>> Thanks,
>>>>>
>>>>>> Signed-off-by: Wu Bo <bo.wu@vivo.com>
>>>>>> ---
>>>>>>     fs/f2fs/inode.c | 2 +-
>>>>>>     1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
>>>>>> index cf4327ad106c..caf959289fe7 100644
>>>>>> --- a/fs/f2fs/inode.c
>>>>>> +++ b/fs/f2fs/inode.c
>>>>>> @@ -577,8 +577,8 @@ struct inode *f2fs_iget(struct super_block *sb,
>>>>>> unsigned long ino)
>>>>>>             file_dont_truncate(inode);
>>>>>>         }
>>>>>>     -    unlock_new_inode(inode);
>>>>>>         trace_f2fs_iget(inode);
>>>>>> +    unlock_new_inode(inode);
>>>>>>         return inode;
>>>>>>       bad_inode:
>>>>>
>>>>> _______________________________________________
>>>>> Linux-f2fs-devel mailing list
>>>>> Linux-f2fs-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>>>>>


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-18 15:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-16 12:07 [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event Wu Bo via Linux-f2fs-devel
2023-05-17  2:44 ` Chao Yu
2023-05-17  3:59   ` Wu Bo via Linux-f2fs-devel
2023-05-17  8:36     ` Chao Yu
2023-05-17 14:31       ` Wu Bo
2023-05-18  0:32         ` Jaegeuk Kim
2023-05-18 15:02           ` Wu Bo

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).