summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-04-15 14:09:38 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-04-19 11:00:43 -0700
commit0243a5f9daf149654dc68c49783b27760f513cc1 (patch)
tree7a079e1ee270bae4d88bf8a0c64c37be0c92bcf2 /fs/f2fs
parentba48a33ef6faa573257b2a4181329f2d1eaafed9 (diff)
f2fs: trace __submit_discard_cmd
Add an even class f2fs_discard for introducing f2fs_queue_discard, then use f2fs_{queue,issue}_discard to trace __{queue,submit}_discard_cmd. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/segment.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index f026f70559eb..8da49a1750da 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -763,6 +763,8 @@ static void __submit_discard_cmd(struct f2fs_sb_info *sbi,
if (dc->state != D_PREP)
return;
+ trace_f2fs_issue_discard(dc->bdev, dc->start, dc->len);
+
dc->error = __blkdev_issue_discard(dc->bdev,
SECTOR_FROM_BLOCK(dc->start),
SECTOR_FROM_BLOCK(dc->len),
@@ -942,7 +944,7 @@ static int __queue_discard_cmd(struct f2fs_sb_info *sbi,
{
block_t lblkstart = blkstart;
- trace_f2fs_issue_discard(bdev, blkstart, blklen);
+ trace_f2fs_queue_discard(bdev, blkstart, blklen);
if (sbi->s_ndevs) {
int devi = f2fs_target_device_index(sbi, blkstart);