summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-fs/btrfs-progs/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-fs/btrfs-progs/files')
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-0.19-convert-remove-used-space-update.patch30
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-0.19-fix-underlinking.patch11
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-0.19-glibc212.patch17
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-3.12-defrag-sockets.patch78
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-3.12-fix-send-subvol-492776.patch111
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-3.14.1-arg_strtou64.patch146
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-3.14.2-install-man.patch13
7 files changed, 406 insertions, 0 deletions
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-0.19-convert-remove-used-space-update.patch b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-convert-remove-used-space-update.patch
new file mode 100644
index 000000000000..e326f34af7e3
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-convert-remove-used-space-update.patch
@@ -0,0 +1,30 @@
+--- /var/tmp/portage/sys-fs/btrfs-progs-0.19/work/btrfs-progs-0.19/convert.c 2009-06-11 10:56:15.000000000 -0600
++++ btrfs-progs-unstable/convert.c 2009-09-21 08:51:43.773575874 -0600
+@@ -370,7 +370,6 @@
+ struct btrfs_extent_item *ei;
+ u32 blocksize = root->sectorsize;
+ u64 nbytes;
+- u64 bytes_used;
+
+ if (disk_bytenr == 0) {
+ ret = btrfs_insert_file_extent(trans, root, objectid,
+@@ -432,9 +431,6 @@
+ nbytes = btrfs_stack_inode_nbytes(inode) + num_bytes;
+ btrfs_set_stack_inode_nbytes(inode, nbytes);
+
+- bytes_used = btrfs_root_used(&root->root_item);
+- btrfs_set_root_used(&root->root_item, bytes_used + num_bytes);
+-
+ btrfs_release_path(root, &path);
+
+ ins_key.objectid = disk_bytenr;
+@@ -454,9 +450,6 @@
+
+ btrfs_mark_buffer_dirty(leaf);
+
+- bytes_used = btrfs_super_bytes_used(&info->super_copy);
+- btrfs_set_super_bytes_used(&info->super_copy, bytes_used +
+- num_bytes);
+ ret = btrfs_update_block_group(trans, root, disk_bytenr,
+ num_bytes, 1, 0);
+ if (ret)
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-0.19-fix-underlinking.patch b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-fix-underlinking.patch
new file mode 100644
index 000000000000..38a0a18dbc61
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-fix-underlinking.patch
@@ -0,0 +1,11 @@
+--- btrfs-progs-0.19/Makefile~ 2011-06-05 10:21:04.000000000 -0600
++++ btrfs-progs-0.19/Makefile 2011-06-05 10:21:46.000000000 -0600
+@@ -75,7 +75,7 @@ quick-test: $(objects) quick-test.o
+ gcc $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS)
+
+ convert: $(objects) convert.o
+- gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) $(LIBS)
++ gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs -lcom_err $(LDFLAGS) $(LIBS)
+
+ ioctl-test: $(objects) ioctl-test.o
+ gcc $(CFLAGS) -o ioctl-test $(objects) ioctl-test.o $(LDFLAGS) $(LIBS)
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-0.19-glibc212.patch b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-glibc212.patch
new file mode 100644
index 000000000000..183fe2af3ea3
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-glibc212.patch
@@ -0,0 +1,17 @@
+btrfsck.o: In function `maybe_free_inode_rec':
+btrfsck.c:(.text+0xce6): undefined reference to `S_ISDIR'
+btrfsck.c:(.text+0xd13): undefined reference to `S_ISREG'
+btrfsck.c:(.text+0xdc7): undefined reference to `S_ISREG'
+btrfsck.c:(.text+0xe2e): undefined reference to `S_ISLNK'
+btrfsck.c:(.text+0xe5b): undefined reference to `S_ISLNK'
+
+--- btrfsck.c
++++ btrfsck.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
++#include <sys/stat.h>
+ #include "kerncompat.h"
+ #include "ctree.h"
+ #include "disk-io.h"
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-3.12-defrag-sockets.patch b/sys-fs/btrfs-progs/files/btrfs-progs-3.12-defrag-sockets.patch
new file mode 100644
index 000000000000..e2feb0bdbefa
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-3.12-defrag-sockets.patch
@@ -0,0 +1,78 @@
+From: Pascal VITOUX <vitoux.pascal@gmail.com>
+To: linux-btrfs@vger.kernel.org
+Cc: Pascal VITOUX <vitoux.pascal@gmail.com>
+Subject: [PATCH] btrfs-progs: skip non-regular files while defragmenting
+Date: Thu, 9 Jan 2014 23:47:14 +0100
+Message-Id: <1389307634-8226-1-git-send-email-vitoux.pascal@gmail.com>
+X-Mailer: git-send-email 1.8.5.2
+Sender: linux-btrfs-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-btrfs.vger.kernel.org>
+X-Mailing-List: linux-btrfs@vger.kernel.org
+
+Skip non-regular files to avoid ioctl errors while defragmenting.
+
+They are silently ignored in recursive mode but reported as errors when
+used as command-line arguments.
+
+Signed-off-by: Pascal VITOUX <vitoux.pascal@gmail.com>
+Gentoo-bug: https://bugs.gentoo.org/503514
+Reported-by: Antoine Lemoine
+---
+ cmds-filesystem.c | 26 ++++++++++++++++----------
+ 1 file changed, 16 insertions(+), 10 deletions(-)
+
+diff --git a/cmds-filesystem.c b/cmds-filesystem.c
+index 1c1926b..54fba10 100644
+--- a/cmds-filesystem.c
++++ b/cmds-filesystem.c
+@@ -646,7 +646,7 @@ static int defrag_callback(const char *fpath, const struct stat *sb,
+ int e = 0;
+ int fd = 0;
+
+- if (typeflag == FTW_F) {
++ if ((typeflag == FTW_F) && S_ISREG(sb->st_mode)) {
+ if (defrag_global_verbose)
+ printf("%s\n", fpath);
+ fd = open(fpath, O_RDWR);
+@@ -748,6 +748,7 @@ static int cmd_defrag(int argc, char **argv)
+ defrag_global_range.flags |= BTRFS_DEFRAG_RANGE_START_IO;
+
+ for (i = optind; i < argc; i++) {
++ struct stat st;
+ dirstream = NULL;
+ fd = open_file_or_dir(argv[i], &dirstream);
+ if (fd < 0) {
+@@ -757,16 +758,21 @@ static int cmd_defrag(int argc, char **argv)
+ close_file_or_dir(fd, dirstream);
+ continue;
+ }
++ if (fstat(fd, &st)) {
++ fprintf(stderr, "ERROR: failed to stat %s - %s\n",
++ argv[i], strerror(errno));
++ defrag_global_errors++;
++ close_file_or_dir(fd, dirstream);
++ continue;
++ }
++ if (!(S_ISDIR(st.st_mode) || S_ISREG(st.st_mode))) {
++ fprintf(stderr, "ERROR: %s is not a directory or a regular "
++ "file.\n", argv[i]);
++ defrag_global_errors++;
++ close_file_or_dir(fd, dirstream);
++ continue;
++ }
+ if (recursive) {
+- struct stat st;
+-
+- if (fstat(fd, &st)) {
+- fprintf(stderr, "ERROR: failed to stat %s - %s\n",
+- argv[i], strerror(errno));
+- defrag_global_errors++;
+- close_file_or_dir(fd, dirstream);
+- continue;
+- }
+ if (S_ISDIR(st.st_mode)) {
+ ret = nftw(argv[i], defrag_callback, 10,
+ FTW_MOUNT | FTW_PHYS);
+--
+1.8.5.2
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-3.12-fix-send-subvol-492776.patch b/sys-fs/btrfs-progs/files/btrfs-progs-3.12-fix-send-subvol-492776.patch
new file mode 100644
index 000000000000..8a2cc7883a14
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-3.12-fix-send-subvol-492776.patch
@@ -0,0 +1,111 @@
+Gentoo-bug: http://bugs.gentoo.org/492776
+
+From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
+
+Steps to reproduce:
+ # mkfs.btrfs -f /dev/sda
+ # mount /dev/sda /mnt
+ # btrfs subvolume create /mnt/foo
+ # umount /mnt
+ # mount -o subvol=foo /dev/sda /mnt
+ # btrfs sub snapshot -r /mnt /mnt/snap
+ # btrfs send /mnt/snap > /dev/null
+
+We will fail to send '/mnt/snap',this is because btrfs send try to
+open '/mnt/snap' by btrfs internal subvolume path 'foo/snap' rather
+than relative path based on mounted point, this will return us 'no
+such file or directory',this is not right, fix it.
+
+Reported-by: Thomas Scheiblauer <tom@sharkbay.at>
+Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
+---
+v1->v2:
+ code cleanups(thanks to Stefan)
+---
+ cmds-send.c | 34 ++++++----------------------------
+ 1 file changed, 6 insertions(+), 28 deletions(-)
+
+diff --git a/cmds-send.c b/cmds-send.c
+index 53e9a53..6fdfd7f 100644
+--- a/cmds-send.c
++++ b/cmds-send.c
+@@ -282,31 +282,21 @@ out:
+ return ERR_PTR(ret);
+ }
+
+-static int do_send(struct btrfs_send *send, u64 root_id, u64 parent_root_id,
+- int is_first_subvol, int is_last_subvol)
++static int do_send(struct btrfs_send *send, u64 parent_root_id,
++ int is_first_subvol, int is_last_subvol, char *subvol)
+ {
+ int ret;
+ pthread_t t_read;
+ pthread_attr_t t_attr;
+ struct btrfs_ioctl_send_args io_send;
+- struct subvol_info *si;
+ void *t_err = NULL;
+ int subvol_fd = -1;
+ int pipefd[2] = {-1, -1};
+
+- si = subvol_uuid_search(&send->sus, root_id, NULL, 0, NULL,
+- subvol_search_by_root_id);
+- if (!si) {
+- ret = -ENOENT;
+- fprintf(stderr, "ERROR: could not find subvol info for %llu",
+- root_id);
+- goto out;
+- }
+-
+- subvol_fd = openat(send->mnt_fd, si->path, O_RDONLY | O_NOATIME);
++ subvol_fd = openat(send->mnt_fd, subvol, O_RDONLY | O_NOATIME);
+ if (subvol_fd < 0) {
+ ret = -errno;
+- fprintf(stderr, "ERROR: open %s failed. %s\n", si->path,
++ fprintf(stderr, "ERROR: open %s failed. %s\n", subvol,
+ strerror(-ret));
+ goto out;
+ }
+@@ -385,10 +375,6 @@ out:
+ close(pipefd[0]);
+ if (pipefd[1] != -1)
+ close(pipefd[1]);
+- if (si) {
+- free(si->path);
+- free(si);
+- }
+ return ret;
+ }
+
+@@ -664,14 +650,6 @@ int cmd_send(int argc, char **argv)
+ goto out;
+ }
+
+- ret = get_root_id(&send, get_subvol_name(send.root_path, subvol),
+- &root_id);
+- if (ret < 0) {
+- fprintf(stderr, "ERROR: could not resolve root_id "
+- "for %s\n", subvol);
+- goto out;
+- }
+-
+ if (!full_send && !parent_root_id) {
+ ret = find_good_parent(&send, root_id, &parent_root_id);
+ if (ret < 0) {
+@@ -700,8 +678,8 @@ int cmd_send(int argc, char **argv)
+ is_first_subvol = 1;
+ is_last_subvol = 1;
+ }
+- ret = do_send(&send, root_id, parent_root_id,
+- is_first_subvol, is_last_subvol);
++ ret = do_send(&send, parent_root_id, is_first_subvol,
++ is_last_subvol, subvol);
+ if (ret < 0)
+ goto out;
+
+--
+1.8.4
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-3.14.1-arg_strtou64.patch b/sys-fs/btrfs-progs/files/btrfs-progs-3.14.1-arg_strtou64.patch
new file mode 100644
index 000000000000..a9cced815b21
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-3.14.1-arg_strtou64.patch
@@ -0,0 +1,146 @@
+From: David Sterba <dsterba@suse.cz>
+To: linux-btrfs@vger.kernel.org
+Subject: [PATCH v2] btrfs-progs: move arg_strtou64 to a separate file for library
+Date: Tue, 22 Apr 2014 17:49:01 +0200
+
+Linking with libbtrfs fails because arg_strtou64 is not defined and we
+cannot just add utils.o to library objects because it's not
+library-clean.
+
+Reported-by: Arvin Schnell <aschnell@suse.com>
+Reported-by: Anton Farygin <rider@altlinux.org>
+Signed-off-by: David Sterba <dsterba@suse.cz>
+---
+
+v2: (thanks to Hugo)
+- added missing line from comment
+- fixed typo
+- reformated comment paragraphs
+
+ Makefile | 5 +++--
+ utils-lib.c | 42 ++++++++++++++++++++++++++++++++++++++++++
+ utils.c | 33 ---------------------------------
+ 3 files changed, 45 insertions(+), 35 deletions(-)
+ create mode 100644 utils-lib.c
+
+diff --git a/Makefile b/Makefile
+index 51d53fadf5af..76565e8b2307 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,14 +9,15 @@ CFLAGS = -g -O1 -fno-strict-aliasing
+ objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
+ root-tree.o dir-item.o file-item.o inode-item.o inode-map.o \
+ extent-cache.o extent_io.o volumes.o utils.o repair.o \
+- qgroup.o raid6.o free-space-cache.o list_sort.o props.o
++ qgroup.o raid6.o free-space-cache.o list_sort.o props.o \
++ utils-lib.o
+ cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
+ cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \
+ cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \
+ cmds-restore.o cmds-rescue.o chunk-recover.o super-recover.o \
+ cmds-property.o
+ libbtrfs_objects = send-stream.o send-utils.o rbtree.o btrfs-list.o crc32c.o \
+- uuid-tree.o
++ uuid-tree.o utils-lib.o
+ libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \
+ crc32c.h list.h kerncompat.h radix-tree.h extent-cache.h \
+ extent_io.h ioctl.h ctree.h btrfsck.h
+diff --git a/utils-lib.c b/utils-lib.c
+new file mode 100644
+index 000000000000..9d53c6e5c710
+--- /dev/null
++++ b/utils-lib.c
+@@ -0,0 +1,42 @@
++#define _GNU_SOURCE
++
++#include "kerncompat.h"
++#include <unistd.h>
++#include <stdlib.h>
++#include <limits.h>
++
++#if BTRFS_FLAT_INCLUDES
++#else
++#endif /* BTRFS_FLAT_INCLUDES */
++
++/*
++ * This function should be only used when parsing command arg, it won't return
++ * error to its caller and rather exit directly just like usage().
++ */
++u64 arg_strtou64(const char *str)
++{
++ u64 value;
++ char *ptr_parse_end = NULL;
++
++ value = strtoull(str, &ptr_parse_end, 0);
++ if (ptr_parse_end && *ptr_parse_end != '\0') {
++ fprintf(stderr, "ERROR: %s is not a valid numeric value.\n",
++ str);
++ exit(1);
++ }
++
++ /*
++ * if we pass a negative number to strtoull, it will return an
++ * unexpected number to us, so let's do the check ourselves.
++ */
++ if (str[0] == '-') {
++ fprintf(stderr, "ERROR: %s: negative value is invalid.\n",
++ str);
++ exit(1);
++ }
++ if (value == ULLONG_MAX) {
++ fprintf(stderr, "ERROR: %s is too large.\n", str);
++ exit(1);
++ }
++ return value;
++}
+diff --git a/utils.c b/utils.c
+index 29953d9dd2a9..e130849c7bb5 100644
+--- a/utils.c
++++ b/utils.c
+@@ -1538,39 +1538,6 @@ scan_again:
+ return 0;
+ }
+
+-/*
+- * This function should be only used when parsing
+- * command arg, it won't return error to it's
+- * caller and rather exit directly just like usage().
+- */
+-u64 arg_strtou64(const char *str)
+-{
+- u64 value;
+- char *ptr_parse_end = NULL;
+-
+- value = strtoull(str, &ptr_parse_end, 0);
+- if (ptr_parse_end && *ptr_parse_end != '\0') {
+- fprintf(stderr, "ERROR: %s is not a valid numeric value.\n",
+- str);
+- exit(1);
+- }
+- /*
+- * if we pass a negative number to strtoull,
+- * it will return an unexpected number to us,
+- * so let's do the check ourselves.
+- */
+- if (str[0] == '-') {
+- fprintf(stderr, "ERROR: %s: negative value is invalid.\n",
+- str);
+- exit(1);
+- }
+- if (value == ULLONG_MAX) {
+- fprintf(stderr, "ERROR: %s is too large.\n", str);
+- exit(1);
+- }
+- return value;
+-}
+-
+ u64 parse_size(char *s)
+ {
+ int i;
+--
+1.9.0
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-3.14.2-install-man.patch b/sys-fs/btrfs-progs/files/btrfs-progs-3.14.2-install-man.patch
new file mode 100644
index 000000000000..69e36aaadeba
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-3.14.2-install-man.patch
@@ -0,0 +1,13 @@
+diff --git a/Documentation/Makefile b/Documentation/Makefile
+index 034559e..f461bf2 100644
+--- a/Documentation/Makefile
++++ b/Documentation/Makefile
+@@ -75,7 +75,7 @@ install: install-man
+ install-man: man
+ $(INSTALL) -d -m 755 $(DESTDIR)$(man8dir)
+ $(INSTALL) -m 644 $(GZ_MAN8) $(DESTDIR)$(man8dir)
+- $(LNS) btrfs-check.8.gz $(DESTDIR)$(man8dir)
++ $(LNS) btrfs-check.8.gz $(DESTDIR)$(man8dir)/btrfsck.8.gz
+
+ clean:
+ $(RM) *.xml *.xml+ *.8 *.8.gz