Hello community,

here is the log from the commit of package libstorage-ng for openSUSE:Leap:15.2 
checked in at 2020-03-31 07:22:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.libstorage-ng.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Tue Mar 31 07:22:52 2020 rev:229 rq:789173 version:4.2.71

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/libstorage-ng/libstorage-ng.changes    
2020-03-19 08:35:52.385832019 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.libstorage-ng.new.3160/libstorage-ng.changes  
2020-03-31 07:22:53.490411612 +0200
@@ -1,0 +2,27 @@
+Wed Mar 25 14:14:09 UTC 2020 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#714
+- simplify combining disks with different block sizes into RAID
+  (bsc#1164295)
+- Revert "add tests for adjust_block_size()"
+- Revert "add adjust_block_size() method to Region class
+  (bsc#1164295)"
+- update doc
+- 4.2.71
+
+--------------------------------------------------------------------
+Wed Mar 25 13:25:56 UTC 2020 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#713
+- Make BlkDevice::possible_mount_bys public (for bsc#1166096)
+- Increase minor so version
+- 4.2.70
+
+--------------------------------------------------------------------
+Wed Mar 25 09:46:08 UTC 2020 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#712
+- update doc on RAID block size
+- 4.2.69
+
+--------------------------------------------------------------------

Old:
----
  libstorage-ng-4.2.68.tar.xz

New:
----
  libstorage-ng-4.2.71.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.Y4nVgx/_old  2020-03-31 07:22:53.910411794 +0200
+++ /var/tmp/diff_new_pack.Y4nVgx/_new  2020-03-31 07:22:53.910411794 +0200
@@ -18,7 +18,7 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.2.68
+Version:        4.2.71
 Release:        0
 Summary:        Library for storage management
 License:        GPL-2.0-only

++++++ libstorage-ng-4.2.68.tar.xz -> libstorage-ng-4.2.71.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/LIBVERSION 
new/libstorage-ng-4.2.71/LIBVERSION
--- old/libstorage-ng-4.2.68/LIBVERSION 2020-03-13 13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/LIBVERSION 2020-03-25 15:14:09.000000000 +0100
@@ -1 +1 @@
-1.29.0
+1.30.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/VERSION 
new/libstorage-ng-4.2.71/VERSION
--- old/libstorage-ng-4.2.68/VERSION    2020-03-13 13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/VERSION    2020-03-25 15:14:09.000000000 +0100
@@ -1 +1 @@
-4.2.68
+4.2.71
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/bindings/storage-catches.i 
new/libstorage-ng-4.2.71/bindings/storage-catches.i
--- old/libstorage-ng-4.2.68/bindings/storage-catches.i 2020-03-13 
13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/bindings/storage-catches.i 2020-03-25 
15:14:09.000000000 +0100
@@ -311,7 +311,6 @@
 %catches(storage::Exception) 
storage::Partitionable::get_default_partition_table_type() const;
 %catches(storage::WrongNumberOfChildren, storage::DeviceHasWrongType) 
storage::Partitionable::get_partition_table();
 %catches(storage::WrongNumberOfChildren, storage::DeviceHasWrongType) 
storage::Partitionable::get_partition_table() const;
-%catches(storage::InvalidBlockSize) 
storage::Region::adjust_block_size(unsigned int block_size);
 %catches(storage::Exception) storage::Region::adjust_length(long long delta);
 %catches(storage::Exception) storage::Region::adjust_start(long long delta);
 %catches(storage::Exception) storage::Region::get_end() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/doc/md-raid.md 
new/libstorage-ng-4.2.71/doc/md-raid.md
--- old/libstorage-ng-4.2.68/doc/md-raid.md     2020-03-13 13:48:25.000000000 
+0100
+++ new/libstorage-ng-4.2.71/doc/md-raid.md     2020-03-25 15:14:09.000000000 
+0100
@@ -88,3 +88,15 @@
 
 MdContainers and MdMembers can be added to and removed from /etc/mdadm.conf.
 
+Combining disks with different block sizes
+------------------------------------------
+
+If you combine disks with different block sizes into a RAID, the RAID device
+will have the maximum block size of its disks.
+
+This seems to work even if some parts of the RAID are not aligned to this
+block size.
+
+Md::add_device() takes care to update Md::Region to use the correct block
+size. The RAID size estimation in Md::add_device() will be further rounded
+down to align with the maximum block size if needed.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/storage/Devices/BlkDevice.cc 
new/libstorage-ng-4.2.71/storage/Devices/BlkDevice.cc
--- old/libstorage-ng-4.2.68/storage/Devices/BlkDevice.cc       2020-03-13 
13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/storage/Devices/BlkDevice.cc       2020-03-25 
15:14:09.000000000 +0100
@@ -371,4 +371,11 @@
        return to_device_of_type<const BlkDevice>(device);
     }
 
+
+    vector<MountByType>
+    BlkDevice::possible_mount_bys() const
+    {
+       return get_impl().possible_mount_bys();
+    }
+
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/storage/Devices/BlkDevice.h 
new/libstorage-ng-4.2.71/storage/Devices/BlkDevice.h
--- old/libstorage-ng-4.2.68/storage/Devices/BlkDevice.h        2020-03-13 
13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/storage/Devices/BlkDevice.h        2020-03-25 
15:14:09.000000000 +0100
@@ -24,6 +24,7 @@
 #ifndef STORAGE_BLK_DEVICE_H
 #define STORAGE_BLK_DEVICE_H
 
+#include <vector>
 
 #include "storage/Utils/Swig.h"
 #include "storage/Devices/Device.h"
@@ -265,6 +266,11 @@
         */
        static bool compare_by_dm_table_name(const BlkDevice* lhs, const 
BlkDevice* rhs);
 
+       /**
+        * Returns the possible mount-by methods to reference the block device.
+        */
+       std::vector<MountByType> possible_mount_bys() const;
+
     public:
 
        class Impl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/storage/Devices/Md.h 
new/libstorage-ng-4.2.71/storage/Devices/Md.h
--- old/libstorage-ng-4.2.68/storage/Devices/Md.h       2020-03-13 
13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/storage/Devices/Md.h       2020-03-25 
15:14:09.000000000 +0100
@@ -87,6 +87,11 @@
        static Md* load(Devicegraph* devicegraph, const xmlNode* node);
 
        /**
+        * Add another device to a RAID.
+        *
+        * For combining disks with different block sizes,
+        * see doc/md-raid.md.
+        *
         * @throw WrongNumberOfChildren
         */
        MdUser* add_device(BlkDevice* blk_device);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/storage/Devices/MdImpl.cc 
new/libstorage-ng-4.2.71/storage/Devices/MdImpl.cc
--- old/libstorage-ng-4.2.68/storage/Devices/MdImpl.cc  2020-03-13 
13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/storage/Devices/MdImpl.cc  2020-03-25 
15:14:09.000000000 +0100
@@ -805,6 +805,8 @@
        // big can lead to severe problems later on, e.g. a partition not
        // fitting anymore, we make a conservative calculation.
 
+       // For combining disks with different block sizes, see doc/md-raid.md.
+
        const bool conservative = true;
 
        // Since our size calculation is not accurate we must not recalculate
@@ -919,13 +921,8 @@
                break;
        }
 
-       // adjust block size
        if (block_size && block_size != get_region().get_block_size())
-       {
-           Region region(get_region());
-           region.adjust_block_size(block_size);
-           set_region(region);
-       }
+           set_region(Region(0, 0, block_size));
 
        set_size(size);
        set_topology(Topology(0, optimal_io_size));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/storage/Utils/Region.cc 
new/libstorage-ng-4.2.71/storage/Utils/Region.cc
--- old/libstorage-ng-4.2.68/storage/Utils/Region.cc    2020-03-13 
13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/storage/Utils/Region.cc    2020-03-25 
15:14:09.000000000 +0100
@@ -167,13 +167,6 @@
     }
 
 
