summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Hoffstätte <holger@applied-asynchrony.com>2023-06-13 16:03:40 +0200
committerSam James <sam@gentoo.org>2023-06-14 03:51:04 +0100
commit5c08f76951bd55ac4aea016ec515886acc8e1f76 (patch)
treec77e2e525f103f8f4049bb4a703df6019bfdaf0a /dev-python/btrfs/files/13-002-show_file_csum-fix-vaddr-computation.patch
parentapp-backup/duplicity: add pypi upstream metadata (diff)
downloadgentoo-5c08f76951bd55ac4aea016ec515886acc8e1f76.tar.gz
gentoo-5c08f76951bd55ac4aea016ec515886acc8e1f76.tar.bz2
gentoo-5c08f76951bd55ac4aea016ec515886acc8e1f76.zip
dev-python/btrfs: new package, add v13 + support for block-group-tree
Closes: https://bugs.gentoo.org/908452 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Closes: https://github.com/gentoo/gentoo/pull/31416 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/btrfs/files/13-002-show_file_csum-fix-vaddr-computation.patch')
-rw-r--r--dev-python/btrfs/files/13-002-show_file_csum-fix-vaddr-computation.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/dev-python/btrfs/files/13-002-show_file_csum-fix-vaddr-computation.patch b/dev-python/btrfs/files/13-002-show_file_csum-fix-vaddr-computation.patch
new file mode 100644
index 000000000000..dcf81c7566de
--- /dev/null
+++ b/dev-python/btrfs/files/13-002-show_file_csum-fix-vaddr-computation.patch
@@ -0,0 +1,27 @@
+
+Patch from:
+https://github.com/knorrie/python-btrfs/commit/8ebe99f77b5e4da38d8e9322bb5a7c4688c98b4a
+
+From 8ebe99f77b5e4da38d8e9322bb5a7c4688c98b4a Mon Sep 17 00:00:00 2001
+From: Cebtenzzre <cebtenzzre@gmail.com>
+Date: Sun, 28 Nov 2021 14:46:39 -0500
+Subject: [PATCH] examples/show_file_csum: Fix vaddr computation
+
+extent.logical_offset is relative to the start of the file, whereas
+extent.offset is relative to the start of the extent data on disk.
+--- a/examples/show_file_csum.py
++++ b/examples/show_file_csum.py
+@@ -90,11 +90,11 @@ def first_regular_file_extent(inum, tree):
+ "inside a data extent at vaddr {}.".format(
+ extent.logical_offset, extent.num_bytes, extent.offset, extent.disk_bytenr))
+
+-vaddr = extent.disk_bytenr + extent.logical_offset
++vaddr = extent.disk_bytenr + extent.offset
+
+ wraprint("Now, we first look up the checksum value for one block ({} bytes) "
+ "of data at vaddr {} ({} + {}).".format(
+- fs.sectorsize, vaddr, extent.disk_bytenr, extent.logical_offset))
++ fs.sectorsize, vaddr, extent.disk_bytenr, extent.offset))
+ wraprint("If we're lucky, the checksum tree has a key at {}. "
+ "If not, we have to try searching back a bit to find the csum object that "
+ "holds information about our data block. Searching back is done in a very clumsy "