Linux-BTRFS Archive on lore.kernel.org
 help / color / Atom feed
* [patch 0/2] Control filesystem balances (kernel side)
@ 2010-10-30  0:07 Hugo Mills
  2010-10-30  0:07 ` [patch 1/2] Balance progress monitoring Hugo Mills
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Hugo Mills @ 2010-10-30  0:07 UTC (permalink / raw)
  To: linux-btrfs

   These two patches give a degree of control over balance operations.
The first makes it possible to get an idea of how much work remains to
do, by tracking the number of block groups (chunks) that need to be
moved/rewritten. The second patch allows a running balance operation
to be cancelled when the current block group has been moved.

   One fundamental question, though -- is the progress monitor
function best implemented as an ioctl, as I've done here, or should it
be two or three sysfs files? I'm thinking of /proc/mdstat...
Obviously, /proc/mdstat would never get into /sys, but exposing the
"expected" and "remaining" values as files has an attractive
simplicity to it.

   The user-space side of things are in a separate patch series, to
follow.

   Please be gentle with me, this is my first (serious, non-trivial)
kernel patch. :)

   Hugo.


-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
   --- "No!  My collection of rare, incurable diseases! Violated!" ---   


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [patch 0/2] Control filesystem balances (userspace)
@ 2010-10-30  0:10 Hugo Mills
  2010-10-30  0:10 ` [patch 1/2] Balance progress monitoring Hugo Mills
  0 siblings, 1 reply; 15+ messages in thread
From: Hugo Mills @ 2010-10-30  0:10 UTC (permalink / raw)
  To: linux-btrfs

   These two patches complement the previous two kernel-side
patches. The first implements a way of displaying the current progress
of any running balance process. The second patch allows a running
balance to be cancelled.

   I'm a bit uncertain about the best name for these commands. Several
options:

1)
# btrfs filesystem progress <path>
# btrfs filesystem cancel <path>

   Way too vague (cancel *what*?)


2)
# btrfs filesystem balance-progress <path>
# btrfs filesystem balance-cancel <path>

   Clashes horribly with "filesystem balance" -- no abbreviations
possible.


3)
btrfs filesystem balance -p <path>
btrfs filesystem balance -c <path>

   Changes behaviour significantly on a switch, in contrast to the
behaviour of the rest of the btrfs tool.


4)
btrfs balance progress <path>
btrfs balance cancel <path>

   My current favourite, although we introduce a new namespace
("balance") for commands. We could add "btrfs balance start <path>" as
a synonym for "btrfs filesystem balance <path>", for some degree of
consistency.

   At some point, I'll add a "monitor" function, which will poll at 1s
intervals for progress updates, and print out progress when it changes.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
   --- "No!  My collection of rare, incurable diseases! Violated!" ---   


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, back to index

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-30  0:07 [patch 0/2] Control filesystem balances (kernel side) Hugo Mills
2010-10-30  0:07 ` [patch 1/2] Balance progress monitoring Hugo Mills
2010-10-30 13:37   ` Hugo Mills
2010-10-30 13:39   ` [patch 1/2] Balance progress monitoring (updated) Hugo Mills
2010-11-01  8:06     ` liubo
2010-11-01 12:55       ` Hugo Mills
2010-11-02  0:51         ` liubo
2010-10-30  0:07 ` [patch 2/2] Cancel filesystem balance Hugo Mills
2010-10-30 17:44 ` [patch 0/2] Control filesystem balances (kernel side) Goffredo Baroncelli
2010-11-01 12:58   ` Xavier Nicollet
2010-11-01 12:52     ` Tomasz Torcz
2010-11-01 13:05   ` Hugo Mills
2010-11-04 22:55   ` RFC: exporting info via sysfs [was Re: [patch 0/2] Control filesystem balances (kernel side)] Goffredo Baroncelli
2010-11-05 12:41     ` Hugo Mills
2010-10-30  0:10 [patch 0/2] Control filesystem balances (userspace) Hugo Mills
2010-10-30  0:10 ` [patch 1/2] Balance progress monitoring Hugo Mills

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org
	public-inbox-index linux-btrfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git