* [PATCH] f2fs: make sure trace all f2fs_issue_flush [not found] <bec97aa1-52a5-b76f-d910-5267ff3e55c4@gmail.com> @ 2017-03-04 14:13 ` Kinglong Mee 2017-03-06 11:10 ` Chao Yu 0 siblings, 1 reply; 2+ messages in thread From: Kinglong Mee @ 2017-03-04 14:13 UTC (permalink / raw) To: Jaegeuk Kim, linux-f2fs-devel, Chao Yu, Kinglong Mee The root device's issue flush trace is missing, add it and tracing the result from submit. Fixes d50aaeec90 ("f2fs: show actual device info in tracepoints") Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> --- fs/f2fs/segment.c | 24 +++++++++++++----------- include/trace/events/f2fs.h | 11 +++++++---- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index ed181d1..94bc8ac 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -411,7 +411,8 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi) } } -static int __submit_flush_wait(struct block_device *bdev) +static int __submit_flush_wait(struct f2fs_sb_info *sbi, + struct block_device *bdev) { struct bio *bio = f2fs_bio_alloc(0); int ret; @@ -420,23 +421,24 @@ static int __submit_flush_wait(struct block_device *bdev) bio->bi_bdev = bdev; ret = submit_bio_wait(bio); bio_put(bio); + + trace_f2fs_issue_flush(bdev, test_opt(sbi, NOBARRIER), + test_opt(sbi, FLUSH_MERGE), ret); return ret; } static int submit_flush_wait(struct f2fs_sb_info *sbi) { - int ret = __submit_flush_wait(sbi->sb->s_bdev); + int ret = __submit_flush_wait(sbi, sbi->sb->s_bdev); int i; - if (sbi->s_ndevs && !ret) { - for (i = 1; i < sbi->s_ndevs; i++) { - trace_f2fs_issue_flush(FDEV(i).bdev, - test_opt(sbi, NOBARRIER), - test_opt(sbi, FLUSH_MERGE)); - ret = __submit_flush_wait(FDEV(i).bdev); - if (ret) - break; - } + if (!sbi->s_ndevs || ret) + return ret; + + for (i = 1; i < sbi->s_ndevs; i++) { + ret = __submit_flush_wait(sbi, FDEV(i).bdev); + if (ret) + break; } return ret; } diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index c80fcad0..d799ca7 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -1174,26 +1174,29 @@ TRACE_EVENT(f2fs_issue_reset_zone, TRACE_EVENT(f2fs_issue_flush, TP_PROTO(struct block_device *dev, unsigned int nobarrier, - unsigned int flush_merge), + unsigned int flush_merge, int ret), - TP_ARGS(dev, nobarrier, flush_merge), + TP_ARGS(dev, nobarrier, flush_merge, ret), TP_STRUCT__entry( __field(dev_t, dev) __field(unsigned int, nobarrier) __field(unsigned int, flush_merge) + __field(int, ret) ), TP_fast_assign( __entry->dev = dev->bd_dev; __entry->nobarrier = nobarrier; __entry->flush_merge = flush_merge; + __entry->ret = ret; ), - TP_printk("dev = (%d,%d), %s %s", + TP_printk("dev = (%d,%d), %s %s, ret = %d", show_dev(__entry->dev), __entry->nobarrier ? "skip (nobarrier)" : "issue", - __entry->flush_merge ? " with flush_merge" : "") + __entry->flush_merge ? " with flush_merge" : "", + __entry->ret) ); TRACE_EVENT(f2fs_lookup_extent_tree_start, -- 2.9.3 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] f2fs: make sure trace all f2fs_issue_flush 2017-03-04 14:13 ` [PATCH] f2fs: make sure trace all f2fs_issue_flush Kinglong Mee @ 2017-03-06 11:10 ` Chao Yu 0 siblings, 0 replies; 2+ messages in thread From: Chao Yu @ 2017-03-06 11:10 UTC (permalink / raw) To: Kinglong Mee, Jaegeuk Kim, linux-f2fs-devel On 2017/3/4 22:13, Kinglong Mee wrote: > The root device's issue flush trace is missing, > add it and tracing the result from submit. > > Fixes d50aaeec90 ("f2fs: show actual device info in tracepoints") > Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Thanks, > --- > fs/f2fs/segment.c | 24 +++++++++++++----------- > include/trace/events/f2fs.h | 11 +++++++---- > 2 files changed, 20 insertions(+), 15 deletions(-) > > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c > index ed181d1..94bc8ac 100644 > --- a/fs/f2fs/segment.c > +++ b/fs/f2fs/segment.c > @@ -411,7 +411,8 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi) > } > } > > -static int __submit_flush_wait(struct block_device *bdev) > +static int __submit_flush_wait(struct f2fs_sb_info *sbi, > + struct block_device *bdev) > { > struct bio *bio = f2fs_bio_alloc(0); > int ret; > @@ -420,23 +421,24 @@ static int __submit_flush_wait(struct block_device *bdev) > bio->bi_bdev = bdev; > ret = submit_bio_wait(bio); > bio_put(bio); > + > + trace_f2fs_issue_flush(bdev, test_opt(sbi, NOBARRIER), > + test_opt(sbi, FLUSH_MERGE), ret); > return ret; > } > > static int submit_flush_wait(struct f2fs_sb_info *sbi) > { > - int ret = __submit_flush_wait(sbi->sb->s_bdev); > + int ret = __submit_flush_wait(sbi, sbi->sb->s_bdev); > int i; > > - if (sbi->s_ndevs && !ret) { > - for (i = 1; i < sbi->s_ndevs; i++) { > - trace_f2fs_issue_flush(FDEV(i).bdev, > - test_opt(sbi, NOBARRIER), > - test_opt(sbi, FLUSH_MERGE)); > - ret = __submit_flush_wait(FDEV(i).bdev); > - if (ret) > - break; > - } > + if (!sbi->s_ndevs || ret) > + return ret; > + > + for (i = 1; i < sbi->s_ndevs; i++) { > + ret = __submit_flush_wait(sbi, FDEV(i).bdev); > + if (ret) > + break; > } > return ret; > } > diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h > index c80fcad0..d799ca7 100644 > --- a/include/trace/events/f2fs.h > +++ b/include/trace/events/f2fs.h > @@ -1174,26 +1174,29 @@ TRACE_EVENT(f2fs_issue_reset_zone, > TRACE_EVENT(f2fs_issue_flush, > > TP_PROTO(struct block_device *dev, unsigned int nobarrier, > - unsigned int flush_merge), > + unsigned int flush_merge, int ret), > > - TP_ARGS(dev, nobarrier, flush_merge), > + TP_ARGS(dev, nobarrier, flush_merge, ret), > > TP_STRUCT__entry( > __field(dev_t, dev) > __field(unsigned int, nobarrier) > __field(unsigned int, flush_merge) > + __field(int, ret) > ), > > TP_fast_assign( > __entry->dev = dev->bd_dev; > __entry->nobarrier = nobarrier; > __entry->flush_merge = flush_merge; > + __entry->ret = ret; > ), > > - TP_printk("dev = (%d,%d), %s %s", > + TP_printk("dev = (%d,%d), %s %s, ret = %d", > show_dev(__entry->dev), > __entry->nobarrier ? "skip (nobarrier)" : "issue", > - __entry->flush_merge ? " with flush_merge" : "") > + __entry->flush_merge ? " with flush_merge" : "", > + __entry->ret) > ); > > TRACE_EVENT(f2fs_lookup_extent_tree_start, > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-06 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <bec97aa1-52a5-b76f-d910-5267ff3e55c4@gmail.com>
2017-03-04 14:13 ` [PATCH] f2fs: make sure trace all f2fs_issue_flush Kinglong Mee
2017-03-06 11:10 ` Chao Yu
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).