All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 1/8] Balance progress monitoring.
From: Hugo Mills @ 2011-04-10 21:16 UTC (permalink / raw)

In-Reply-To: <cover.1302469689.git.hugo@carfax.org.uk>

This patch introduces a basic form of progress monitoring for balance
operations, by counting the number of block groups remaining. The
information is exposed to userspace by an ioctl.

We also add "btrfs balance start" as an alias for "btrfs filesystem
balance", so that all balance-related functions are available under
one prefix.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
---
 btrfs.c        |    8 +++++++
 btrfs_cmds.c   |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 btrfs_cmds.h   |    1 +
 ioctl.h        |    7 ++++++
 man/btrfs.8.in |   11 ++++++++++
 5 files changed, 87 insertions(+), 0 deletions(-)

diff --git a/btrfs.c b/btrfs.c
index 46314cf..0b6186c 100644
--- a/btrfs.c
+++ b/btrfs.c
@@ -95,6 +95,14 @@ static struct Command commands[] = {
 	  "filesystem balance", "<path>\n"
 		"Balance the chunks across the device."
 	},
+	{ do_balance, 1,
+	  "balance start", "<path>\n"
+		"Synonym for \"btrfs filesystem balance\"."
+	},
+	{ do_balance_progress, -1,
+	  "balance progress", "[-m|--monitor] <path>\n"
+		"Show progress of the balance operation running on <path>."
+	},
 	{ do_scan,
 	  999, "device scan", "[<device> [<device>..]\n"
 		"Scan all device for or the passed device for a btrfs\n"
diff --git a/btrfs_cmds.c b/btrfs_cmds.c
index 8031c58..2745d64 100644
--- a/btrfs_cmds.c
+++ b/btrfs_cmds.c
@@ -28,6 +28,7 @@
 #include <limits.h>
 #include <uuid/uuid.h>
 #include <ctype.h>
+#include <getopt.h>
 
 #undef ULONG_MAX
 
@@ -776,6 +777,65 @@ int do_balance(int argc, char **argv)
 	}
 	return 0;
 }
+
+int get_balance_progress(char *path, struct btrfs_ioctl_balance_progress *bal)
+{
+	int fdmnt;
+	int ret = 0;
+	int err = 0;
+
+	fdmnt = open_file_or_dir(path);
+	if(fdmnt < 0) {
+		return -1;
+	}
+
+	ret = ioctl(fdmnt, BTRFS_IOC_BALANCE_PROGRESS, bal);
+	if(ret)
+		err = errno;
+	close(fdmnt);
+
+	return err;
+}
+
+int do_balance_progress(int argc, char **argv)
+{
+	char *path;
+	int ret = 0;
+	int err = 0;
+	struct btrfs_ioctl_balance_progress bal;
+
+	path = argv[1];
+
+	ret = get_balance_progress(path, &bal);
+	if (!ret)
+		printf("\r%llu/%llu block groups moved, "
+		       "%0.2f%% complete.\n",
+		       bal.completed,
+		       bal.expected,
+		       (float)bal.completed/bal.expected*100.0);
+
+	switch(ret) {
+	case 0:
+		break;
+	case -1:
+		fprintf(stderr, "ERROR: can't access '%s'\n", path);
+		return 13;
+	case EINVAL:
+		if (!monitor) {
+			fprintf(stderr,
+				"No balance operation running on '%s'.\n",
+				path);
+			return 20;
+		}
+		break;
+	default:
+		fprintf(stderr, "ERROR: ioctl returned error %d.", err);
+		return 21;
+	}
+
+	return 0;
+}
+
 int do_remove_volume(int nargs, char **args)
 {
 
diff --git a/btrfs_cmds.h b/btrfs_cmds.h
index 7bde191..47b0a27 100644
--- a/btrfs_cmds.h
+++ b/btrfs_cmds.h
@@ -23,6 +23,7 @@ int do_defrag(int argc, char **argv);
 int do_show_filesystem(int nargs, char **argv);
 int do_add_volume(int nargs, char **args);
 int do_balance(int nargs, char **argv);
+int do_balance_progress(int nargs, char **argv);
 int do_remove_volume(int nargs, char **args);
 int do_scan(int nargs, char **argv);
 int do_resize(int nargs, char **argv);
diff --git a/ioctl.h b/ioctl.h
index 776d7a9..f07d3a2 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -132,6 +132,11 @@ struct btrfs_ioctl_space_args {
 	struct btrfs_ioctl_space_info spaces[0];
 };
 
+struct btrfs_ioctl_balance_progress {
+	__u32 expected;
+	__u32 completed;
+};
+
 #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
 				   struct btrfs_ioctl_vol_args)
 #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
@@ -169,4 +174,6 @@ struct btrfs_ioctl_space_args {
 #define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64)
 #define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \
 				    struct btrfs_ioctl_space_args)
+#define BTRFS_IOC_BALANCE_PROGRESS _IOR(BTRFS_IOCTL_MAGIC, 25, \
+					struct btrfs_ioctl_balance_progress)
 #endif
diff --git a/man/btrfs.8.in b/man/btrfs.8.in
index 26ef982..5c953ca 100644
--- a/man/btrfs.8.in
+++ b/man/btrfs.8.in
@@ -23,6 +23,8 @@ btrfs \- control a btrfs filesystem
 .PP
 \fBbtrfs\fP \fBdevice scan\fP\fI [<device> [<device>..]]\fP
 .PP
+\fBbtrfs\fP \fBbalance progress\fP\fI <path>\fP
+.PP
 \fBbtrfs\fP \fBdevice show\fP\fI <dev>|<label> [<dev>|<label>...]\fP
 .PP
 \fBbtrfs\fP \fBdevice balance\fP\fI <path> \fP
@@ -152,10 +154,19 @@ across the devices.
 Add device(s) to the filesystem identified by \fI<path>\fR.
 .TP
 
+.SS
+\fBdevice balance \fI<path>\fP
+Balance the chunks of the filesystem identified by \fI<path>\fP
+across the devices.
+
 \fBdevice delete\fR\fI <dev> [<dev>..] <path>\fR
 Remove device(s) from a filesystem identified by \fI<path>\fR.
 .PP
 
+\fBbalance progress\fP \fI<path>\fP
+Report progress on the currently-running balance operation on the
+filesystem mounted at \fI<path>\fP.
+
 .SH EXIT STATUS
 \fBbtrfs\fR returns a zero exist status if it succeeds. Non zero is returned in
 case of failure.
-- 
1.7.2.5


^ permalink raw reply related

* [PATCH v5 0/8] Balance management, userspace
From: Hugo Mills @ 2011-04-10 21:16 UTC (permalink / raw)


   Hi, Chris,

   These patches form the userspace side of the balance management
work. This includes two patches to add one-off and polled monitoring,
a fork-to-background patch, and a sequence implementing the user
interface to handle the various types of balance filtering implemented
in the kernel-side patches.

   Hugo.

---

Hugo Mills (8):
  Balance progress monitoring.
  Add --monitor option to btrfs balance progress.
  User-space tool for cancelling balance operations.
  Run userspace tool in background for balances.
  Initial implementation of userspace interface for filtered balancing.
  Balance filter by device ID
  Balance filter for virtual address range
  Interface for device range balance filter

 btrfs.c        |   18 ++-
 btrfs_cmds.c   |  463 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 btrfs_cmds.h   |    2 +
 ioctl.h        |   46 ++++++
 man/btrfs.8.in |   79 +++++++++-
 5 files changed, 596 insertions(+), 12 deletions(-)

-- 
1.7.2.5


^ permalink raw reply

* [Qemu-devel] Re: [PATCH] target-ppc: remove #ifdef FLOAT128
From: Aurelien Jarno @ 2011-04-10 21:14 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Alexander Graf, qemu-devel
In-Reply-To: <BANLkTikmrCCAyXOQLPbahH001xaNhbkAWg@mail.gmail.com>

On Sun, Apr 10, 2011 at 09:08:55PM +0100, Peter Maydell wrote:
> On 10 April 2011 20:23, Alexander Graf <agraf@suse.de> wrote:
> > On 10.04.2011, at 21:12, Aurelien Jarno wrote:
> >> Now that PPC defaults to softfloat which always provides float128
> >> support, there is no need to keep two version of the code, depending if
> >> float128 support is available or not. Suggested by Peter Maydell.
> 
> > Looks good to me, but I'd leave this to Peter's ack.
> 
> I think it's a sensible (and pretty straightforward) cleanup, yes.
> [my bias towards emulation-accuracy means I don't really see
> much place for softfloat-native in a tcg qemu target, so I have
> no compunction about dropping support for it. :-)]

It seems that also what people want. We regularly got complain about
FP emulation precision (at least for the x86 target), but I don't
remember someone complaining about the speed of the FP emulation.

> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> 

Thanks for the review.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply

* [PATCH 3/3] KVM test: Introduce ntpdate in the package list of all RH-like guests
From: Lucas Meneghel Rodrigues @ 2011-04-10 21:11 UTC (permalink / raw)
  To: autotest; +Cc: kvm
In-Reply-To: <1302469861-7246-1-git-send-email-lmr@redhat.com>

As this utility is needed to execute the ntp time drift variants
successfuly. I would need a little help making the same maintenance
on SUSE-based guests, as I don't have those guests handy here.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 client/tests/kvm/unattended/Fedora-10.ks     |    1 +
 client/tests/kvm/unattended/Fedora-11.ks     |    1 +
 client/tests/kvm/unattended/Fedora-12.ks     |    1 +
 client/tests/kvm/unattended/Fedora-13.ks     |    1 +
 client/tests/kvm/unattended/Fedora-14.ks     |    1 +
 client/tests/kvm/unattended/Fedora-8.ks      |    1 +
 client/tests/kvm/unattended/Fedora-9.ks      |    1 +
 client/tests/kvm/unattended/RHEL-3-series.ks |    1 +
 client/tests/kvm/unattended/RHEL-4-series.ks |    1 +
 client/tests/kvm/unattended/RHEL-5-series.ks |    1 +
 client/tests/kvm/unattended/RHEL-6-series.ks |    1 +
 11 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/client/tests/kvm/unattended/Fedora-10.ks b/client/tests/kvm/unattended/Fedora-10.ks
index 26965af..5dffccd 100644
--- a/client/tests/kvm/unattended/Fedora-10.ks
+++ b/client/tests/kvm/unattended/Fedora-10.ks
@@ -21,6 +21,7 @@ reboot
 @base
 @development-libs
 @development-tools
+ntpdate
 
 %post --interpreter /usr/bin/python
 import socket, os
diff --git a/client/tests/kvm/unattended/Fedora-11.ks b/client/tests/kvm/unattended/Fedora-11.ks
index 861546b..c7d43b3 100644
--- a/client/tests/kvm/unattended/Fedora-11.ks
+++ b/client/tests/kvm/unattended/Fedora-11.ks
@@ -20,6 +20,7 @@ autopart
 @base
 @development-libs
 @development-tools
+ntpdate
 %end
 
 %post --interpreter /usr/bin/python
diff --git a/client/tests/kvm/unattended/Fedora-12.ks b/client/tests/kvm/unattended/Fedora-12.ks
index 861546b..c7d43b3 100644
--- a/client/tests/kvm/unattended/Fedora-12.ks
+++ b/client/tests/kvm/unattended/Fedora-12.ks
@@ -20,6 +20,7 @@ autopart
 @base
 @development-libs
 @development-tools
+ntpdate
 %end
 
 %post --interpreter /usr/bin/python
diff --git a/client/tests/kvm/unattended/Fedora-13.ks b/client/tests/kvm/unattended/Fedora-13.ks
index 861546b..c7d43b3 100644
--- a/client/tests/kvm/unattended/Fedora-13.ks
+++ b/client/tests/kvm/unattended/Fedora-13.ks
@@ -20,6 +20,7 @@ autopart
 @base
 @development-libs
 @development-tools
+ntpdate
 %end
 
 %post --interpreter /usr/bin/python
diff --git a/client/tests/kvm/unattended/Fedora-14.ks b/client/tests/kvm/unattended/Fedora-14.ks
index 9b99432..db4298b 100644
--- a/client/tests/kvm/unattended/Fedora-14.ks
+++ b/client/tests/kvm/unattended/Fedora-14.ks
@@ -20,6 +20,7 @@ autopart
 @base
 @development-libs
 @development-tools
+ntpdate
 %end
 
 %post --interpreter /usr/bin/python
diff --git a/client/tests/kvm/unattended/Fedora-8.ks b/client/tests/kvm/unattended/Fedora-8.ks
index 92ff727..9403191 100644
--- a/client/tests/kvm/unattended/Fedora-8.ks
+++ b/client/tests/kvm/unattended/Fedora-8.ks
@@ -21,6 +21,7 @@ reboot
 @base
 @development-libs
 @development-tools
+ntpdate
 
 %post --interpreter /usr/bin/python
 import socket, os
diff --git a/client/tests/kvm/unattended/Fedora-9.ks b/client/tests/kvm/unattended/Fedora-9.ks
index 92ff727..9403191 100644
--- a/client/tests/kvm/unattended/Fedora-9.ks
+++ b/client/tests/kvm/unattended/Fedora-9.ks
@@ -21,6 +21,7 @@ reboot
 @base
 @development-libs
 @development-tools
+ntpdate
 
 %post --interpreter /usr/bin/python
 import socket, os
diff --git a/client/tests/kvm/unattended/RHEL-3-series.ks b/client/tests/kvm/unattended/RHEL-3-series.ks
index 79d9605..12e23c3 100644
--- a/client/tests/kvm/unattended/RHEL-3-series.ks
+++ b/client/tests/kvm/unattended/RHEL-3-series.ks
@@ -21,6 +21,7 @@ skipx
 @ base
 @ development-libs
 @ development-tools
+ntpdate
 
 %post --interpreter /usr/bin/python
 import socket, os
diff --git a/client/tests/kvm/unattended/RHEL-4-series.ks b/client/tests/kvm/unattended/RHEL-4-series.ks
index d791e0f..4583c76 100644
--- a/client/tests/kvm/unattended/RHEL-4-series.ks
+++ b/client/tests/kvm/unattended/RHEL-4-series.ks
@@ -21,6 +21,7 @@ reboot
 @ base
 @ development-libs
 @ development-tools
+ntpdate
 
 %post --interpreter /usr/bin/python
 import socket, os
diff --git a/client/tests/kvm/unattended/RHEL-5-series.ks b/client/tests/kvm/unattended/RHEL-5-series.ks
index 3ee84f1..c528d8a 100644
--- a/client/tests/kvm/unattended/RHEL-5-series.ks
+++ b/client/tests/kvm/unattended/RHEL-5-series.ks
@@ -22,6 +22,7 @@ reboot
 @development-libs
 @development-tools
 kexec-tools
+ntpdate
 
 %post --interpreter /usr/bin/python
 import socket, os
diff --git a/client/tests/kvm/unattended/RHEL-6-series.ks b/client/tests/kvm/unattended/RHEL-6-series.ks
index 16cd493..04f0672 100644
--- a/client/tests/kvm/unattended/RHEL-6-series.ks
+++ b/client/tests/kvm/unattended/RHEL-6-series.ks
@@ -25,6 +25,7 @@ reboot
 @debugging-tools
 @network-tools
 NetworkManager
+ntpdate
 
 %post --interpreter /usr/bin/python
 import socket, os
-- 
1.7.4.2

^ permalink raw reply related

* [PATCH 2/3] Removing qmp_basic from RHEL 6.0 guest variant
From: Lucas Meneghel Rodrigues @ 2011-04-10 21:11 UTC (permalink / raw)
  To: autotest; +Cc: kvm
In-Reply-To: <1302469861-7246-1-git-send-email-lmr@redhat.com>

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 client/tests/kvm/tests_base.cfg.sample |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index 6397590..31a175a 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -1764,7 +1764,7 @@ variants:
 
 
                     - 6.0.i386:
-                        no setup
+                        no setup, qmp_basic
                         nic_hotplug:
                             modprobe_module =
                         block_hotplug:
@@ -1783,7 +1783,7 @@ variants:
 
 
                     - 6.0.x86_64:
-                        no setup
+                        no setup, qmp_basic
                         nic_hotplug:
                             modprobe_module =
                         block_hotplug:
-- 
1.7.4.2

^ permalink raw reply related

* [PATCH 1/3] Removing block_scsi tests from RHEL variant
From: Lucas Meneghel Rodrigues @ 2011-04-10 21:10 UTC (permalink / raw)
  To: autotest; +Cc: kvm

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 client/tests/kvm/tests_base.cfg.sample |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index cd8420d..6397590 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -1539,6 +1539,7 @@ variants:
                     modprobe_module = acpiphp
                 block_hotplug:
                     modprobe_module = acpiphp
+                    no block_scsi
                 unattended_install:
                     boot_path = images/pxeboot
                     # You have to use ks=floppy if you want to use floppies to
-- 
1.7.4.2

^ permalink raw reply related

* [PATCH v5 8/8] btrfs: Balance filter for physical device address
From: Hugo Mills @ 2011-04-10 21:06 UTC (permalink / raw)
  To: chris.mason, dave, lizf; +Cc: linux-btrfs
In-Reply-To: <1302469571-12605-1-git-send-email-hugo@carfax.org.uk>

Add a filter for balancing which allows the selection of chunks with
data in the given byte range on any block device in the filesystem. On
its own, this filter is of little use, but when used with the devid
filter, it can be used to rebalance all chunks which lie on a part of
a specific device.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
---
 fs/btrfs/ioctl.h   |    9 +++++++--
 fs/btrfs/volumes.c |   19 +++++++++++++++++++
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index 50d4801..a037714 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -168,7 +168,8 @@ struct btrfs_ioctl_balance_progress {
 #define BTRFS_BALANCE_FILTER_CHUNK_TYPE (1 << 1)
 #define BTRFS_BALANCE_FILTER_DEVID (1 << 2)
 #define BTRFS_BALANCE_FILTER_VIRTUAL_ADDRESS_RANGE (1 << 3)
-#define BTRFS_BALANCE_FILTER_MASK ((1 << 4) - 1) /* Logical or of all filter
+#define BTRFS_BALANCE_FILTER_DEVICE_ADDRESS_RANGE (1 << 4)
+#define BTRFS_BALANCE_FILTER_MASK ((1 << 5) - 1) /* Logical or of all filter
 				       * flags -- effectively versions
 				       * the filtered balance ioctl */
 
@@ -192,7 +193,11 @@ struct btrfs_ioctl_balance_start {
 	__u64 vrange_start;
 	__u64 vrange_end;
 
-	__u64 spare[503]; /* Make up the size of the structure to 4088
+	/* For FILTER_DEVICE_ADDRESS_RANGE */
+	__u64 drange_start;
+	__u64 drange_end;
+
+	__u64 spare[501]; /* Make up the size of the structure to 4088
 			   * bytes for future expansion */
 };
 
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 9216ad85..19dc117 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2124,6 +2124,25 @@ int balance_chunk_filter(struct btrfs_ioctl_balance_start *filter,
 		if (filter->vrange_start >= end || start >= filter->vrange_end)
 			return 0;
 	}
+	if (filter->flags & BTRFS_BALANCE_FILTER_DEVICE_ADDRESS_RANGE) {
+		int num_stripes = btrfs_chunk_num_stripes(eb, chunk);
+		int stripe_length = btrfs_chunk_length(eb, chunk)
+			* num_stripes / replinfo.num_copies;
+		int res = 0;
+
+		for (i = 0; i < num_stripes; i++) {
+			struct btrfs_stripe *stripe = btrfs_stripe_nr(chunk, i);
+			u64 start = btrfs_stripe_offset(eb, stripe);
+			u64 end = start + stripe_length;
+			if (filter->drange_start < end
+			    && start < filter->drange_end) {
+				res = 1;
+				break;
+			}
+		}
+		if (!res)
+			return 0;
+	}
 
 	return 1;
 }
-- 
1.7.2.5


^ permalink raw reply related

* [PATCH v5 7/8] btrfs: Replication-type information
From: Hugo Mills @ 2011-04-10 21:06 UTC (permalink / raw)
  To: chris.mason, dave, lizf; +Cc: linux-btrfs
In-Reply-To: <1302469571-12605-1-git-send-email-hugo@carfax.org.uk>

There are a few places in btrfs where knowledge of the various
parameters of a replication type is needed. Factor this out into a
single function which can supply all the relevant information.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
---
 fs/btrfs/super.c   |   16 +++-----
 fs/btrfs/volumes.c |   97 +++++++++++++++++++++++++++++++++++-----------------
 fs/btrfs/volumes.h |   17 +++++++++
 3 files changed, 88 insertions(+), 42 deletions(-)

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index d39a989..4341730 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -879,12 +879,12 @@ static int btrfs_calc_avail_data_space(struct btrfs_root *root, u64 *free_bytes)
 	struct btrfs_device_info *devices_info;
 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
 	struct btrfs_device *device;
+	struct btrfs_replication_info repl_info;
 	u64 skip_space;
 	u64 type;
 	u64 avail_space;
 	u64 used_space;
 	u64 min_stripe_size;
-	int min_stripes = 1;
 	int i = 0, nr_devices;
 	int ret;
 
@@ -898,12 +898,7 @@ static int btrfs_calc_avail_data_space(struct btrfs_root *root, u64 *free_bytes)
 
 	/* calc min stripe number for data space alloction */
 	type = btrfs_get_alloc_profile(root, 1);
-	if (type & BTRFS_BLOCK_GROUP_RAID0)
-		min_stripes = 2;
-	else if (type & BTRFS_BLOCK_GROUP_RAID1)
-		min_stripes = 2;
-	else if (type & BTRFS_BLOCK_GROUP_RAID10)
-		min_stripes = 4;
+	btrfs_get_replication_info(&repl_info, type);
 
 	if (type & BTRFS_BLOCK_GROUP_DUP)
 		min_stripe_size = 2 * BTRFS_STRIPE_LEN;
