public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/
@ 2017-02-11 20:16 David Seifert
  0 siblings, 0 replies; 4+ messages in thread
From: David Seifert @ 2017-02-11 20:16 UTC (permalink / raw
  To: gentoo-commits

commit:     6a4f743f7a934e4cb5d11842d890bd5f813c4daf
Author:     Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sat Feb 11 16:30:51 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Feb 11 20:15:03 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a4f743f

sys-fs/btrfs-progs: remove unused patches

Closes: https://github.com/gentoo/gentoo/pull/3914

 ...ogs-0.19-convert-remove-used-space-update.patch |  30 -----
 .../files/btrfs-progs-0.19-fix-underlinking.patch  |  11 --
 .../files/btrfs-progs-0.19-glibc212.patch          |  17 ---
 .../files/btrfs-progs-3.12-defrag-sockets.patch    |  78 -----------
 .../btrfs-progs-3.12-fix-send-subvol-492776.patch  | 111 ----------------
 .../files/btrfs-progs-3.14.1-arg_strtou64.patch    | 146 ---------------------
 6 files changed, 393 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
deleted file mode 100644
index e326f34af7..0000000000
--- a/sys-fs/btrfs-progs/files/btrfs-progs-0.19-convert-remove-used-space-update.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- /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
deleted file mode 100644
index 38a0a18dbc..0000000000
--- a/sys-fs/btrfs-progs/files/btrfs-progs-0.19-fix-underlinking.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644
index 183fe2af3e..0000000000
--- a/sys-fs/btrfs-progs/files/btrfs-progs-0.19-glibc212.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-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
deleted file mode 100644
index e2feb0bdbe..0000000000
--- a/sys-fs/btrfs-progs/files/btrfs-progs-3.12-defrag-sockets.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-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
deleted file mode 100644
index 8a2cc7883a..0000000000
--- a/sys-fs/btrfs-progs/files/btrfs-progs-3.12-fix-send-subvol-492776.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-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
deleted file mode 100644
index a9cced815b..0000000000
--- a/sys-fs/btrfs-progs/files/btrfs-progs-3.14.1-arg_strtou64.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-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


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/
@ 2022-04-18  7:15 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-04-18  7:15 UTC (permalink / raw
  To: gentoo-commits

commit:     e800d7e6f70c02bf2b2844fef2e1f47c4e835daa
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Mon Apr 18 07:06:23 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 07:15:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e800d7e6

sys-fs/btrfs-progs: remove unused patches

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/25079
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/5.15-filesystem-usage-chunks.patch       | 94 ----------------------
 .../files/5.15-filesystem-usage-data.patch         | 37 ---------
 2 files changed, 131 deletions(-)

diff --git a/sys-fs/btrfs-progs/files/5.15-filesystem-usage-chunks.patch b/sys-fs/btrfs-progs/files/5.15-filesystem-usage-chunks.patch
deleted file mode 100644
index be58afc8712c..000000000000
--- a/sys-fs/btrfs-progs/files/5.15-filesystem-usage-chunks.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From:   Nikolay Borisov <nborisov@suse.com>
-To:     linux-btrfs@vger.kernel.org
-Cc:     Nikolay Borisov <nborisov@suse.com>
-Subject: [PATCH] Fix calculation of chunk size for RAID1/DUP profiles
-Date:   Tue, 16 Nov 2021 16:02:06 +0200
-Message-Id: <20211116140206.291252-1-nborisov@suse.com>
-List-ID: <linux-btrfs.vger.kernel.org>
-
-Current formula calculates the stripe size, however that's not what we want
-in the case of RAID1/DUP profiles. In those cases since chunkc are mirrored
-across devices we want the full size of the chunk. Without this patch the
-'btrfs fi usage' output from an fs which is using RAID1 is:
-
-	<snip>
-
-	Data,RAID1: Size:2.00GiB, Used:1.00GiB (50.03%)
-	   /dev/vdc	   1.00GiB
-	   /dev/vdf	   1.00GiB
-
-	Metadata,RAID1: Size:256.00MiB, Used:1.34MiB (0.52%)
-	   /dev/vdc	 128.00MiB
-	   /dev/vdf	 128.00MiB
-
-	System,RAID1: Size:8.00MiB, Used:16.00KiB (0.20%)
-	   /dev/vdc	   4.00MiB
-	   /dev/vdf	   4.00MiB
-
-	Unallocated:
-	   /dev/vdc	   8.87GiB
-	   /dev/vdf	   8.87GiB
-
-
-So a 2 gigabyte RAID1 chunk actually will take up 4 gigabytes on the actual disks
-2 each. In this case this is being miscalculated as taking up 1gb on each device.
-
-This also leads to erroneously calculated unallocated space. The correct output
-in this case is:
-
-	<snip>
-
-	Data,RAID1: Size:2.00GiB, Used:1.00GiB (50.03%)
-	   /dev/vdc	   2.00GiB
-	   /dev/vdf	   2.00GiB
-
-	Metadata,RAID1: Size:256.00MiB, Used:1.34MiB (0.52%)
-	   /dev/vdc	 256.00MiB
-	   /dev/vdf	 256.00MiB
-
-	System,RAID1: Size:8.00MiB, Used:16.00KiB (0.20%)
-	   /dev/vdc	   8.00MiB
-	   /dev/vdf	   8.00MiB
-
-	Unallocated:
-	   /dev/vdc	   7.74GiB
-	   /dev/vdf	   7.74GiB
-
-
-Fix it by only utilising the chunk formula for profiles which are not RAID1/DUP.
-
-Signed-off-by: Nikolay Borisov <nborisov@suse.com>
----
- cmds/filesystem-usage.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/cmds/filesystem-usage.c b/cmds/filesystem-usage.c
-index 6195f633da44..5f2289a9b40d 100644
---- a/cmds/filesystem-usage.c
-+++ b/cmds/filesystem-usage.c
-@@ -805,11 +805,17 @@ int load_chunk_and_device_info(int fd, struct chunk_info **chunkinfo,
-  */
- static u64 calc_chunk_size(struct chunk_info *ci)
- {
--	u32 div;
-+	u32 div = 1;
-
--	/* No parity + sub_stripes, so order of "-" and "/" does not matter */
--	div = (ci->num_stripes - btrfs_bg_type_to_nparity(ci->type)) /
--	      btrfs_bg_type_to_sub_stripes(ci->type);
-+	/*
-+	 * The formula doesn't work for RAID1/DUP types, we should just return the
-+	 * chunk size
-+	 */
-+	if (!(ci->type & (BTRFS_BLOCK_GROUP_RAID1_MASK|BTRFS_BLOCK_GROUP_DUP))) {
-+		/* No parity + sub_stripes, so order of "-" and "/" does not matter */
-+		div = (ci->num_stripes - btrfs_bg_type_to_nparity(ci->type)) /
-+			btrfs_bg_type_to_sub_stripes(ci->type);
-+	}
-
- 	return ci->size / div;
- }
---
-2.17.1
-
-

diff --git a/sys-fs/btrfs-progs/files/5.15-filesystem-usage-data.patch b/sys-fs/btrfs-progs/files/5.15-filesystem-usage-data.patch
deleted file mode 100644
index f3b43d5c594d..000000000000
--- a/sys-fs/btrfs-progs/files/5.15-filesystem-usage-data.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 2f3950c8304fec2aed9bf11b52d073683b137330 Mon Sep 17 00:00:00 2001
-From: Nikolay Borisov <nborisov@suse.com>
-Date: Mon, 15 Nov 2021 11:15:42 +0200
-Subject: [PATCH] btrfs-progs: fi usage: don't reset ratio to 1 if we don't
- have RAID56 profile
-
-Commit 80714610f36e ("btrfs-progs: use raid table for ncopies")
-slightly broke how raid ratio are being calculated since the resulting
-code would always reset ratio to be 1 in case we didn't have RAID56
-profile. The correct behavior is to simply set it to 0 if we have RAID56
-as the calculation is different in this case and leave it intact
-otherwise.
-
-This bug manifests by doing all size-related calculation for 'btrfs
-filesystem usage' command as if all block groups are of type SINGLE. Fix
-this by only resetting ratio 0 in case of RAID56.
-
-Issue: #422
-Signed-off-by: Nikolay Borisov <nborisov@suse.com>
-Signed-off-by: David Sterba <dsterba@suse.com>
----
- cmds/filesystem-usage.c | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/cmds/filesystem-usage.c b/cmds/filesystem-usage.c
-index e22efe3a4..bac0f0fd5 100644
---- a/cmds/filesystem-usage.c
-+++ b/cmds/filesystem-usage.c
-@@ -508,8 +508,6 @@ static int print_filesystem_usage_overall(int fd, struct chunk_info *chunkinfo,
- 		 */
- 		if (flags & BTRFS_BLOCK_GROUP_RAID56_MASK)
- 			ratio = 0;
--		else
--			ratio = 1;
- 
- 		if (ratio > max_data_ratio)
- 			max_data_ratio = ratio;


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/
@ 2022-07-18 21:41 Conrad Kostecki
  0 siblings, 0 replies; 4+ messages in thread
From: Conrad Kostecki @ 2022-07-18 21:41 UTC (permalink / raw
  To: gentoo-commits

commit:     85a8243dcdfc6b3092fcbdcab11c2c4417b752e9
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri Jul 15 18:37:26 2022 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Mon Jul 18 21:41:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85a8243d

sys-fs/btrfs-progs: remove unused patch(es)

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/26428
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../files/5.16-linux-headers-before-5.11.patch     | 40 ----------------------
 1 file changed, 40 deletions(-)

diff --git a/sys-fs/btrfs-progs/files/5.16-linux-headers-before-5.11.patch b/sys-fs/btrfs-progs/files/5.16-linux-headers-before-5.11.patch
deleted file mode 100644
index 184656d96d22..000000000000
--- a/sys-fs/btrfs-progs/files/5.16-linux-headers-before-5.11.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-https://github.com/kdave/btrfs-progs/commit/b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58.patch
-https://bugs.gentoo.org/831817
-
-From b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58 Mon Sep 17 00:00:00 2001
-From: David Sterba <dsterba@suse.com>
-Date: Thu, 13 Jan 2022 14:47:08 +0100
-Subject: [PATCH] btrfs-progs: kerncompat: add local definition for alignment
- macros
-
-There's still problem left with compilation on musl and kernel < 5.11,
-because __ALIGN_KERNEL is not defined anymore:
-
-../bin/ld: kernel-shared/volumes.o: in function `create_chunk':
-volumes.c:(.text+0x17f8): undefined reference to `__ALIGN_KERNEL'
-
-Due to the entangled includes and unconditional definition of
-__ALIGN_KERNEL, we can't use #ifdef in kerncompat.h to define it
-eventually (as kerncompat.h is the first include). Instead add local
-definitions of the macros and rename them to avoid name clashes.
-
-Pull-request: #433
-Signed-off-by: David Sterba <dsterba@suse.com>
---- a/kerncompat.h
-+++ b/kerncompat.h
-@@ -359,7 +359,14 @@ do {					\
- 
- /* Alignment check */
- #define IS_ALIGNED(x, a)                (((x) & ((typeof(x))(a) - 1)) == 0)
--#define ALIGN(x, a)		__ALIGN_KERNEL((x), (a))
-+
-+/*
-+ * Alignment, copied and renamed from /usr/include/linux/const.h to work around
-+ * issues caused by moving the definition in 5.12
-+ */
-+#define __ALIGN_KERNEL__(x, a)		__ALIGN_KERNEL_MASK__(x, (typeof(x))(a) - 1)
-+#define __ALIGN_KERNEL_MASK__(x, mask)	(((x) + (mask)) & ~(mask))
-+#define ALIGN(x, a)		__ALIGN_KERNEL__((x), (a))
- 
- static inline int is_power_of_2(unsigned long n)
- {


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/
@ 2023-11-20 20:20 Ulrich Müller
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Müller @ 2023-11-20 20:20 UTC (permalink / raw
  To: gentoo-commits

commit:     1dbdd40bc95effbe216e1d0d9220563c1eed27ba
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Tue Nov  7 18:05:16 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Nov 20 20:19:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dbdd40b

sys-fs/btrfs-progs: remove unused patch(es)

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 .../files/btrfs-progs-6.6-fix-ioctl-typo.patch     | 32 ----------------------
 1 file changed, 32 deletions(-)

diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-6.6-fix-ioctl-typo.patch b/sys-fs/btrfs-progs/files/btrfs-progs-6.6-fix-ioctl-typo.patch
deleted file mode 100644
index a06b6bac6754..000000000000
--- a/sys-fs/btrfs-progs/files/btrfs-progs-6.6-fix-ioctl-typo.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://github.com/kdave/btrfs-progs/pull/706
-
-From 027a08d659033e3b892760bfd4c19c6db9e9fa3f Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyich@gmail.com>
-Date: Sun, 5 Nov 2023 20:13:07 +0000
-Subject: [PATCH] kernel-shared/uapi/btrfs.h: fix BTRFS_IOC_SCAN_DEV
-
-Without the change `BTRFS_IOC_SCAN_DEV` aliased with `BTRFS_IOC_FORGET_DEV`.
-It's a regression introduced in fcd9142b6 "btrfs-progs: docs: formatting,
-fixups, updates".
-
-It manifests as a sudden device disappearance when device is scanned:
-
-    machine # [    4.095032] Btrfs loaded, crc32c=crc32c-intel, zoned=no, fsverity=no
-    machine # ERROR: device scan failed on '/dev/vdb': No such file or directory
-    machine # ERROR: device scan failed on '/dev/vdc': No such file or directory
-    (finished: must succeed: mkfs.btrfs -d raid0 /dev/vdb /dev/vdc, in 10.31 seconds)
-
-Reported-by: Atemu <atemu.main@gmail.com>
-Bug: https://github.com/NixOS/nixpkgs/issues/265668
---- a/kernel-shared/uapi/btrfs.h
-+++ b/kernel-shared/uapi/btrfs.h
-@@ -1171,7 +1171,7 @@ enum btrfs_err_code {
- 				   struct btrfs_ioctl_vol_args)
- #define BTRFS_IOC_RESIZE _IOW(BTRFS_IOCTL_MAGIC, 3, \
- 				   struct btrfs_ioctl_vol_args)
--#define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 5, \
-+#define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \
- 				   struct btrfs_ioctl_vol_args)
- #define BTRFS_IOC_FORGET_DEV _IOW(BTRFS_IOCTL_MAGIC, 5, \
- 				   struct btrfs_ioctl_vol_args)
-


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

end of thread, other threads:[~2023-11-20 20:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-18  7:15 [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-11-20 20:20 Ulrich Müller
2022-07-18 21:41 Conrad Kostecki
2017-02-11 20:16 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox