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 via email to