diff options
author | Anand Jain <anand.jain@oracle.com> | 2018-11-20 09:12:57 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 14:51:39 +0100 |
commit | 7333bd02dcb7cefa91eb94efb8e7578ec764145c (patch) | |
tree | 0d8474a40f6230c73032c171fafa59ef8e50d6a2 /fs/btrfs/volumes.c | |
parent | btrfs: balance: print args during start and resume (diff) | |
download | linux-7333bd02dcb7cefa91eb94efb8e7578ec764145c.tar.xz linux-7333bd02dcb7cefa91eb94efb8e7578ec764145c.zip |
btrfs: balance: print to system log when balance ends or is paused
Print a kernel log message when the balance ends, either for cancel or
completed or if it is paused.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index cdba4f03d465..2085d4d3a6fe 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -4287,6 +4287,13 @@ int btrfs_balance(struct btrfs_fs_info *fs_info, ret = __btrfs_balance(fs_info); mutex_lock(&fs_info->balance_mutex); + if (ret == -ECANCELED && atomic_read(&fs_info->balance_pause_req)) + btrfs_info(fs_info, "balance: paused"); + else if (ret == -ECANCELED && atomic_read(&fs_info->balance_cancel_req)) + btrfs_info(fs_info, "balance: canceled"); + else + btrfs_info(fs_info, "balance: ended with status: %d", ret); + clear_bit(BTRFS_FS_BALANCE_RUNNING, &fs_info->flags); if (bargs) { |