diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2013-04-23 03:38:02 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-04-23 03:40:43 -0400 |
commit | 848753aa3b19a6513315ca54f22ba1e2732ea94a (patch) | |
tree | ce20c2bc01505b67a9ce3fe0291b84bff22dde5d /fs/f2fs | |
parent | 51dd62493477923723c797c6da60121ed39900ed (diff) |
f2fs: add tracepoint for tracing the page i/o
Add tracepoints for page i/o operations and block allocation
tracing during page read operation.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Pankaj Kumar <pankaj.km@samsung.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
[Jaegeuk: combine and modify the tracepoint structures]
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 3c31ec7d633d..8e8b14d714fc 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "f2fs.h" | 21 | #include "f2fs.h" |
22 | #include "node.h" | 22 | #include "node.h" |
23 | #include "segment.h" | 23 | #include "segment.h" |
24 | #include <trace/events/f2fs.h> | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * Lock ordering for the change of data block address: | 27 | * Lock ordering for the change of data block address: |
@@ -348,6 +349,8 @@ int f2fs_readpage(struct f2fs_sb_info *sbi, struct page *page, | |||
348 | struct block_device *bdev = sbi->sb->s_bdev; | 349 | struct block_device *bdev = sbi->sb->s_bdev; |
349 | struct bio *bio; | 350 | struct bio *bio; |
350 | 351 | ||
352 | trace_f2fs_readpage(page, blk_addr, type); | ||
353 | |||
351 | down_read(&sbi->bio_sem); | 354 | down_read(&sbi->bio_sem); |
352 | 355 | ||
353 | /* Allocate a new bio */ | 356 | /* Allocate a new bio */ |
@@ -388,14 +391,18 @@ static int get_data_block_ro(struct inode *inode, sector_t iblock, | |||
388 | /* Get the page offset from the block offset(iblock) */ | 391 | /* Get the page offset from the block offset(iblock) */ |
389 | pgofs = (pgoff_t)(iblock >> (PAGE_CACHE_SHIFT - blkbits)); | 392 | pgofs = (pgoff_t)(iblock >> (PAGE_CACHE_SHIFT - blkbits)); |
390 | 393 | ||
391 | if (check_extent_cache(inode, pgofs, bh_result)) | 394 | if (check_extent_cache(inode, pgofs, bh_result)) { |
395 | trace_f2fs_get_data_block(inode, iblock, bh_result, 0); | ||
392 | return 0; | 396 | return 0; |
397 | } | ||
393 | 398 | ||
394 | /* When reading holes, we need its node page */ | 399 | /* When reading holes, we need its node page */ |
395 | set_new_dnode(&dn, inode, NULL, NULL, 0); | 400 | set_new_dnode(&dn, inode, NULL, NULL, 0); |
396 | err = get_dnode_of_data(&dn, pgofs, LOOKUP_NODE_RA); | 401 | err = get_dnode_of_data(&dn, pgofs, LOOKUP_NODE_RA); |
397 | if (err) | 402 | if (err) { |
403 | trace_f2fs_get_data_block(inode, iblock, bh_result, err); | ||
398 | return (err == -ENOENT) ? 0 : err; | 404 | return (err == -ENOENT) ? 0 : err; |
405 | } | ||
399 | 406 | ||
400 | /* It does not support data allocation */ | 407 | /* It does not support data allocation */ |
401 | BUG_ON(create); | 408 | BUG_ON(create); |
@@ -420,6 +427,7 @@ static int get_data_block_ro(struct inode *inode, sector_t iblock, | |||
420 | bh_result->b_size = (i << blkbits); | 427 | bh_result->b_size = (i << blkbits); |
421 | } | 428 | } |
422 | f2fs_put_dnode(&dn); | 429 | f2fs_put_dnode(&dn); |
430 | trace_f2fs_get_data_block(inode, iblock, bh_result, 0); | ||
423 | return 0; | 431 | return 0; |
424 | } | 432 | } |
425 | 433 | ||