Commit d1e14420 authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: scrub: print messages when started or finished

The kernel log messages help debugging and audit, add them for scrub
Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ce3ded10
...@@ -3903,6 +3903,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start, ...@@ -3903,6 +3903,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
*/ */
nofs_flag = memalloc_nofs_save(); nofs_flag = memalloc_nofs_save();
if (!is_dev_replace) { if (!is_dev_replace) {
btrfs_info(fs_info, "scrub: started on devid %llu", devid);
/* /*
* by holding device list mutex, we can * by holding device list mutex, we can
* kick off writing super in log tree sync. * kick off writing super in log tree sync.
...@@ -3925,6 +3926,10 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start, ...@@ -3925,6 +3926,10 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
if (progress) if (progress)
memcpy(progress, &sctx->stat, sizeof(*progress)); memcpy(progress, &sctx->stat, sizeof(*progress));
if (!is_dev_replace)
btrfs_info(fs_info, "scrub: %s on devid %llu with status: %d",
ret ? "not finished" : "finished", devid, ret);
mutex_lock(&fs_info->scrub_lock); mutex_lock(&fs_info->scrub_lock);
dev->scrub_ctx = NULL; dev->scrub_ctx = NULL;
scrub_workers_put(fs_info); scrub_workers_put(fs_info);
......
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