Commit 504634f6 authored by Shaohua Li's avatar Shaohua Li

md: add blktrace event for writes to superblock

superblock write is an expensive operation. With raid5-cache, it can be called
regularly. Tracing to help performance debug.
Signed-off-by: default avatarShaohua Li <shli@fb.com>
Cc: NeilBrown <neilb@suse.com>
parent 578b54ad
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
#include <linux/raid/md_p.h> #include <linux/raid/md_p.h>
#include <linux/raid/md_u.h> #include <linux/raid/md_u.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <trace/events/block.h>
#include "md.h" #include "md.h"
#include "bitmap.h" #include "bitmap.h"
#include "md-cluster.h" #include "md-cluster.h"
...@@ -2403,6 +2404,8 @@ void md_update_sb(struct mddev *mddev, int force_change) ...@@ -2403,6 +2404,8 @@ void md_update_sb(struct mddev *mddev, int force_change)
pr_debug("md: updating %s RAID superblock on device (in sync %d)\n", pr_debug("md: updating %s RAID superblock on device (in sync %d)\n",
mdname(mddev), mddev->in_sync); mdname(mddev), mddev->in_sync);
if (mddev->queue)
blk_add_trace_msg(mddev->queue, "md md_update_sb");
bitmap_update_sb(mddev->bitmap); bitmap_update_sb(mddev->bitmap);
rdev_for_each(rdev, mddev) { rdev_for_each(rdev, mddev) {
char b[BDEVNAME_SIZE]; char b[BDEVNAME_SIZE];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment