|
@@ -27,6 +27,7 @@
|
|
#include <linux/mount.h>
|
|
#include <linux/mount.h>
|
|
#include <linux/buffer_head.h>
|
|
#include <linux/buffer_head.h>
|
|
#include <linux/seq_file.h>
|
|
#include <linux/seq_file.h>
|
|
|
|
+#include <trace/events/block.h>
|
|
#include "md.h"
|
|
#include "md.h"
|
|
#include "bitmap.h"
|
|
#include "bitmap.h"
|
|
|
|
|
|
@@ -1008,8 +1009,12 @@ void bitmap_unplug(struct bitmap *bitmap)
|
|
need_write = test_and_clear_page_attr(bitmap, i,
|
|
need_write = test_and_clear_page_attr(bitmap, i,
|
|
BITMAP_PAGE_NEEDWRITE);
|
|
BITMAP_PAGE_NEEDWRITE);
|
|
if (dirty || need_write) {
|
|
if (dirty || need_write) {
|
|
- if (!writing)
|
|
|
|
|
|
+ if (!writing) {
|
|
bitmap_wait_writes(bitmap);
|
|
bitmap_wait_writes(bitmap);
|
|
|
|
+ if (bitmap->mddev->queue)
|
|
|
|
+ blk_add_trace_msg(bitmap->mddev->queue,
|
|
|
|
+ "md bitmap_unplug");
|
|
|
|
+ }
|
|
clear_page_attr(bitmap, i, BITMAP_PAGE_PENDING);
|
|
clear_page_attr(bitmap, i, BITMAP_PAGE_PENDING);
|
|
write_page(bitmap, bitmap->storage.filemap[i], 0);
|
|
write_page(bitmap, bitmap->storage.filemap[i], 0);
|
|
writing = 1;
|
|
writing = 1;
|
|
@@ -1234,6 +1239,10 @@ void bitmap_daemon_work(struct mddev *mddev)
|
|
}
|
|
}
|
|
bitmap->allclean = 1;
|
|
bitmap->allclean = 1;
|
|
|
|
|
|
|
|
+ if (bitmap->mddev->queue)
|
|
|
|
+ blk_add_trace_msg(bitmap->mddev->queue,
|
|
|
|
+ "md bitmap_daemon_work");
|
|
|
|
+
|
|
/* Any file-page which is PENDING now needs to be written.
|
|
/* Any file-page which is PENDING now needs to be written.
|
|
* So set NEEDWRITE now, then after we make any last-minute changes
|
|
* So set NEEDWRITE now, then after we make any last-minute changes
|
|
* we will write it.
|
|
* we will write it.
|