@@ -971,14 +966,15 @@ static int btrfs_calc_avail_data_space(struct btrfs_root *root, u64 *free_bytes)
 
 	i = nr_devices - 1;
 	avail_space = 0;
-	while (nr_devices >= min_stripes) {
+	while (nr_devices >= repl_info.devs_min) {
 		if (devices_info[i].max_avail >= min_stripe_size) {
 			int j;
 			u64 alloc_size;
 
-			avail_space += devices_info[i].max_avail * min_stripes;
+			avail_space += devices_info[i].max_avail
+			  * repl_info.devs_min;
 			alloc_size = devices_info[i].max_avail;
-			for (j = i + 1 - min_stripes; j <= i; j++)
+			for (j = i + 1 - repl_info.devs_min; j <= i; j++)
 				devices_info[j].max_avail -= alloc_size;
 		}
 		i--;
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 230d100..9216ad85 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -141,6 +141,52 @@ static void requeue_list(struct btrfs_pending_bios *pending_bios,
 		pending_bios->tail = tail;
 }
 
+void btrfs_get_replication_info(struct btrfs_replication_info *info,
+								u64 type)
+{
+	info->sub_stripes = 1;
+	info->dev_stripes = 1;
+	info->devs_increment = 1;
+	info->num_copies = 1;
+	info->devs_max = 0;	/* 0 == as many as possible */
+	info->devs_min = 1;
+
+	if (type & BTRFS_BLOCK_GROUP_DUP) {
+		info->dev_stripes = 2;
+		info->num_copies = 2;
+		info->devs_max = 1;
+	} else if (type & BTRFS_BLOCK_GROUP_RAID0) {
+		info->devs_min = 2;
+	} else if (type & BTRFS_BLOCK_GROUP_RAID1) {
+		info->devs_increment = 2;
+		info->num_copies = 2;
+		info->devs_max = 2;
+		info->devs_min = 2;
+	} else if (type & BTRFS_BLOCK_GROUP_RAID10) {
+		info->sub_stripes = 2;
+		info->devs_increment = 2;
+		info->num_copies = 2;
+		info->devs_min = 4;
+	}
+
+	if (type & BTRFS_BLOCK_GROUP_DATA) {
+		info->max_stripe_size = 1024 * 1024 * 1024;
+		info->min_stripe_size = 64 * 1024 * 1024;
+		info->max_chunk_size = 10 * info->max_stripe_size;
+	} else if (type & BTRFS_BLOCK_GROUP_METADATA) {
+		info->max_stripe_size = 256 * 1024 * 1024;
+		info->min_stripe_size = 32 * 1024 * 1024;
+		info->max_chunk_size = info->max_stripe_size;
+	} else if (type & BTRFS_BLOCK_GROUP_SYSTEM) {
+		info->max_stripe_size = 8 * 1024 * 1024;
+		info->min_stripe_size = 1 * 1024 * 1024;
+		info->max_chunk_size = 2 * info->max_stripe_size;
+	} else {
+		printk(KERN_ERR "Block group is of an unknown usage type: not data, metadata or system.\n");
+		BUG_ON(1);
+	}
+}
+
 /*
  * we try to collect pending bios for a device so we don't get a large
  * number of procs sending bios down to the same device.  This greatly
@@ -1248,6 +1294,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
 	struct block_device *bdev;
 	struct buffer_head *bh = NULL;
 	struct btrfs_super_block *disk_super;
+	struct btrfs_replication_info repl_info;
 	u64 all_avail;
 	u64 devid;
 	u64 num_devices;
@@ -1261,18 +1308,16 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
 		root->fs_info->avail_system_alloc_bits |
 		root->fs_info->avail_metadata_alloc_bits;
 
-	if ((all_avail & BTRFS_BLOCK_GROUP_RAID10) &&
-	    root->fs_info->fs_devices->num_devices <= 4) {
-		printk(KERN_ERR "btrfs: unable to go below four devices "
-		       "on raid10\n");
-		ret = -EINVAL;
-		goto out;
-	}
+	btrfs_get_replication_info(&repl_info, all_avail);
 
-	if ((all_avail & BTRFS_BLOCK_GROUP_RAID1) &&
-	    root->fs_info->fs_devices->num_devices <= 2) {
-		printk(KERN_ERR "btrfs: unable to go below two "
-		       "devices on raid1\n");
+	if (root->fs_info->fs_devices->num_devices <= repl_info.devs_min) {
+		if (all_avail & BTRFS_BLOCK_GROUP_RAID10) {
+			printk(KERN_ERR "btrfs: unable to go below four devices "
+				   "on raid10\n");
+		} else if (all_avail & BTRFS_BLOCK_GROUP_RAID1) {
+			printk(KERN_ERR "btrfs: unable to go below two "
+				   "devices on raid1\n");
+		}
 		ret = -EINVAL;
 		goto out;
 	}
@@ -2037,6 +2082,7 @@ int balance_chunk_filter(struct btrfs_ioctl_balance_start *filter,
 	struct extent_buffer *eb;
 	struct btrfs_chunk *chunk;
 	int i;
+	struct btrfs_replication_info replinfo;
 
 	/* No filter defined, everything matches */
 	if (!filter)
@@ -2050,6 +2096,8 @@ int balance_chunk_filter(struct btrfs_ioctl_balance_start *filter,
 	chunk = btrfs_item_ptr(eb, path->slots[0],
 						   struct btrfs_chunk);
 
+	btrfs_get_replication_info(&replinfo, btrfs_chunk_type(eb, chunk));
+
 	if (filter->flags & BTRFS_BALANCE_FILTER_CHUNK_TYPE) {
 		if ((btrfs_chunk_type(eb, chunk) & filter->chunk_type_mask)
 			!= filter->chunk_type)
@@ -2492,34 +2540,19 @@ static u64 __btrfs_calc_stripe_size(struct btrfs_fs_devices *fs_devices,
 				    u64 proposed_size, u64 type,
 				    int num_stripes, int small_stripe)
 {
-	int min_stripe_size = 1 * 1024 * 1024;
+	struct btrfs_replication_info repl_info;
 	u64 calc_size = proposed_size;
 	u64 max_chunk_size = calc_size;
-	int ncopies = 1;
 
-	if (type & (BTRFS_BLOCK_GROUP_RAID1 |
-		    BTRFS_BLOCK_GROUP_DUP |
-		    BTRFS_BLOCK_GROUP_RAID10))
-		ncopies = 2;
-
-	if (type & BTRFS_BLOCK_GROUP_DATA) {
-		max_chunk_size = 10 * calc_size;
-		min_stripe_size = 64 * 1024 * 1024;
-	} else if (type & BTRFS_BLOCK_GROUP_METADATA) {
-		max_chunk_size = 256 * 1024 * 1024;
-		min_stripe_size = 32 * 1024 * 1024;
-	} else if (type & BTRFS_BLOCK_GROUP_SYSTEM) {
-		calc_size = 8 * 1024 * 1024;
-		max_chunk_size = calc_size * 2;
-		min_stripe_size = 1 * 1024 * 1024;
-	}
+	btrfs_get_replication_info(&repl_info, type);
+	max_chunk_size = repl_info.max_chunk_size;
 
 	/* we don't want a chunk larger than 10% of writeable space */
 	max_chunk_size = min(div_factor(fs_devices->total_rw_bytes, 1),
 			     max_chunk_size);
 
-	if (calc_size * num_stripes > max_chunk_size * ncopies) {
-		calc_size = max_chunk_size * ncopies;
+	if (calc_size * num_stripes > max_chunk_size * repl_info.num_copies) {
+		calc_size = max_chunk_size * repl_info.num_copies;
 		do_div(calc_size, num_stripes);
 		do_div(calc_size, BTRFS_STRIPE_LEN);
 		calc_size *= BTRFS_STRIPE_LEN;
@@ -2527,7 +2560,7 @@ static u64 __btrfs_calc_stripe_size(struct btrfs_fs_devices *fs_devices,
 
 	/* we don't want tiny stripes */
 	if (!small_stripe)
-		calc_size = max_t(u64, min_stripe_size, calc_size);
+		calc_size = max_t(u64, repl_info.min_stripe_size, calc_size);
 
 	/*
 	 * we're about to do_div by the BTRFS_STRIPE_LEN so lets make sure
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 168771b..a94de82 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -146,6 +146,22 @@ struct btrfs_device_info {
 	u64 max_avail;
 };
 
+/*
+ * Information about a the parameters of a replication strategy (RAID
+ * level)
+ */
+struct btrfs_replication_info {
+	u32 sub_stripes;
+	u32 dev_stripes;
+	u32 devs_increment;
+	u32 num_copies;
+	u32 devs_max;
+	u32 devs_min;
+	u64 max_stripe_size;
+	u64 min_stripe_size;
+	u64 max_chunk_size;
+};
+
 /* Used to sort the devices by max_avail(descending sort) */
 int btrfs_cmp_device_free_bytes(const void *dev_info1, const void *dev_info2);
 
@@ -214,4 +230,5 @@ int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset);
 int find_free_dev_extent(struct btrfs_trans_handle *trans,
 			 struct btrfs_device *device, u64 num_bytes,
 			 u64 *start, u64 *max_avail);
+void btrfs_get_replication_info(struct btrfs_replication_info *info, u64 type);
 #endif
-- 
1.7.2.5


^ permalink raw reply related

* [PATCH v5 6/8] btrfs: Balance filter for virtual address ranges
From: Hugo Mills @ 2011-04-10 21:06 UTC (permalink / raw)
  To: chris.mason, dave, lizf; +Cc: linux-btrfs
In-Reply-To: <1302469571-12605-1-git-send-email-hugo@carfax.org.uk>

Allow the balancing of chunks where some part of the chunk lies within
the virtual (i.e. btrfs-internal) address range passed.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
---
 fs/btrfs/ioctl.h   |    9 +++++++--
 fs/btrfs/volumes.c |    6 ++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index 54523c0..50d4801 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -167,7 +167,8 @@ struct btrfs_ioctl_balance_progress {
 
 #define BTRFS_BALANCE_FILTER_CHUNK_TYPE (1 << 1)
 #define BTRFS_BALANCE_FILTER_DEVID (1 << 2)
-#define BTRFS_BALANCE_FILTER_MASK ((1 << 3) - 1) /* Logical or of all filter
+#define BTRFS_BALANCE_FILTER_VIRTUAL_ADDRESS_RANGE (1 << 3)
+#define BTRFS_BALANCE_FILTER_MASK ((1 << 4) - 1) /* Logical or of all filter
 				       * flags -- effectively versions
 				       * the filtered balance ioctl */
 
@@ -187,7 +188,11 @@ struct btrfs_ioctl_balance_start {
 	/* For FILTER_DEVID */
 	__u64 devid;
 
-	__u64 spare[505]; /* Make up the size of the structure to 4088
+	/* For FILTER_VIRTUAL_ADDRESS_RANGE */
+	__u64 vrange_start;
+	__u64 vrange_end;
+
+	__u64 spare[503]; /* Make up the size of the structure to 4088
 			   * bytes for future expansion */
 };
 
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index e7fa2ab..230d100 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2070,6 +2070,12 @@ int balance_chunk_filter(struct btrfs_ioctl_balance_start *filter,
 		if (!res)
 			return 0;
 	}
+	if (filter->flags & BTRFS_BALANCE_FILTER_VIRTUAL_ADDRESS_RANGE) {
+		u64 start = key->offset;
+		u64 end = start + btrfs_chunk_length(eb, chunk);
+		if (filter->vrange_start >= end || start >= filter->vrange_end)
+			return 0;
+	}
 
 	return 1;
 }
-- 
1.7.2.5


^ permalink raw reply related

* [PATCH v5 5/8] btrfs: Balance filter for device ID
From: Hugo Mills @ 2011-04-10 21:06 UTC (permalink / raw)
  To: chris.mason, dave, lizf; +Cc: linux-btrfs
In-Reply-To: <1302469571-12605-1-git-send-email-hugo@carfax.org.uk>

Balance filter to take only chunks which have (or had) a stripe on the
given device. Useful if a device has been forcibly removed from the
filesystem, and the data from that device needs rebuilding.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
---
 fs/btrfs/ioctl.h   |    8 ++++++--
 fs/btrfs/volumes.c |   16 +++++++++++++++-
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index eb91d20..54523c0 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -166,7 +166,8 @@ struct btrfs_ioctl_balance_progress {
 #define BTRFS_BALANCE_FILTER_COUNT_ONLY (1 << 0)
 
 #define BTRFS_BALANCE_FILTER_CHUNK_TYPE (1 << 1)
-#define BTRFS_BALANCE_FILTER_MASK ((1 << 2) - 1) /* Logical or of all filter
+#define BTRFS_BALANCE_FILTER_DEVID (1 << 2)
+#define BTRFS_BALANCE_FILTER_MASK ((1 << 3) - 1) /* Logical or of all filter
 				       * flags -- effectively versions
 				       * the filtered balance ioctl */
 
@@ -183,7 +184,10 @@ struct btrfs_ioctl_balance_start {
 	__u64 chunk_type;      /* Flag bits required */
 	__u64 chunk_type_mask; /* Mask of bits to examine */
 
-	__u64 spare[506]; /* Make up the size of the structure to 4088
+	/* For FILTER_DEVID */
+	__u64 devid;
+
+	__u64 spare[505]; /* Make up the size of the structure to 4088
 			   * bytes for future expansion */
 };
 
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 95c603a..e7fa2ab 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2036,6 +2036,7 @@ int balance_chunk_filter(struct btrfs_ioctl_balance_start *filter,
 {
 	struct extent_buffer *eb;
 	struct btrfs_chunk *chunk;
+	int i;
 
 	/* No filter defined, everything matches */
 	if (!filter)
@@ -2056,8 +2057,21 @@ int balance_chunk_filter(struct btrfs_ioctl_balance_start *filter,
 			return 0;
 		}
 	}
+	if (filter->flags & BTRFS_BALANCE_FILTER_DEVID) {
+		int num_stripes = btrfs_chunk_num_stripes(eb, chunk);
+		int res = 0;
+		for (i = 0; i < num_stripes; i++) {
+			struct btrfs_stripe *stripe = btrfs_stripe_nr(chunk, i);
+			if (btrfs_stripe_devid(eb, stripe) == filter->devid) {
+				res = 1;
+				break;
+			}
+		}
+		if (!res)
+			return 0;
+	}
 
-	return ret;
+	return 1;
 }
 
 /* Define a type, and two functions which can be used for the two
-- 
1.7.2.5


^ permalink raw reply related

* [PATCH v5 4/8] btrfs: Implement filtered balance ioctl
From: Hugo Mills @ 2011-04-10 21:06 UTC (permalink / raw)
  To: chris.mason, dave, lizf; +Cc: linux-btrfs
In-Reply-To: <1302469571-12605-1-git-send-email-hugo@carfax.org.uk>

The filtered balance ioctl provides a facility to perform a balance
operation on a subset of the chunks in the filesystem. This patch
implements the base ioctl for this operation, and one filter type.
The filter in this patch selects chunks on the basis of their chunk
flags field, and can select any combination of bits set or unset.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
---
 fs/btrfs/ioctl.c   |   42 ++++++++++++++++++++++++++++++++-
 fs/btrfs/ioctl.h   |   27 +++++++++++++++++++++
 fs/btrfs/volumes.c |   65 +++++++++++++++++++++++++++++++++++++++++++++------
 fs/btrfs/volumes.h |    4 ++-
 4 files changed, 128 insertions(+), 10 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index aef6329..4bc4da2 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2433,6 +2433,44 @@ error:
 	return err;
 }
 
+long btrfs_ioctl_balance(struct btrfs_root *dev_root,
+			 struct btrfs_ioctl_balance_start __user *user_filters)
+{
+	int ret = 0;
+	struct btrfs_ioctl_balance_start *dest;
+
+	dest = kmalloc(sizeof(struct btrfs_ioctl_balance_start), GFP_KERNEL);
+	if (!dest)
+		return -ENOMEM;
+
+	if (copy_from_user(dest, user_filters,
+			   sizeof(struct btrfs_ioctl_balance_start))) {
+		ret = -EFAULT;
+		goto error;
+	}
+
+	/* Basic sanity checking: has the user requested anything outside
+	 * the range we know about? */
+	if (dest->flags & ~BTRFS_BALANCE_FILTER_MASK) {
+		ret = -ENOTSUPP;
+		goto error;
+	}
+
+	/* Do the balance */
+	ret = btrfs_balance(dev_root, dest);
+	if (ret)
+		goto error;
+
+	if (copy_to_user(user_filters, dest,
+			 sizeof(struct btrfs_ioctl_balance_start))) {
+		ret = -EFAULT;
+	}
+
+error:
+	kfree(dest);
+	return ret;
+}
+
 long btrfs_ioctl(struct file *file, unsigned int
 		cmd, unsigned long arg)
 {
@@ -2471,11 +2509,13 @@ long btrfs_ioctl(struct file *file, unsigned int
 	case BTRFS_IOC_RM_DEV:
 		return btrfs_ioctl_rm_dev(root, argp);
 	case BTRFS_IOC_BALANCE:
-		return btrfs_balance(root->fs_info->dev_root);
+		return btrfs_ioctl_balance(root->fs_info->dev_root, NULL);
 	case BTRFS_IOC_BALANCE_PROGRESS:
 		return btrfs_ioctl_balance_progress(root->fs_info, argp);
 	case BTRFS_IOC_BALANCE_CANCEL:
 		return btrfs_ioctl_balance_cancel(root->fs_info);
+	case BTRFS_IOC_BALANCE_FILTERED:
+		return btrfs_ioctl_balance(root->fs_info->dev_root, argp);
 	case BTRFS_IOC_CLONE:
 		return btrfs_ioctl_clone(file, arg, 0, 0, 0);
 	case BTRFS_IOC_CLONE_RANGE:
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index 2c49add..eb91d20 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -162,6 +162,31 @@ struct btrfs_ioctl_balance_progress {
 	__u32 completed;
 };
 
+/* Types of balance filter */
+#define BTRFS_BALANCE_FILTER_COUNT_ONLY (1 << 0)
+
+#define BTRFS_BALANCE_FILTER_CHUNK_TYPE (1 << 1)
+#define BTRFS_BALANCE_FILTER_MASK ((1 << 2) - 1) /* Logical or of all filter
+				       * flags -- effectively versions
+				       * the filtered balance ioctl */
+
+/* All the possible options for a filter */
+struct btrfs_ioctl_balance_start {
+	__u64 flags; /* Bit field indicating which fields of this struct
+			are filled */
+
+	/* Output values: chunk counts */
+	__u64 examined;
+	__u64 balanced;
+
+	/* For FILTER_CHUNK_TYPE */
+	__u64 chunk_type;      /* Flag bits required */
+	__u64 chunk_type_mask; /* Mask of bits to examine */
+
+	__u64 spare[506]; /* Make up the size of the structure to 4088
+			   * bytes for future expansion */
+};
+
 #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
 				   struct btrfs_ioctl_vol_args)
 #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
@@ -211,4 +236,6 @@ struct btrfs_ioctl_balance_progress {
 #define BTRFS_IOC_BALANCE_PROGRESS _IOR(BTRFS_IOCTL_MAGIC, 27, \
 				  struct btrfs_ioctl_balance_progress)
 #define BTRFS_IOC_BALANCE_CANCEL _IO(BTRFS_IOCTL_MAGIC, 28)
+#define BTRFS_IOC_BALANCE_FILTERED _IOWR(BTRFS_IOCTL_MAGIC, 29, \
+				struct btrfs_ioctl_balance_start)
 #endif
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 20c2772..95c603a 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2029,6 +2029,37 @@ static u64 div_factor(u64 num, int factor)
 	return num;
 }
 
+int balance_chunk_filter(struct btrfs_ioctl_balance_start *filter,
+						 struct btrfs_root *chunk_root,
+						 struct btrfs_path *path,
+						 struct btrfs_key *key)
+{
+	struct extent_buffer *eb;
+	struct btrfs_chunk *chunk;
+
+	/* No filter defined, everything matches */
+	if (!filter)
+		return 1;
+
+	/* No flags set, everything matches */
+	if (filter->flags == 0)
+		return 1;
+
+	eb = path->nodes[0];
+	chunk = btrfs_item_ptr(eb, path->slots[0],
+						   struct btrfs_chunk);
+
+	if (filter->flags & BTRFS_BALANCE_FILTER_CHUNK_TYPE) {
+		if ((btrfs_chunk_type(eb, chunk) & filter->chunk_type_mask)
+			!= filter->chunk_type)
+		{
+			return 0;
+		}
+	}
+
+	return ret;
+}
+
 /* Define a type, and two functions which can be used for the two
  * phases of the balance operation: one for counting chunks, and one
  * for actually moving them. */
@@ -2069,6 +2100,7 @@ static void balance_move_chunks(struct btrfs_root *chunk_root,
 /* Iterate through all chunks, performing some function on each one. */
 static int balance_iterate_chunks(struct btrfs_root *chunk_root,
 			   struct btrfs_balance_info *bal_info,
+			   struct btrfs_ioctl_balance_start *filter,
 			   balance_iterator_function iterator_fn)
 {
 	int ret = 0;
@@ -2084,6 +2116,9 @@ static int balance_iterate_chunks(struct btrfs_root *chunk_root,
 	key.offset = (u64)-1;
 	key.type = BTRFS_CHUNK_ITEM_KEY;
 
+	filter->examined = 0;
+	filter->balanced = 0;
+
 	while (!bal_info->cancel_pending) {
 		ret = btrfs_search_slot(NULL, chunk_root, &key, path, 0, 0);
 		if (ret < 0)
@@ -2110,17 +2145,29 @@ static int balance_iterate_chunks(struct btrfs_root *chunk_root,
 			break;
 
 		/* Call the function to do the work for this chunk */
-		btrfs_release_path(chunk_root, path);
-		iterator_fn(chunk_root, bal_info, path, &found_key);
+		filter->examined += 1;
+
+		if (balance_chunk_filter(filter, chunk_root,
+					 path, &found_key)) {
+			btrfs_release_path(chunk_root, path);
+			iterator_fn(chunk_root, bal_info, path, &found_key);
+			filter->balanced += 1;
+		} else {
+			btrfs_release_path(chunk_root, path);
+		}
 
 		key.offset = found_key.offset - 1;
 	}
 
+	printk(KERN_INFO "btrfs: balance: %llu chunks considered, %llu chunks balanced\n",
+		   filter->examined, filter->balanced);
+
 	btrfs_free_path(path);
 	return ret;
 }
 
-int btrfs_balance(struct btrfs_root *dev_root)
+int btrfs_balance(struct btrfs_root *dev_root,
+				  struct btrfs_ioctl_balance_start *filters)
 {
 	int ret;
 	struct list_head *devices = &dev_root->fs_info->fs_devices->devices;
@@ -2179,15 +2226,17 @@ int btrfs_balance(struct btrfs_root *dev_root)
 
 	/* step two, count the chunks */
 	ret = balance_iterate_chunks(chunk_root, bal_info,
-				     balance_count_chunks);
+				 filters, balance_count_chunks);
 	if (ret)
 		goto error;
 
 	/* step three, relocate all the chunks */
-	ret = balance_iterate_chunks(chunk_root, bal_info,
-				     balance_move_chunks);
-	if (ret)
-		goto error;
+	if (!(filters->flags & BTRFS_BALANCE_FILTER_COUNT_ONLY)) {
+		ret = balance_iterate_chunks(chunk_root, bal_info,
+					     filters, balance_move_chunks);
+		if (ret)
+			goto error;
+	}
 
 	ret = 0;
 	if (bal_info->cancel_pending) {
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 7fb59d4..168771b 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -22,6 +22,7 @@
 #include <linux/bio.h>
 #include <linux/sort.h>
 #include "async-thread.h"
+#include "ioctl.h"
 
 #define BTRFS_STRIPE_LEN	(64 * 1024)
 
@@ -205,7 +206,8 @@ struct btrfs_device *btrfs_find_device(struct btrfs_root *root, u64 devid,
 				       u8 *uuid, u8 *fsid);
 int btrfs_shrink_device(struct btrfs_device *device, u64 new_size);
 int btrfs_init_new_device(struct btrfs_root *root, char *path);
-int btrfs_balance(struct btrfs_root *dev_root);
+int btrfs_balance(struct btrfs_root *dev_root,
+		  struct btrfs_ioctl_balance_start *filters);
 void btrfs_unlock_volumes(void);
 void btrfs_lock_volumes(void);
 int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset);
-- 
1.7.2.5


^ permalink raw reply related

* [PATCH v5 3/8] btrfs: Factor out enumeration of chunks to a separate function
From: Hugo Mills @ 2011-04-10 21:06 UTC (permalink / raw)
  To: chris.mason, dave, lizf; +Cc: linux-btrfs
In-Reply-To: <1302469571-12605-1-git-send-email-hugo@carfax.org.uk>

The main balance function has two loops which are functionally
identical in their looping mechanism, but which perform a different
operation on the chunks they loop over. To avoid repeating code more
than necessary, factor this loop out into a separate iterator function
which takes a function parameter for the action to be performed.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
---
 fs/btrfs/volumes.c |  174 +++++++++++++++++++++++++++++----------------------
 1 files changed, 99 insertions(+), 75 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index cf019af..20c2772 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2029,6 +2029,97 @@ static u64 div_factor(u64 num, int factor)
 	return num;
 }
 
+/* Define a type, and two functions which can be used for the two
+ * phases of the balance operation: one for counting chunks, and one
+ * for actually moving them. */
+typedef void (*balance_iterator_function)(struct btrfs_root *,
+					  struct btrfs_balance_info *,
+					  struct btrfs_path *,
+					  struct btrfs_key *);
+
+static void balance_count_chunks(struct btrfs_root *chunk_root,
+			  struct btrfs_balance_info *bal_info,
+			  struct btrfs_path *path,
+			  struct btrfs_key *key)
+{
+	spin_lock(&chunk_root->fs_info->balance_info_lock);
+	bal_info->expected++;
+	spin_unlock(&chunk_root->fs_info->balance_info_lock);
+}
+
+static void balance_move_chunks(struct btrfs_root *chunk_root,
+			 struct btrfs_balance_info *bal_info,
+			 struct btrfs_path *path,
+			 struct btrfs_key *key)
+{
+	int ret;
+
+	ret = btrfs_relocate_chunk(chunk_root,
+				   chunk_root->root_key.objectid,
+				   key->objectid,
+				   key->offset);
+	BUG_ON(ret && ret != -ENOSPC);
+	spin_lock(&chunk_root->fs_info->balance_info_lock);
+	bal_info->completed++;
+	spin_unlock(&chunk_root->fs_info->balance_info_lock);
+	printk(KERN_INFO "btrfs: balance: %llu/%llu block groups completed\n",
+	       bal_info->completed, bal_info->expected);
+}
+
+/* Iterate through all chunks, performing some function on each one. */
+static int balance_iterate_chunks(struct btrfs_root *chunk_root,
+			   struct btrfs_balance_info *bal_info,
+			   balance_iterator_function iterator_fn)
+{
+	int ret = 0;
+	struct btrfs_path *path;
+	struct btrfs_key key;
+	struct btrfs_key found_key;
+
+	path = btrfs_alloc_path();
+	if (!path)
+		return -ENOMEM;
+
+	key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID;
+	key.offset = (u64)-1;
+	key.type = BTRFS_CHUNK_ITEM_KEY;
+
+	while (!bal_info->cancel_pending) {
+		ret = btrfs_search_slot(NULL, chunk_root, &key, path, 0, 0);
+		if (ret < 0)
+			break;
+		/*
+		 * this shouldn't happen, it means the last relocate
+		 * failed
+		 */
+		if (ret == 0)
+			break;
+
+		ret = btrfs_previous_item(chunk_root, path, 0,
+					  BTRFS_CHUNK_ITEM_KEY);
+		if (ret)
+			break;
+
+		btrfs_item_key_to_cpu(path->nodes[0], &found_key,
+				      path->slots[0]);
+		if (found_key.objectid != key.objectid)
+			break;
+
+		/* chunk zero is special */
+		if (found_key.offset == 0)
+			break;
+
+		/* Call the function to do the work for this chunk */
+		btrfs_release_path(chunk_root, path);
+		iterator_fn(chunk_root, bal_info, path, &found_key);
+
+		key.offset = found_key.offset - 1;
+	}
+
+	btrfs_free_path(path);
+	return ret;
+}
+
 int btrfs_balance(struct btrfs_root *dev_root)
 {
 	int ret;
@@ -2036,11 +2127,8 @@ int btrfs_balance(struct btrfs_root *dev_root)
 	struct btrfs_device *device;
 	u64 old_size;
 	u64 size_to_free;
-	struct btrfs_path *path;
-	struct btrfs_key key;
 	struct btrfs_root *chunk_root = dev_root->fs_info->chunk_root;
 	struct btrfs_trans_handle *trans;
-	struct btrfs_key found_key;
 	struct btrfs_balance_info *bal_info;
 
 	if (dev_root->fs_info->sb->s_flags & MS_RDONLY)
@@ -2061,8 +2149,7 @@ int btrfs_balance(struct btrfs_root *dev_root)
 	}
 	spin_lock(&dev_root->fs_info->balance_info_lock);
 	dev_root->fs_info->balance_info = bal_info;
-	bal_info->expected = -1; /* One less than actually counted,
-				    because chunk 0 is special */
+	bal_info->expected = 0;
 	bal_info->completed = 0;
 	bal_info->cancel_pending = 0;
 	spin_unlock(&dev_root->fs_info->balance_info_lock);
@@ -2091,86 +2178,23 @@ int btrfs_balance(struct btrfs_root *dev_root)
 	}
 
 	/* step two, count the chunks */
-	path = btrfs_alloc_path();
-	if (!path) {
-		ret = -ENOMEM;
+	ret = balance_iterate_chunks(chunk_root, bal_info,
+				     balance_count_chunks);
+	if (ret)
 		goto error;
-	}
-
-	key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID;
-	key.offset = (u64)-1;
-	key.type = BTRFS_CHUNK_ITEM_KEY;
-
-	ret = btrfs_search_slot(NULL, chunk_root, &key, path, 0, 0);
-	if (ret <= 0) {
-		printk(KERN_ERR "btrfs: Failed to find the last chunk.\n");
-		BUG();
-	}
-
-	while (1) {
-		ret = btrfs_previous_item(chunk_root, path, 0,
-					  BTRFS_CHUNK_ITEM_KEY);
-		if (ret)
-			break;
-
-		spin_lock(&dev_root->fs_info->balance_info_lock);
-		bal_info->expected++;
-		spin_unlock(&dev_root->fs_info->balance_info_lock);
-	}
-
-	btrfs_release_path(chunk_root, path);
 
 	/* step three, relocate all the chunks */
-	key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID;
-	key.offset = (u64)-1;
-	key.type = BTRFS_CHUNK_ITEM_KEY;
-
-	while (!bal_info->cancel_pending) {
-		ret = btrfs_search_slot(NULL, chunk_root, &key, path, 0, 0);
-		if (ret < 0)
-			goto error;
-
-		/*
-		 * this shouldn't happen, it means the last relocate
-		 * failed
-		 */
-		if (ret == 0)
-			break;
-
-		ret = btrfs_previous_item(chunk_root, path, 0,
-					  BTRFS_CHUNK_ITEM_KEY);
-		if (ret)
-			break;
-
-		btrfs_item_key_to_cpu(path->nodes[0], &found_key,
-				      path->slots[0]);
-		if (found_key.objectid != key.objectid)
-			break;
-
-		/* chunk zero is special */
-		if (found_key.offset == 0)
-			break;
+	ret = balance_iterate_chunks(chunk_root, bal_info,
+				     balance_move_chunks);
+	if (ret)
+		goto error;
 
-		btrfs_release_path(chunk_root, path);
-		ret = btrfs_relocate_chunk(chunk_root,
-					   chunk_root->root_key.objectid,
-					   found_key.objectid,
-					   found_key.offset);
-		BUG_ON(ret && ret != -ENOSPC);
-		key.offset = found_key.offset - 1;
-		spin_lock(&dev_root->fs_info->balance_info_lock);
-		bal_info->completed++;
-		spin_unlock(&dev_root->fs_info->balance_info_lock);
-		printk(KERN_INFO "btrfs: balance: %llu/%llu block groups completed\n",
-		       bal_info->completed, bal_info->expected);
-	}
 	ret = 0;
 	if (bal_info->cancel_pending) {
 		printk(KERN_INFO "btrfs: balance cancelled\n");
 		ret = -EINTR;
 	}
 error:
-	btrfs_free_path(path);
 	spin_lock(&dev_root->fs_info->balance_info_lock);
 	kfree(dev_root->fs_info->balance_info);
 	dev_root->fs_info->balance_info = NULL;
-- 
1.7.2.5


^ permalink raw reply related

* [PATCH v5 2/8] btrfs: Cancel filesystem balance
From: Hugo Mills @ 2011-04-10 21:06 UTC (permalink / raw)
  To: chris.mason, dave, lizf; +Cc: linux-btrfs
In-Reply-To: <1302469571-12605-1-git-send-email-hugo@carfax.org.uk>

This patch adds an ioctl for cancelling a btrfs balance operation
mid-flight. The ioctl simply sets a flag, and the operation terminates
after the current block group move has completed.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
---
 fs/btrfs/ctree.h   |    1 +
 fs/btrfs/ioctl.c   |   28 ++++++++++++++++++++++++++++
 fs/btrfs/ioctl.h   |    1 +
 fs/btrfs/volumes.c |    7 ++++++-
 4 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 17c7ecc..1d26cfd 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -868,6 +868,7 @@ struct btrfs_block_group_cache {
 struct btrfs_balance_info {
 	u32 expected;
 	u32 completed;
+	int cancel_pending;
 };
 
 struct reloc_control;
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index a8fbb07..aef6329 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2407,6 +2407,32 @@ error:
 	return ret;
 }
 
+/*
+ * Cancel a running balance operation
+ */
+long btrfs_ioctl_balance_cancel(struct btrfs_fs_info *fs_info)
+{
+	int err = 0;
+
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
+
+	spin_lock(&fs_info->balance_info_lock);
+	if (!fs_info->balance_info) {
+		err = -EINVAL;
+		goto error;
+	}
+	if (fs_info->balance_info->cancel_pending) {
+		err = -ECANCELED;
+		goto error;
+	}
+	fs_info->balance_info->cancel_pending = 1;
+
+error:
+	spin_unlock(&fs_info->balance_info_lock);
+	return err;
+}
+
 long btrfs_ioctl(struct file *file, unsigned int
 		cmd, unsigned long arg)
 {
@@ -2448,6 +2474,8 @@ long btrfs_ioctl(struct file *file, unsigned int
 		return btrfs_balance(root->fs_info->dev_root);
 	case BTRFS_IOC_BALANCE_PROGRESS:
 		return btrfs_ioctl_balance_progress(root->fs_info, argp);
+	case BTRFS_IOC_BALANCE_CANCEL:
+		return btrfs_ioctl_balance_cancel(root->fs_info);
 	case BTRFS_IOC_CLONE:
 		return btrfs_ioctl_clone(file, arg, 0, 0, 0);
 	case BTRFS_IOC_CLONE_RANGE:
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index 7c37c6b..2c49add 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -210,4 +210,5 @@ struct btrfs_ioctl_balance_progress {
 #define BTRFS_IOC_SUBVOL_SETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 26, __u64)
 #define BTRFS_IOC_BALANCE_PROGRESS _IOR(BTRFS_IOCTL_MAGIC, 27, \
 				  struct btrfs_ioctl_balance_progress)
+#define BTRFS_IOC_BALANCE_CANCEL _IO(BTRFS_IOCTL_MAGIC, 28)
 #endif
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index bb2ffed..cf019af 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2064,6 +2064,7 @@ int btrfs_balance(struct btrfs_root *dev_root)
 	bal_info->expected = -1; /* One less than actually counted,
 				    because chunk 0 is special */
 	bal_info->completed = 0;
+	bal_info->cancel_pending = 0;
 	spin_unlock(&dev_root->fs_info->balance_info_lock);
 
 	/* step one make some room on all the devices */
@@ -2124,7 +2125,7 @@ int btrfs_balance(struct btrfs_root *dev_root)
 	key.offset = (u64)-1;
 	key.type = BTRFS_CHUNK_ITEM_KEY;
 
-	while (1) {
+	while (!bal_info->cancel_pending) {
 		ret = btrfs_search_slot(NULL, chunk_root, &key, path, 0, 0);
 		if (ret < 0)
 			goto error;
@@ -2164,6 +2165,10 @@ int btrfs_balance(struct btrfs_root *dev_root)
 		       bal_info->completed, bal_info->expected);
 	}
 	ret = 0;
+	if (bal_info->cancel_pending) {
+		printk(KERN_INFO "btrfs: balance cancelled\n");
+		ret = -EINTR;
+	}
 error:
 	btrfs_free_path(path);
 	spin_lock(&dev_root->fs_info->balance_info_lock);
-- 
1.7.2.5


^ permalink raw reply related

* [PATCH v5 1/8] btrfs: Balance progress monitoring
From: Hugo Mills @ 2011-04-10 21:06 UTC (permalink / raw)
  To: chris.mason, dave, lizf; +Cc: linux-btrfs
In-Reply-To: <1302469571-12605-1-git-send-email-hugo@carfax.org.uk>

This patch introduces a basic form of progress monitoring for balance
operations, by counting the number of block groups remaining. The
information is exposed to userspace by an ioctl.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
---
 fs/btrfs/ctree.h   |    9 ++++++++
 fs/btrfs/disk-io.c |    2 +
 fs/btrfs/ioctl.c   |   34 +++++++++++++++++++++++++++++++
 fs/btrfs/ioctl.h   |    7 ++++++
 fs/btrfs/volumes.c |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 106 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 7f78cc7..17c7ecc 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -865,6 +865,11 @@ struct btrfs_block_group_cache {
 	struct list_head cluster_list;
 };
 
+struct btrfs_balance_info {
+	u32 expected;
+	u32 completed;
+};
+
 struct reloc_control;
 struct btrfs_device;
 struct btrfs_fs_devices;
@@ -1078,6 +1083,10 @@ struct btrfs_fs_info {
 
 	/* filesystem state */
 	u64 fs_state;
+
+	/* Keep track of any rebalance operations on this FS */
+	spinlock_t balance_info_lock;
+	struct btrfs_balance_info *balance_info;
 };
 
 /*
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 100b07f..3d690de 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1645,6 +1645,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
 	spin_lock_init(&fs_info->ref_cache_lock);
 	spin_lock_init(&fs_info->fs_roots_radix_lock);
 	spin_lock_init(&fs_info->delayed_iput_lock);
+	spin_lock_init(&fs_info->balance_info_lock);
 
 	init_completion(&fs_info->kobj_unregister);
 	fs_info->tree_root = tree_root;
@@ -1670,6 +1671,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
 	fs_info->sb = sb;
 	fs_info->max_inline = 8192 * 1024;
 	fs_info->metadata_ratio = 0;
+	fs_info->balance_info = NULL;
 
 	fs_info->thread_pool_size = min_t(unsigned long,
 					  num_online_cpus() + 2, 8);
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 5fdb2ab..a8fbb07 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2375,6 +2375,38 @@ static noinline long btrfs_ioctl_wait_sync(struct file *file, void __user *argp)
 	return btrfs_wait_for_commit(root, transid);
 }
 
+/*
+ * Return the current status of any balance operation
+ */
+long btrfs_ioctl_balance_progress(
+	struct btrfs_fs_info *fs_info,
+	struct btrfs_ioctl_balance_progress __user *user_dest)
+{
+	int ret = 0;
+	struct btrfs_ioctl_balance_progress dest;
+
+	spin_lock(&fs_info->balance_info_lock);
+	if (!fs_info->balance_info) {
+		ret = -EINVAL;
+		goto error;
+	}
+
+	dest.expected = fs_info->balance_info->expected;
+	dest.completed = fs_info->balance_info->completed;
+
+	spin_unlock(&fs_info->balance_info_lock);
+
+	if (copy_to_user(user_dest, &dest,
+			 sizeof(struct btrfs_ioctl_balance_progress)))
+		return -EFAULT;
+
+	return 0;
+
+error:
+	spin_unlock(&fs_info->balance_info_lock);
+	return ret;
+}
+
 long btrfs_ioctl(struct file *file, unsigned int
 		cmd, unsigned long arg)
 {
@@ -2414,6 +2446,8 @@ long btrfs_ioctl(struct file *file, unsigned int
 		return btrfs_ioctl_rm_dev(root, argp);
 	case BTRFS_IOC_BALANCE:
 		return btrfs_balance(root->fs_info->dev_root);
+	case BTRFS_IOC_BALANCE_PROGRESS:
+		return btrfs_ioctl_balance_progress(root->fs_info, argp);
 	case BTRFS_IOC_CLONE:
 		return btrfs_ioctl_clone(file, arg, 0, 0, 0);
 	case BTRFS_IOC_CLONE_RANGE:
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index 8fb3821..7c37c6b 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -157,6 +157,11 @@ struct btrfs_ioctl_space_args {
 	struct btrfs_ioctl_space_info spaces[0];
 };
 
+struct btrfs_ioctl_balance_progress {
+	__u32 expected;
+	__u32 completed;
+};
+
 #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
 				   struct btrfs_ioctl_vol_args)
 #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
@@ -203,4 +208,6 @@ struct btrfs_ioctl_space_args {
 				   struct btrfs_ioctl_vol_args_v2)
 #define BTRFS_IOC_SUBVOL_GETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 25, __u64)
 #define BTRFS_IOC_SUBVOL_SETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 26, __u64)
+#define BTRFS_IOC_BALANCE_PROGRESS _IOR(BTRFS_IOCTL_MAGIC, 27, \
+				  struct btrfs_ioctl_balance_progress)
 #endif
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index dd13eb8..bb2ffed 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2041,6 +2041,7 @@ int btrfs_balance(struct btrfs_root *dev_root)
 	struct btrfs_root *chunk_root = dev_root->fs_info->chunk_root;
 	struct btrfs_trans_handle *trans;
 	struct btrfs_key found_key;
+	struct btrfs_balance_info *bal_info;
 
 	if (dev_root->fs_info->sb->s_flags & MS_RDONLY)
 		return -EROFS;
@@ -2051,6 +2052,20 @@ int btrfs_balance(struct btrfs_root *dev_root)
 	mutex_lock(&dev_root->fs_info->volume_mutex);
 	dev_root = dev_root->fs_info->dev_root;
 
+	bal_info = kmalloc(
+		sizeof(struct btrfs_balance_info),
+		GFP_NOFS);
+	if (!bal_info) {
+		ret = -ENOMEM;
+		goto error_no_status;
+	}
+	spin_lock(&dev_root->fs_info->balance_info_lock);
+	dev_root->fs_info->balance_info = bal_info;
+	bal_info->expected = -1; /* One less than actually counted,
+				    because chunk 0 is special */
+	bal_info->completed = 0;
+	spin_unlock(&dev_root->fs_info->balance_info_lock);
+
 	/* step one make some room on all the devices */
 	list_for_each_entry(device, devices, dev_list) {
 		old_size = device->total_bytes;
@@ -2074,10 +2089,37 @@ int btrfs_balance(struct btrfs_root *dev_root)
 		btrfs_end_transaction(trans, dev_root);
 	}
 
-	/* step two, relocate all the chunks */
+	/* step two, count the chunks */
 	path = btrfs_alloc_path();
-	BUG_ON(!path);
+	if (!path) {
+		ret = -ENOMEM;
+		goto error;
+	}
+
+	key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID;
+	key.offset = (u64)-1;
+	key.type = BTRFS_CHUNK_ITEM_KEY;
+
+	ret = btrfs_search_slot(NULL, chunk_root, &key, path, 0, 0);
+	if (ret <= 0) {
+		printk(KERN_ERR "btrfs: Failed to find the last chunk.\n");
+		BUG();
+	}
+
+	while (1) {
+		ret = btrfs_previous_item(chunk_root, path, 0,
+					  BTRFS_CHUNK_ITEM_KEY);
+		if (ret)
+			break;
+
+		spin_lock(&dev_root->fs_info->balance_info_lock);
+		bal_info->expected++;
+		spin_unlock(&dev_root->fs_info->balance_info_lock);
+	}
+
+	btrfs_release_path(chunk_root, path);
 
+	/* step three, relocate all the chunks */
 	key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID;
 	key.offset = (u64)-1;
 	key.type = BTRFS_CHUNK_ITEM_KEY;
@@ -2115,10 +2157,20 @@ int btrfs_balance(struct btrfs_root *dev_root)
 					   found_key.offset);
 		BUG_ON(ret && ret != -ENOSPC);
 		key.offset = found_key.offset - 1;
+		spin_lock(&dev_root->fs_info->balance_info_lock);
+		bal_info->completed++;
+		spin_unlock(&dev_root->fs_info->balance_info_lock);
+		printk(KERN_INFO "btrfs: balance: %llu/%llu block groups completed\n",
+		       bal_info->completed, bal_info->expected);
 	}
 	ret = 0;
 error:
 	btrfs_free_path(path);
+	spin_lock(&dev_root->fs_info->balance_info_lock);
+	kfree(dev_root->fs_info->balance_info);
+	dev_root->fs_info->balance_info = NULL;
+	spin_unlock(&dev_root->fs_info->balance_info_lock);
+error_no_status:
 	mutex_unlock(&dev_root->fs_info->volume_mutex);
 	return ret;
 }
-- 
1.7.2.5


^ permalink raw reply related

* [PATCH v5 0/8] Balance mangement
From: Hugo Mills @ 2011-04-10 21:06 UTC (permalink / raw)
  To: chris.mason, dave, lizf; +Cc: linux-btrfs

   Hi, Chris,

   Another iteration of the balance management patches. This includes
suggestions from David Sterba, who did a fairly comprehensive review
of the patch series on IRC. It also includes fixes for comments from
Josef, and Li Zefan. The only thing I've not included here is Li's
suggestion of keeping track of the size of the chunks and the data in
them -- I'm working on the patch for that, and it'll be along once
I've had a chance to test it sensibly.

   Hugo.

---

Hugo Mills (8):
  btrfs: Balance progress monitoring
  btrfs: Cancel filesystem balance
  btrfs: Factor out enumeration of chunks to a separate function
  btrfs: Implement filtered balance ioctl
  btrfs: Balance filter for device ID
  btrfs: Balance filter for virtual address ranges
  btrfs: Replication-type information
  btrfs: Balance filter for physical device address

 fs/btrfs/ctree.h   |   10 ++
 fs/btrfs/disk-io.c |    2 +
 fs/btrfs/ioctl.c   |  104 +++++++++++++++-
 fs/btrfs/ioctl.h   |   49 +++++++
 fs/btrfs/super.c   |   16 +--
 fs/btrfs/volumes.c |  354 +++++++++++++++++++++++++++++++++++++++++-----------
 fs/btrfs/volumes.h |   21 +++-
 7 files changed, 468 insertions(+), 88 deletions(-)

-- 
1.7.2.5


^ permalink raw reply

* Re: [PATCH v2 1/2] strbuf: make sure buffer is zero-terminated
From: Jeff King @ 2011-04-10 21:05 UTC (permalink / raw)
  To: Erik Faye-Lund; +Cc: git, jwa, drew.northup
In-Reply-To: <BANLkTinKzatY-1kxLJ73TeDyMW175pr77A@mail.gmail.com>

On Sun, Apr 10, 2011 at 11:04:26PM +0200, Erik Faye-Lund wrote:

> > It is more than just detach, though; the
> > NUL-termination is supposed to be an invariant of strbuf, so any code
> > just looking at "sb.buf" would be broken. So your code looks fine, but
> > you may want to mention that in the commit message.
> >
> 
> You're right. How about something like this instead?
> 
> strbuf_init does not zero-terminate the initial buffer when hint is
> non-zero. Fix this so we can rely on the string to be zero-terminated
> even if we haven't filled it with anything yet.

Sure, that's fine.

-Peff

^ permalink raw reply

* Re: [PATCH v2 1/2] strbuf: make sure buffer is zero-terminated
From: Erik Faye-Lund @ 2011-04-10 21:04 UTC (permalink / raw)
  To: Jeff King; +Cc: git, jwa, drew.northup
In-Reply-To: <20110410205711.GA2069@sigill.intra.peff.net>

On Sun, Apr 10, 2011 at 10:57 PM, Jeff King <peff@peff.net> wrote:
> On Sun, Apr 10, 2011 at 10:54:17PM +0200, Erik Faye-Lund wrote:
>
>> strbuf_init does not zero-terminate the initial buffer when hint is
>> non-zero. Fix this so strbuf_attach does not return garbage.
>
> s/attach/detach/ I think.

Indeed, thanks for catching it.

> It is more than just detach, though; the
> NUL-termination is supposed to be an invariant of strbuf, so any code
> just looking at "sb.buf" would be broken. So your code looks fine, but
> you may want to mention that in the commit message.
>

You're right. How about something like this instead?

strbuf_init does not zero-terminate the initial buffer when hint is
non-zero. Fix this so we can rely on the string to be zero-terminated
even if we haven't filled it with anything yet.

^ permalink raw reply

* Re: Firmware files for Ralink RT28x0
From: Ben Hutchings @ 2011-04-10 21:03 UTC (permalink / raw)
  To: Xose Vazquez Perez; +Cc: users, linux-wireless
In-Reply-To: <4DA2042A.3010301@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2558 bytes --]

On Sun, 2011-04-10 at 21:25 +0200, Xose Vazquez Perez wrote:
> Ben Hutchings wrote:
> 
> > Ralink provides multiple drivers per bus type for RT28xx and later
> > chips.  For PCI devices they split between RT2860 and RT309x; for USB
> > devices they split between RT2870 and RT307x (I think - the chip model
> > numbers don't seem to be stated consistently).
> > 
> > In addition, the USB drivers have two separate images packed together
> > and they can select different images based on the controller version:
> > 
> > #ifdef RTMP_MAC_USB
> > 		if ((Version != 0x2860) && (Version != 0x2872) && (Version != 0x3070)) 
> > 		{	// Use Firmware V2.
> > 			//printk("KH:Use New Version,part2\n");
> > 			pFirmwareImage = (PUCHAR)&FirmwareImage[FIRMWAREIMAGEV1_LENGTH];
> > 			FileLength = FIRMWAREIMAGEV2_LENGTH;
> > 		}
> > 		else
> > 		{
> > 			//printk("KH:Use New Version,part1\n");
> > 			pFirmwareImage = FirmwareImage;
> > 			FileLength = FIRMWAREIMAGEV1_LENGTH;
> > 		}
> > #endif // RTMP_MAC_USB //
> > 
> > The firmware blobs in RT2870 version 2009-08-20 and RT3070 version
> > 2009-05-25 are all marked as version 17 (or 0.17), but *they all have
> > different contents*.
> > 
> > I attempted to maintain the same version selection logic when converting
> > the staging drivers to use the firmware loader, since I assumed there
> > was a good reason for it.
> > 
> 
> As you can see in the ralink web[1] RT28XX/RT30XX USB devices (RT2870/RT2770/RT3572/RT3070)
> need _only_ the rt2870.bin fw-file.
> 
> And RT28XX/RT30XX PCI/mPCI/PCIe/CardBus devices
> (RT2760/RT2790/RT2860/RT2890/RT3060/RT3062/RT3562/RT2860/RT2760/RT2890/RT2790/RT3090)
> need _only_ the rt2860.bin fw-file.

These files aren't used by the Ralink drivers.  So why should you
believe the labels on them?

> > linux-firmware is supposed to have all firmware files referenced by any
> > version of Linux
> 
> That's a good joke!
> linux-firmware is *unmaintained* , a lot of firmwares are missing.

linux-firmware is not *actively* maintained; it requires people to send
submissions (repeatedly...).

> Even the intel ones(microcode.dat, ipw2{1,2}*), zd1211, etc...

I think there may be a problem with distribution of Intel Pro Wireless
firmware because Intel requires users to accept a EULA.

> Others are very old, really it's a mess.
> Fedora puts _forty_ patches on top of linux-firmware.

So help to make it better.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply

* Re: [Qemu-devel] Re: [PATCH 4/5] softfloat: add float{32, 64, x80, 128}_unordered() functions
From: Aurelien Jarno @ 2011-04-10 21:00 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel
In-Reply-To: <BANLkTin4mxR0F1FUawnnEh21-KoVrC6yNA@mail.gmail.com>

On Sun, Apr 10, 2011 at 08:59:04PM +0100, Peter Maydell wrote:
> On 10 April 2011 20:13, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > Add float{32,64,x80,128}_unordered() functions to softfloat, matching
> > the softfloat-native ones. This allow target-i386/ops_sse.h to be
> > compiled with softfloat.
> 
> I guess you could have made the x86 target use float*_compare()
> instead, but I agree that it makes sense to have the unordered()
> comparison to match the other specific-comparison ops.

Given it's used in the same macro which also handle float*_le, _ge and
so on, it was easier that way. Also float*_compare() is probably a bit
slower as it does a bit more stuff.

> >  /*----------------------------------------------------------------------------
> > +| Returns 1 if the single-precision floating-point values `a' and `b' cannot
> > +| be compared, and 0 otherwise. The comparison is performed according to the
> > +| IEC/IEEE Standard for Binary Floating-Point Arithmetic.
> > +*----------------------------------------------------------------------------*/
> > +
> > +int float32_unordered( float32 a, float32 b STATUS_PARAM )
> > +{
> > +    a = float32_squash_input_denormal(a STATUS_VAR);
> > +    b = float32_squash_input_denormal(b STATUS_VAR);
> > +
> > +    if (    ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
> > +         || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
> > +       ) {
> > +        if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) {
> > +            float_raise( float_flag_invalid STATUS_VAR);
> > +        }
> > +        return 1;
> > +    }
> > +
> > +    return 0;
> > +}
> 
> So the NaN signalling semantics here are that we raise Invalid
> for an SNaN but not for a QNaN. That's correct for the x86 op
> we're implementing, but the float*_lt, _le and _compare functions
> use the _quiet suffix for these semantics (with plain float*_lt
> etc being "raise Invalid for both QNaN and SNaN"). So I think
> these functions should be float*_unordered_quiet().

Ok, will change that.

> Annoyingly for eq the two versions use a different convention,
> so we have float*_eq [raise Invalid only if SNaN] and
> float*_eq_signaling [for any NaN] -- ideally that inconsistency
> should be fixed...

I'll try to send a patch for that in my next version of the series.

> > +int float64_unordered( float64 a, float64 b STATUS_PARAM )
> > +{
> > +    a = float64_squash_input_denormal(a STATUS_VAR);
> > +    b = float64_squash_input_denormal(b STATUS_VAR);
> > +
> > +    if (    ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) )
> > +         || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) )
> > +       ) {
> > +        if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) {
> > +            float_raise( float_flag_invalid STATUS_VAR);
> > +        }
> > +        return 0;
> > +    }
> > +    return 1;
> > +}
> 
> You've got the sense the wrong way round on this one, I think.

