All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@libero.it>
To: linux-btrfs@vger.kernel.org
Cc: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>,
	Qu Wenruo <quwenruo.btrfs@gmx.com>,
	David Sterba <dsterba@suse.com>,
	Graham Cobb <g.btrfs@cobb.uk.net>,
	Goffredo Baroncelli <kreijack@inwind.it>
Subject: [PATCH 3/5] Add check for multiple profile in btrfs fi us
Date: Sat,  4 Apr 2020 12:32:10 +0200	[thread overview]
Message-ID: <20200404103212.40986-4-kreijack@libero.it> (raw)
In-Reply-To: <20200404103212.40986-1-kreijack@libero.it>

From: Goffredo Baroncelli <kreijack@inwind.it>

A new line in the "Overall" section is added to inform that a 
'Multiple profile' is present.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
---
 cmds/filesystem-usage.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cmds/filesystem-usage.c b/cmds/filesystem-usage.c
index aa7065d5..742b4ea4 100644
--- a/cmds/filesystem-usage.c
+++ b/cmds/filesystem-usage.c
@@ -492,6 +492,11 @@ static int print_filesystem_usage_overall(int fd, struct chunk_info *chunkinfo,
 	printf("    Global reserve:\t\t%*s\t(used: %s)\n", width,
 		pretty_size_mode(l_global_reserve, unit_mode),
 		pretty_size_mode(l_global_reserve_used, unit_mode));
+	if (btrfs_test_for_mixed_profiles_by_fd(fd) > 0)
+		printf("    Multiple profile:\t\t%*s\n", width, "YES");
+	else
+		printf("    Multiple profile:\t\t%*s\n", width, "no");
+
 
 exit:
 
-- 
2.26.0


  parent reply	other threads:[~2020-04-04 10:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-04 10:32 [PATCH v3] btrfs-progs: add warning for mixed profiles filesystem Goffredo Baroncelli
2020-04-04 10:32 ` [PATCH 1/5] btrfs-progs: Add code for checking mixed profile function Goffredo Baroncelli
2020-04-04 10:32 ` [PATCH 2/5] btrfs-progs: Add mixed profiles check to some btrfs sub-commands Goffredo Baroncelli
2020-04-04 10:32 ` Goffredo Baroncelli [this message]
2020-04-04 10:32 ` [PATCH 4/5] Add further check in btrfs subcommand Goffredo Baroncelli
2020-04-04 10:32 ` [PATCH 5/5] Update the man page in order to give a guideline about mixed profiles Goffredo Baroncelli
2020-04-06 17:57 ` [PATCH v3] btrfs-progs: add warning for mixed profiles filesystem David Sterba
2020-04-30 16:09   ` David Sterba
2020-04-30 13:37 ` Johannes Thumshirn
2020-04-30 14:04   ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200404103212.40986-4-kreijack@libero.it \
    --to=kreijack@libero.it \
    --cc=ce3g8jdj@umail.furryterror.org \
    --cc=dsterba@suse.com \
    --cc=g.btrfs@cobb.uk.net \
    --cc=kreijack@inwind.it \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.