Re: [PATCH 1/1] btrfs: add kernel scrub log messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 12/17/2018 02:39 PM, Nikolay Borisov wrote:


On 17.12.18 г. 5:15 ч., Anand Jain wrote:
scrub kernel messages helps debug and audit, add them to the log.

Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
  fs/btrfs/scrub.c | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 902819d3cf41..d7a92521019e 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3876,6 +3876,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
  	mutex_unlock(&fs_info->scrub_lock);
if (!is_dev_replace) {
+		btrfs_info(fs_info, "scrub: devid %llu %s", devid, "started");

Perhahps those messages needs to be with btrfs_debug, since they are
only really useful when someone is debugging otherwise we will make
btrfs rather noisy.

 Not really, its part of audit as well, it should be info. It helps to
 understand the maintenance history of the FS.

Thanks, Anand

  		/*
  		 * by holding device list mutex, we can
  		 * kick off writing super in log tree sync.
@@ -3897,6 +3898,10 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
  	if (progress)
  		memcpy(progress, &sctx->stat, sizeof(*progress));
+ if (!is_dev_replace)
+		btrfs_info(fs_info, "scrub: devid %llu %s:%d",
+			   devid, ret ? "not finished":"finished", ret);
+
  	mutex_lock(&fs_info->scrub_lock);
  	dev->scrub_ctx = NULL;
  	scrub_workers_put(fs_info);




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux