OCFS2-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Ocfs2-devel] [patch -next] ocfs2: Add the trace_ocfs2_read_blocks_end
@ 2020-10-16  9:11 Zhang Qilong
  2020-10-19  7:46 ` Joseph Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang Qilong @ 2020-10-16  9:11 UTC (permalink / raw)
  To: ocfs2-devel

Missing the trace_ocfs2_read_blocks_end when reading blocks fails.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
 fs/ocfs2/buffer_head_io.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c
index f0b104e483d8..0e6ee6e9b201 100644
--- a/fs/ocfs2/buffer_head_io.c
+++ b/fs/ocfs2/buffer_head_io.c
@@ -395,11 +395,10 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,
 	}
 	ocfs2_metadata_cache_io_unlock(ci);
 
+bail:
 	trace_ocfs2_read_blocks_end((unsigned long long)block, nr,
 				    flags, ignore_cache);
 
-bail:
-
 	return status;
 }
 
-- 
2.17.1

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

* [Ocfs2-devel] [patch -next] ocfs2: Add the trace_ocfs2_read_blocks_end
  2020-10-16  9:11 [Ocfs2-devel] [patch -next] ocfs2: Add the trace_ocfs2_read_blocks_end Zhang Qilong
@ 2020-10-19  7:46 ` Joseph Qi
  2020-10-19  8:07   ` [Ocfs2-devel] 答复: " zhangqilong
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Qi @ 2020-10-19  7:46 UTC (permalink / raw)
  To: ocfs2-devel



On 2020/10/16 17:11, Zhang Qilong wrote:
> Missing the trace_ocfs2_read_blocks_end when reading blocks fails.>
Why do you need the trace in case error?
In general, it will log an error message if fail.

Thanks,
Joseph

> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
>  fs/ocfs2/buffer_head_io.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c
> index f0b104e483d8..0e6ee6e9b201 100644
> --- a/fs/ocfs2/buffer_head_io.c
> +++ b/fs/ocfs2/buffer_head_io.c
> @@ -395,11 +395,10 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,
>  	}
>  	ocfs2_metadata_cache_io_unlock(ci);
>  
> +bail:
>  	trace_ocfs2_read_blocks_end((unsigned long long)block, nr,
>  				    flags, ignore_cache);
>  
> -bail:
> -
>  	return status;
>  }
>  
> 

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

* [Ocfs2-devel] 答复: [patch -next] ocfs2: Add the trace_ocfs2_read_blocks_end
  2020-10-19  7:46 ` Joseph Qi
@ 2020-10-19  8:07   ` zhangqilong
  0 siblings, 0 replies; 3+ messages in thread
From: zhangqilong @ 2020-10-19  8:07 UTC (permalink / raw)
  To: ocfs2-devel

Hi, Joseph

I think it makes sense, the 'begin' trace entry will always be paired 
with 'end'. For the post processing the trace, it would be easier to 
reconstruct such reading block operation and mark immediately as 'not sent' (avoiding 
to bother about entries which only have 'begin'). Logging an error message could help 
locate problems quickly in case error.
It looks good to me, so feel free to add it.

Best wish, thanks,
Zhang Qilong

> -----????-----
> ???: Joseph Qi [mailto:joseph.qi at linux.alibaba.com]
> ????: 2020?10?19? 15:46
> ???: zhangqilong <zhangqilong3@huawei.com>; mark at fasheh.com;
> jlbec at evilplan.org
> ??: ocfs2-devel at oss.oracle.com
> ??: Re: [patch -next] ocfs2: Add the trace_ocfs2_read_blocks_end
> 
> 
> 
> On 2020/10/16 17:11, Zhang Qilong wrote:
> > Missing the trace_ocfs2_read_blocks_end when reading blocks fails.>
> Why do you need the trace in case error?
> In general, it will log an error message if fail.
> 
> Thanks,
> Joseph
> 
> > Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> > ---
> >  fs/ocfs2/buffer_head_io.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c
> > index f0b104e483d8..0e6ee6e9b201 100644
> > --- a/fs/ocfs2/buffer_head_io.c
> > +++ b/fs/ocfs2/buffer_head_io.c
> > @@ -395,11 +395,10 @@ int ocfs2_read_blocks(struct ocfs2_caching_info
> *ci, u64 block, int nr,
> >  	}
> >  	ocfs2_metadata_cache_io_unlock(ci);
> >
> > +bail:
> >  	trace_ocfs2_read_blocks_end((unsigned long long)block, nr,
> >  				    flags, ignore_cache);
> >
> > -bail:
> > -
> >  	return status;
> >  }
> >
> >

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16  9:11 [Ocfs2-devel] [patch -next] ocfs2: Add the trace_ocfs2_read_blocks_end Zhang Qilong
2020-10-19  7:46 ` Joseph Qi
2020-10-19  8:07   ` [Ocfs2-devel] 答复: " zhangqilong

OCFS2-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/ocfs2-devel/0 ocfs2-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ocfs2-devel ocfs2-devel/ https://lore.kernel.org/ocfs2-devel \
		ocfs2-devel@oss.oracle.com
	public-inbox-index ocfs2-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.oracle.oss.ocfs2-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git