-    void
-    Region::adjust_block_size(unsigned int block_size)
-    {
-       get_impl().adjust_block_size(block_size);
-    }
-
-
     unsigned long long
     Region::to_bytes(unsigned long long blocks) const
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/storage/Utils/Region.h 
new/libstorage-ng-4.2.71/storage/Utils/Region.h
--- old/libstorage-ng-4.2.68/storage/Utils/Region.h     2020-03-13 
13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/storage/Utils/Region.h     2020-03-25 
15:14:09.000000000 +0100
@@ -130,13 +130,6 @@
        unsigned int get_block_size() const;
        void set_block_size(unsigned int block_size);
 
-       /**
-        * Adjusts the block size while keeping the region's sizes (in bytes).
-        *
-        * @throw Exception
-        */
-       void adjust_block_size(unsigned int block_size);
-
        unsigned long long to_bytes(unsigned long long blocks) const;
        unsigned long long to_blocks(unsigned long long bytes) const;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/storage/Utils/RegionImpl.cc 
new/libstorage-ng-4.2.71/storage/Utils/RegionImpl.cc
--- old/libstorage-ng-4.2.68/storage/Utils/RegionImpl.cc        2020-03-13 
13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/storage/Utils/RegionImpl.cc        2020-03-25 
15:14:09.000000000 +0100
@@ -107,27 +107,6 @@
     }
 
 
