linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: David Disseldorp <ddiss@suse.de>
Cc: Nikolay Borisov <nborisov@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/1] btrfs-progs: btrfstune: print seeding status
Date: Fri, 4 Jan 2019 20:09:06 +0800	[thread overview]
Message-ID: <d254c9ce-1c7f-5530-5dcb-a5ffedda0723@oracle.com> (raw)
In-Reply-To: <20190104112645.2a39eca8@suse.de>


I agree btrfstune should have ability to read the parameter. But none of 
the btrsftune parameter [1] which it sets, aren't readable using 
btrfstune. So can we first design how are going to do it for rest of 
the parameters in btrfstune then later this patch can just fix for seed.

[1]
usage: btrfstune [options] device
	-S value	positive value will enable seeding, zero to disable, negative 
is not allowed
	-r 		enable extended inode refs
	-x 		enable skinny metadata extent refs
	-n 		enable no-holes feature (more efficient sparse file representation)
	-f 		force to do dangerous operation, make sure that you are aware of 
the dangers
	-u 		change fsid, use a random one
	-U UUID		change fsid to UUID


One suggestion
    btrfstune read -<S|r|x|n|u> <dev>




On 01/04/2019 06:26 PM, David Disseldorp wrote:
> On Fri, 4 Jan 2019 09:05:00 +0200, Nikolay Borisov wrote:
> 
>> btrfs inspect-internal dump-super already supports showing seeding, why
>> do we need btrfstune support for that as well?
> 
> Ah, I wasn't aware of that. IMO the logical place to look is next to
> where the user enables seeding (btrfstune -S1).
> 
>> Also the way you've
>> phrased is a bit misleading, since checking the superflag doesn't mean
>> seeding for a particular _device_ is enabled but that the filesystem
>> itself is set as seeding.
> 
> Not quite sure I follow. For a multi-dev FS (one seeding), I see:
> 
> rapido1:/# btrfstune -s /dev/zram0
> Seeding flag is currently unset
> rapido1:/# btrfstune -S 1 /dev/zram0
> rapido1:/# btrfstune -s /dev/zram0
> Seeding flag is currently set
> rapido1:/# mount /dev/zram0 /mnt/test/
> mount: /dev/zram0 is write-protected, mounting read-only
> ....
> rapido1:/# btrfs device add -f /dev/zram1 /mnt/test/
> [   77.805374] BTRFS info (device zram0): disk added /dev/zram1
> rapido1:/# umount /mnt/test/
> rapido1:/# btrfstune -s /dev/zram1
> Seeding flag is currently unset
> rapido1:/# btrfstune -s /dev/zram0
> Seeding flag is currently set
> 
> Cheers, David
> 

  reply	other threads:[~2019-01-04 12:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-03 23:22 [PATCH 0/1] btrfs-progs: btrfstune: print seeding status David Disseldorp
2019-01-03 23:22 ` [PATCH 1/1] " David Disseldorp
2019-01-04  7:05   ` Nikolay Borisov
2019-01-04 10:26     ` David Disseldorp
2019-01-04 12:09       ` Anand Jain [this message]
2019-01-04 13:18       ` Nikolay Borisov
2019-01-04 13:34         ` David Disseldorp
2019-01-05  5:45           ` Anand Jain

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=d254c9ce-1c7f-5530-5dcb-a5ffedda0723@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=ddiss@suse.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).