diff options
author | Zheng Liu <wenqing.lz@taobao.com> | 2012-11-08 21:57:33 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-11-08 21:57:33 -0500 |
commit | 992e9fdd7b3f656ab8aea895f0038336950774ed (patch) | |
tree | ac01802bc117516b111d1a3bd5f88617618bd8ca /fs/ext4/extents_status.c | |
parent | 51865fda28e585bdcc164474ff6438a9ccdbfada (diff) |
ext4: add some tracepoints in extent status tree
This patch adds some tracepoints in extent status tree.
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents_status.c')
-rw-r--r-- | fs/ext4/extents_status.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c index 02c09be3d773..564d981a2fcc 100644 --- a/fs/ext4/extents_status.c +++ b/fs/ext4/extents_status.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include "extents_status.h" | 14 | #include "extents_status.h" |
15 | #include "ext4_extents.h" | 15 | #include "ext4_extents.h" |
16 | 16 | ||
17 | #include <trace/events/ext4.h> | ||
18 | |||
17 | /* | 19 | /* |
18 | * According to previous discussion in Ext4 Developer Workshop, we | 20 | * According to previous discussion in Ext4 Developer Workshop, we |
19 | * will introduce a new structure called io tree to track all extent | 21 | * will introduce a new structure called io tree to track all extent |
@@ -224,6 +226,8 @@ ext4_lblk_t ext4_es_find_extent(struct inode *inode, struct extent_status *es) | |||
224 | struct rb_node *node; | 226 | struct rb_node *node; |
225 | ext4_lblk_t ret = EXT_MAX_BLOCKS; | 227 | ext4_lblk_t ret = EXT_MAX_BLOCKS; |
226 | 228 | ||
229 | trace_ext4_es_find_extent_enter(inode, es->start); | ||
230 | |||
227 | read_lock(&EXT4_I(inode)->i_es_lock); | 231 | read_lock(&EXT4_I(inode)->i_es_lock); |
228 | tree = &EXT4_I(inode)->i_es_tree; | 232 | tree = &EXT4_I(inode)->i_es_tree; |
229 | 233 | ||
@@ -253,6 +257,8 @@ out: | |||
253 | } | 257 | } |
254 | 258 | ||
255 | read_unlock(&EXT4_I(inode)->i_es_lock); | 259 | read_unlock(&EXT4_I(inode)->i_es_lock); |
260 | |||
261 | trace_ext4_es_find_extent_exit(inode, es, ret); | ||
256 | return ret; | 262 | return ret; |
257 | } | 263 | } |
258 | 264 | ||
@@ -393,6 +399,7 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t offset, | |||
393 | struct ext4_es_tree *tree; | 399 | struct ext4_es_tree *tree; |
394 | int err = 0; | 400 | int err = 0; |
395 | 401 | ||
402 | trace_ext4_es_insert_extent(inode, offset, len); | ||
396 | es_debug("add [%u/%u) to extent status tree of inode %lu\n", | 403 | es_debug("add [%u/%u) to extent status tree of inode %lu\n", |
397 | offset, len, inode->i_ino); | 404 | offset, len, inode->i_ino); |
398 | 405 | ||
@@ -422,6 +429,7 @@ int ext4_es_remove_extent(struct inode *inode, ext4_lblk_t offset, | |||
422 | ext4_lblk_t len1, len2, end; | 429 | ext4_lblk_t len1, len2, end; |
423 | int err = 0; | 430 | int err = 0; |
424 | 431 | ||
432 | trace_ext4_es_remove_extent(inode, offset, len); | ||
425 | es_debug("remove [%u/%u) from extent status tree of inode %lu\n", | 433 | es_debug("remove [%u/%u) from extent status tree of inode %lu\n", |
426 | offset, len, inode->i_ino); | 434 | offset, len, inode->i_ino); |
427 | 435 | ||