-    void
-    Region::Impl::adjust_block_size(unsigned int block_size)
-    {
-       assert_valid_block_size(block_size);
-
-       if (block_size == Impl::block_size)
-           return;
-
-       if (start * Impl::block_size % block_size ||
-           length * Impl::block_size % block_size)
-       {
-           ST_THROW(InvalidBlockSize(block_size));
-       }
-
-       start = start * Impl::block_size / block_size;
-       length = length * Impl::block_size / block_size;
-
-       Impl::block_size = block_size;
-    }
-
-
     unsigned long long
     Region::Impl::to_bytes(unsigned long long blocks) const
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/storage/Utils/RegionImpl.h 
new/libstorage-ng-4.2.71/storage/Utils/RegionImpl.h
--- old/libstorage-ng-4.2.68/storage/Utils/RegionImpl.h 2020-03-13 
13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/storage/Utils/RegionImpl.h 2020-03-25 
15:14:09.000000000 +0100
@@ -55,7 +55,6 @@
 
        unsigned int get_block_size() const { return block_size; }
        void set_block_size(unsigned int block_size);
-       void adjust_block_size(unsigned int block_size);
 
        unsigned long long to_bytes(unsigned long long blocks) const;
        unsigned long long to_blocks(unsigned long long bytes) const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.68/testsuite/Utils/region.cc 
new/libstorage-ng-4.2.71/testsuite/Utils/region.cc
--- old/libstorage-ng-4.2.68/testsuite/Utils/region.cc  2020-03-13 
13:48:25.000000000 +0100
+++ new/libstorage-ng-4.2.71/testsuite/Utils/region.cc  2020-03-25 
15:14:09.000000000 +0100
@@ -355,25 +355,3 @@
     BOOST_CHECK_EQUAL(unused_regions[1].get_start(), 80);
     BOOST_CHECK_EQUAL(unused_regions[1].get_length(), 20);
 }
-
-
-BOOST_AUTO_TEST_CASE(test_adjust_block_size1)
-{
-    Region r(100, 1000, 10);
-
-    r.adjust_block_size(20);
-
-    BOOST_CHECK_EQUAL(r.get_start(), 50);
-    BOOST_CHECK_EQUAL(r.get_length(), 500);
-    BOOST_CHECK_EQUAL(r.get_block_size(), 20);
-}
-
-
-BOOST_AUTO_TEST_CASE(test_adjust_block_size2)
-{
-    Region r1(100, 1000, 10);
-    Region r2(200, 1100, 10);
-
-    BOOST_CHECK_THROW(r1.adjust_block_size(2000), InvalidBlockSize);
-    BOOST_CHECK_THROW(r2.adjust_block_size(2000), InvalidBlockSize);
-}


Reply via email to