Your message dated Fri, 22 Mar 2019 01:04:43 +0000
with message-id <[email protected]>
and subject line Bug#925271: fixed in python-btrfs 11-2
has caused the Debian Bug report #925271,
regarding btrfs-space-calculator crashes when using raid5 as either data or 
metadata profile
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
925271: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925271
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python3-btrfs
Version: 11-1

In the upstream issue tracker, an issue was reported about a crash when
using the example program 'btrfs-space-calculator' that is shipped
together with the python-btrfs library:

https://github.com/knorrie/python-btrfs/issues/19

bor@bor-Latitude-E5450:~/src/python-btrfs$ ./bin/btrfs-space-calculator
-m raid0 -d raid5 3T 1T 2T
Traceback (most recent call last):
[...]
  File "/home/bor/src/python-btrfs/bin/btrfs/volumes.py", line 192, in
chunk_length_to_dev_extent_length
    dev_extent_length = raw_data_bytes // num_data_stripes
ZeroDivisionError: integer division or modulo by zero

This is not nice, since Debian Buster will be the first Debian release
to include this package, and users should be encouraged to explore
possible use cases for the btrfs filesystem.

After researching this, I came up with a >120 line change that fixes the
involved scenarios and makes it more future-proof. But, to have the
program not crash with a minimal fix for this upstream version, it's
sufficient to just do a 2-line workaround:

diff --git a/bin/btrfs-space-calculator b/bin/btrfs-space-calculator
index cb7f8f6..7586c7d 100755
--- a/bin/btrfs-space-calculator
+++ b/bin/btrfs-space-calculator
@@ -54,8 +54,8 @@ class FakeChunk(object):
     def __init__(self, flags):
         self.type = flags
         self.length = 1
-        self.stripes = [FakeStripe()]
-        self.num_stripes = 1
+        self.stripes = [FakeStripe()] * 4
+        self.num_stripes = 4

Hans

--- End Message ---
--- Begin Message ---
Source: python-btrfs
Source-Version: 11-2

We believe that the bug you reported is fixed in the latest version of
python-btrfs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Hans van Kranenburg <[email protected]> (supplier of updated python-btrfs 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 22 Mar 2019 01:12:12 +0100
Source: python-btrfs
Architecture: source
Version: 11-2
Distribution: unstable
Urgency: medium
Maintainer: Hans van Kranenburg <[email protected]>
Changed-By: Hans van Kranenburg <[email protected]>
Closes: 925267 925271
Changes:
 python-btrfs (11-2) unstable; urgency=medium
 .
   * d/patches: Fix crash because of stray underscores (Closes: #925267)
   * d/patches: space-calculator: quickfix crash when using raid5
     (Closes: #925271)
Checksums-Sha1:
 d61ee0cc1a7f739f2ec0caa792adeb865f0e5415 1923 python-btrfs_11-2.dsc
 23bf10d381fb4a9f3e2bb1844c4cb05f787cb306 5040 python-btrfs_11-2.debian.tar.xz
 f74f10e94eb89991be1ad5015bb27af9640707d7 5904 
python-btrfs_11-2_source.buildinfo
Checksums-Sha256:
 949571a34db4dd5a357a7ca3eb0d27b52ccbd2033df1303118e9b25f2a2e3dbc 1923 
python-btrfs_11-2.dsc
 f8193b37edade7fbfbd7d5aa1715d1e2d3fa8e129d76477c2eb6eedb74b51baf 5040 
python-btrfs_11-2.debian.tar.xz
 88df1b56beab9b248dff669e46eccd365c042339c70a167274cde0aef7f6c691 5904 
python-btrfs_11-2_source.buildinfo
Files:
 09a2f15a731c61843854d945a4446b14 1923 python optional python-btrfs_11-2.dsc
 f4ccf9f0db024b3a0b832656439cfbc2 5040 python optional 
python-btrfs_11-2.debian.tar.xz
 3befd9dbfbd27d1a60a4fd64ff8b05ed 5904 python optional 
python-btrfs_11-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEkjZVexcMh/iCHArDweDZLphvfH4FAlyUMhoACgkQweDZLphv
fH7VxBAA7vVmV6IWS5SiWXYUHT46dwcKMDPLj6PYaA0JIEH2zNeYVftOji5hf7V0
5nhxWU5ZKUztR9XMzgYOy3nDr4a2GWJl+Wt9tzyljwEBL5b1dVkV+jBcs+hPSPHJ
9NjsD+BjelXst4QuY7TMVYU414FRWd1Mte6aTCtXXcoVe+7XwavBeTundJ24gYKu
qYyHHk85GoQ81JAPKnMPKabDglccyLasbehRNeaVS5kaAELRbn/jSFIW8d9Ib6Yw
+17EJsY6pjUPveAmQqFiWAFsmqTVupcAh6s/BSdwEHnlWeK4aOAtJrW8wd8HlAPw
JQ80PqK4cPEdCNCXbRYP6OJ6iDkjPOiDaazNSn9oxLt4UkGY+giBmesD9r04YPiU
briEGb3bmQpt7Vnoxwd/9W9MbSbeixQXjWbHLSOmz1tI/ScvIHPp2lVQXC1MDNBP
wrCEla+kZjykxAbNDpMs9OvZPGojsWVOnzHdcv5aJpPb+19olq4Gxnb5V8BUe6hk
7uwC/DFgwaRe8DqZgOLAG9L6ZyopFE7aA25aenbvLAlAsNdT5wCLyjlNowm5jQ/K
EpAk1GnHg839LjpNHBpJ4q9WCsg6jE3UhdNa36ASjoBJv7WBPUcR/mJDnNiDVLoG
xcVTgk6n0LRd1aITKj9dLHS4HkztLhCaTuCJa+b3+8L9B/q1MI0=
=scGn
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to