Yup, good catch.

> I note that target-mips has a private float32_is_unordered()
> and float64_is_unordered() which could probably be cleaned
> up to use these instead. You'd need to implement both the
> float*_unordered() and float*_unordered_quiet() versions.
> 

I missed that when running grep. I'll also add that in my next version
of the series (so that will be x86 + mips at the end).

Thanks for the review!

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply

* Re: [PATCH v2 2/2] config: support values longer than 1023 bytes
From: Jeff King @ 2011-04-10 20:58 UTC (permalink / raw)
  To: Erik Faye-Lund; +Cc: git, jwa, drew.northup
In-Reply-To: <1302468858-7376-2-git-send-email-kusmabite@gmail.com>

On Sun, Apr 10, 2011 at 10:54:18PM +0200, Erik Faye-Lund wrote:

> parse_value in config.c has a static buffer of 1024 bytes that it
> parse the value into. This can sometimes be a problem when a
> config file contains very long values.
> 
> It's particularly amusing that git-config already is able to write
> such files, so it should probably be able to read them as well.
> 
> Fix this by using a strbuf instead of a fixed-size buffer.
> 
> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>

Looks fine to me.

Acked-by: Jeff King <peff@peff.net>

-Peff

^ permalink raw reply

* [PATCH v2] Re: btrfs does not work on usermode linux
From: Sergei Trofimovich @ 2011-04-10 20:58 UTC (permalink / raw)
  To: Sergei Trofimovich; +Cc: chris.mason, linux-btrfs, cwillu
In-Reply-To: <20110410232403.617c3b7f@sf>


[-- Attachment #1.1: Type: text/plain, Size: 648 bytes --]

On Sun, 10 Apr 2011 23:24:03 +0300
Sergei Trofimovich <slyich@gmail.com> wrote:

> Fix data corruption caused by memcpy() usage on overlapping data.
> I've observed it first when found out usermode linux crash on btrfs.

Changes since v1:

>  	else
>  		src_kaddr = dst_kaddr;
>  
> +	BUG_ON(abs(src_off - dst_off) < len);
>  	memcpy(dst_kaddr + dst_off, src_kaddr + src_off, len);

Too eager BUG_ON. Now used only for src_page == dst_page.

> -	if (dst_offset < src_offset) {
> +	if (abs(dst_offset - src_offset) >= len) {

abs() is not a good thing to use un unsigned values. aded helper overlapping_areas.

-- 

  Sergei

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-btrfs-properly-handle-overlapping-areas-in-memmove_e.patch --]
[-- Type: text/x-patch, Size: 4236 bytes --]

From 2ac9dd9cc54cee51c5c5219e35cca18a9f3f3a3f Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Sun, 10 Apr 2011 23:19:53 +0300
Subject: [PATCH] btrfs: properly handle overlapping areas in memmove_extent_buffer
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix data corruption caused by memcpy() usage on overlapping data.
I've observed it first when found out usermode linux crash on btrfs.

Сall chain is the following:
------------[ cut here ]------------
WARNING: at /home/slyfox/linux-2.6/fs/btrfs/extent_io.c:3900 memcpy_extent_buffer+0x1a5/0x219()
Call Trace:
6fa39a58:  [<601b495e>] _raw_spin_unlock_irqrestore+0x18/0x1c
6fa39a68:  [<60029ad9>] warn_slowpath_common+0x59/0x70
6fa39aa8:  [<60029b05>] warn_slowpath_null+0x15/0x17
6fa39ab8:  [<600efc97>] memcpy_extent_buffer+0x1a5/0x219
6fa39b48:  [<600efd9f>] memmove_extent_buffer+0x94/0x208
6fa39bc8:  [<600becbf>] btrfs_del_items+0x214/0x473
6fa39c78:  [<600ce1b0>] btrfs_delete_one_dir_name+0x7c/0xda
6fa39cc8:  [<600dad6b>] __btrfs_unlink_inode+0xad/0x25d
6fa39d08:  [<600d7864>] btrfs_start_transaction+0xe/0x10
6fa39d48:  [<600dc9ff>] btrfs_unlink_inode+0x1b/0x3b
6fa39d78:  [<600e04bc>] btrfs_unlink+0x70/0xef
6fa39dc8:  [<6007f0d0>] vfs_unlink+0x58/0xa3
6fa39df8:  [<60080278>] do_unlinkat+0xd4/0x162
6fa39e48:  [<600517db>] call_rcu_sched+0xe/0x10
6fa39e58:  [<600452a8>] __put_cred+0x58/0x5a
6fa39e78:  [<6007446c>] sys_faccessat+0x154/0x166
6fa39ed8:  [<60080317>] sys_unlink+0x11/0x13
6fa39ee8:  [<60016b80>] handle_syscall+0x58/0x70
6fa39f08:  [<60021377>] userspace+0x2d4/0x381
6fa39fc8:  [<60014507>] fork_handler+0x62/0x69
---[ end trace 70b0ca2ef0266b93 ]---

http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg09302.html

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
 fs/btrfs/extent_io.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 20ddb28..786a0f7 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3878,31 +3878,40 @@ static void move_pages(struct page *dst_page, struct page *src_page,
 		char *s = src_kaddr + src_off + len;
 
 		while (len--)
 			*--p = *--s;
 
 		kunmap_atomic(src_kaddr, KM_USER1);
 	}
 	kunmap_atomic(dst_kaddr, KM_USER0);
 }
 
+static inline bool areas_overlap(unsigned long src, unsigned long dst, unsigned long len)
+{
+	unsigned long distance = (src > dst) ? src - dst : dst - src;
+	return distance < len;
+}
+
 static void copy_pages(struct page *dst_page, struct page *src_page,
 		       unsigned long dst_off, unsigned long src_off,
 		       unsigned long len)
 {
 	char *dst_kaddr = kmap_atomic(dst_page, KM_USER0);
 	char *src_kaddr;
 
 	if (dst_page != src_page)
 		src_kaddr = kmap_atomic(src_page, KM_USER1);
 	else
+	{
 		src_kaddr = dst_kaddr;
+		BUG_ON(areas_overlap(src_off, dst_off, len));
+	}
 
 	memcpy(dst_kaddr + dst_off, src_kaddr + src_off, len);
 	kunmap_atomic(dst_kaddr, KM_USER0);
 	if (dst_page != src_page)
 		kunmap_atomic(src_kaddr, KM_USER1);
 }
 
 void memcpy_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset,
 			   unsigned long src_offset, unsigned long len)
 {
@@ -3963,21 +3972,21 @@ void memmove_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset,
 	if (src_offset + len > dst->len) {
 		printk(KERN_ERR "btrfs memmove bogus src_offset %lu move "
 		       "len %lu len %lu\n", src_offset, len, dst->len);
 		BUG_ON(1);
 	}
 	if (dst_offset + len > dst->len) {
 		printk(KERN_ERR "btrfs memmove bogus dst_offset %lu move "
 		       "len %lu len %lu\n", dst_offset, len, dst->len);
 		BUG_ON(1);
 	}
-	if (dst_offset < src_offset) {
+	if (!areas_overlap(src_offset, dst_offset, len)) {
 		memcpy_extent_buffer(dst, dst_offset, src_offset, len);
 		return;
 	}
 	while (len > 0) {
 		dst_i = (start_offset + dst_end) >> PAGE_CACHE_SHIFT;
 		src_i = (start_offset + src_end) >> PAGE_CACHE_SHIFT;
 
 		dst_off_in_page = (start_offset + dst_end) &
 			((unsigned long)PAGE_CACHE_SIZE - 1);
 		src_off_in_page = (start_offset + src_end) &
-- 
1.7.3.4


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply related

* Re: [PATCH] net: sky2: convert to hw_features
From: David Miller @ 2011-04-10 20:58 UTC (permalink / raw)
  To: shemminger; +Cc: mirq-linux, netdev
In-Reply-To: <20110410135007.7a4eccdf@nehalam>

From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Sun, 10 Apr 2011 13:50:07 -0700

> You lost GRO flag in the conversion. Since code calls gro_receive,
> this is necessary.

I think the way it works now is that the generic core turns on
GRO all the time, and this way driver's don't need to be concerned
about it.

^ permalink raw reply

* [PATCH 1/1] gst-plugins-good: add dependcy on libsoup-2.4
From: Saul Wold @ 2011-04-10 20:55 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1302468695.git.sgw@linux.intel.com>

From: Saul Wold <sgw@linux.intel.com>

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../gstreamer/gst-plugins-good_0.10.26.bb          |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.26.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.26.bb
index ac47ecf..cab728d 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.26.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.26.bb
@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
                     file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
 
 DEPENDS += "gst-plugins-base gconf cairo jpeg libpng gtk+ zlib libid3tag flac \
-	    speex"
-PR = "r1"
+	    speex libsoup-2.4"
+PR = "r2"
 
 inherit gettext
 
-- 
1.7.1.1




^ permalink raw reply related

* [Bug 35434] [RADEON:KMS:R600G] etqw: broken ground textures
From: bugzilla-daemon @ 2011-04-10 20:57 UTC (permalink / raw)
  To: dri-devel
In-Reply-To: <bug-35434-502@http.bugs.freedesktop.org/>

https://bugs.freedesktop.org/show_bug.cgi?id=35434

--- Comment #6 from Benjamin Bellec <b.bellec@gmail.com> 2011-04-10 13:57:46 PDT ---
With current git I still have these artifacts. But each times I run a 3D
applications I have these errors :
EE r600_pipe.c:431 r600_get_param - r600: unknown param 45

For instance :
$ glxinfo | grep "OpenGL version string"
EE r600_pipe.c:431 r600_get_param - r600: unknown param 45
OpenGL version string: 2.1 Mesa 7.11-devel (git-a26121f)

Perhaps it's related ? Or should I open another bug ?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply

* [PATCH 0/1] gst-plugins-good: add libsoup as a dependency
From: Saul Wold @ 2011-04-10 20:55 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

When souphttpsrc was added to gst-meta-base, the dependency was
not set up correctly in gst-plugins-good. This patch fixes that
problem.

Sau!


Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: distro/oe-core
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=distro/oe-core

Thanks,
    Saul Wold <sgw@linux.intel.com>
---


Saul Wold (1):
  gst-plugins-good: add dependency on libsoup-2.4

 .../gstreamer/gst-plugins-good_0.10.26.bb          |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)




^ permalink raw reply


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.