Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libstorage-ng for openSUSE:Factory checked in at 2022-04-02 18:20:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng" Sat Apr 2 18:20:03 2022 rev:157 rq:966248 version:4.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2022-03-20 20:54:32.406439399 +0100 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1900/libstorage-ng.changes 2022-04-02 18:20:09.070537347 +0200 @@ -1,0 +2,17 @@ +Thu Mar 31 14:28:54 UTC 2022 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#866 +- fix for volume groups with extent sizes of 4 GiB and up (bsc#1197779) +- 4.5.1 + +-------------------------------------------------------------------- +Wed Mar 30 09:42:42 UTC 2022 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#865 +- NFS: Validate fstype in fstab +- Cleanup, rename argument +- NFS/fstab: Validate file system type + (gh#openSUSE/libstorage-ng#864) +- 4.5.0 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.4.94.tar.xz New: ---- libstorage-ng-4.5.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.ItGshb/_old 2022-04-02 18:20:09.582531600 +0200 +++ /var/tmp/diff_new_pack.ItGshb/_new 2022-04-02 18:20:09.590531510 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.4.94 +Version: 4.5.1 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.4.94.tar.xz -> libstorage-ng-4.5.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/LIBVERSION new/libstorage-ng-4.5.1/LIBVERSION --- old/libstorage-ng-4.4.94/LIBVERSION 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/LIBVERSION 2022-03-31 16:28:54.000000000 +0200 @@ -1 +1 @@ -1.72.2 +1.73.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/VERSION new/libstorage-ng-4.5.1/VERSION --- old/libstorage-ng-4.4.94/VERSION 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/VERSION 2022-03-31 16:28:54.000000000 +0200 @@ -1 +1 @@ -4.4.94 +4.5.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Devices/BlkDeviceImpl.cc new/libstorage-ng-4.5.1/storage/Devices/BlkDeviceImpl.cc --- old/libstorage-ng-4.4.94/storage/Devices/BlkDeviceImpl.cc 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Devices/BlkDeviceImpl.cc 2022-03-31 16:28:54.000000000 +0200 @@ -138,7 +138,7 @@ ST_THROW(Exception("invalid logical block size")); unsigned long long c = a * 512 / b; - set_region(Region(0, c, b)); + set_region(Region(0, c, b, ULL_HACK)); } @@ -186,7 +186,7 @@ { Device::Impl::check(check_callbacks); - if (region.get_block_size() == 0) + if (region.get_block_size(ULL_HACK) == 0) ST_THROW(Exception(sformat("block size is zero for %s", get_name()))); if (!is_valid_name(get_name())) @@ -224,7 +224,7 @@ // Direct to virtual set_region so that derived classes can perform // checks and that children can be informed. - set_region(Region(region.get_start(), region.to_blocks(size), region.get_block_size())); + set_region(Region(region.get_start(), region.to_blocks(size), region.get_block_size(ULL_HACK), ULL_HACK)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Devices/LvmLvImpl.cc new/libstorage-ng-4.5.1/storage/Devices/LvmLvImpl.cc --- old/libstorage-ng-4.4.94/storage/Devices/LvmLvImpl.cc 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Devices/LvmLvImpl.cc 2022-03-31 16:28:54.000000000 +0200 @@ -528,7 +528,7 @@ { unsigned long long tmp = chunk_size > 0 ? chunk_size : default_chunk_size(); - return default_metadata_size(get_size(), tmp, get_region().get_block_size()); + return default_metadata_size(get_size(), tmp, get_region().get_block_size(ULL_HACK)); } @@ -655,8 +655,8 @@ LvmLv* lvm_lv = LvmLv::create(devicegraph, lvm_vg->get_vg_name(), lv_name, lv_type); Subdevice::create(devicegraph, get_non_impl(), lvm_lv); - unsigned long long extent_size = lvm_vg->get_region().get_block_size(); - lvm_lv->set_region(Region(0, size / extent_size, extent_size)); + unsigned long long extent_size = lvm_vg->get_extent_size(); + lvm_lv->set_region(Region(0, size / extent_size, extent_size, ULL_HACK)); return lvm_lv; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Devices/LvmVgImpl.cc new/libstorage-ng-4.5.1/storage/Devices/LvmVgImpl.cc --- old/libstorage-ng-4.4.94/storage/Devices/LvmVgImpl.cc 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Devices/LvmVgImpl.cc 2022-03-31 16:28:54.000000000 +0200 @@ -120,7 +120,7 @@ const CmdVgs& cmd_vgs = prober.get_system_info().getCmdVgs(); const CmdVgs::Vg& vg = cmd_vgs.find_by_vg_uuid(uuid); - region = Region(0, vg.extent_count, vg.extent_size); + region = Region(0, vg.extent_count, vg.extent_size, ULL_HACK); } @@ -156,7 +156,7 @@ { // see vgcreate(8) for valid values - unsigned long long old_extent_size = region.get_block_size(); + unsigned long long old_extent_size = region.get_block_size(ULL_HACK); if (!is_power_of_two(extent_size)) ST_THROW(InvalidExtentSize("extent size not a power of two")); @@ -164,7 +164,7 @@ if (!is_multiple_of(extent_size, 128 * KiB)) ST_THROW(InvalidExtentSize("extent size not multiple of 128 KiB")); - region.set_block_size(extent_size); + region.set_block_size(extent_size, ULL_HACK); calculate_region(); @@ -172,7 +172,7 @@ { Region region = lvm_lv->get_region(); - region.set_block_size(extent_size); + region.set_block_size(extent_size, ULL_HACK); region.set_length(region.get_length() * old_extent_size / extent_size); lvm_lv->set_region(region); @@ -301,7 +301,7 @@ void LvmVg::Impl::calculate_region() { - unsigned long long extent_size = region.get_block_size(); + unsigned long long extent_size = region.get_block_size(ULL_HACK); unsigned long long extent_count = 0; @@ -400,8 +400,8 @@ LvmLv* lvm_lv = LvmLv::create(devicegraph, vg_name, lv_name, lv_type); Subdevice::create(devicegraph, get_non_impl(), lvm_lv); - unsigned long long extent_size = region.get_block_size(); - lvm_lv->set_region(Region(0, size / extent_size, extent_size)); + unsigned long long extent_size = region.get_block_size(ULL_HACK); + lvm_lv->set_region(Region(0, size / extent_size, extent_size, ULL_HACK)); return lvm_lv; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Devices/LvmVgImpl.h new/libstorage-ng-4.5.1/storage/Devices/LvmVgImpl.h --- old/libstorage-ng-4.4.94/storage/Devices/LvmVgImpl.h 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Devices/LvmVgImpl.h 2022-03-31 16:28:54.000000000 +0200 @@ -84,7 +84,7 @@ Text get_size_text() const; - unsigned long long get_extent_size() const { return region.get_block_size(); } + unsigned long long get_extent_size() const { return region.get_block_size(ULL_HACK); } void set_extent_size(unsigned long long extent_size); virtual void parent_has_new_region(const Device* parent) override; @@ -168,7 +168,7 @@ * Number of reserved extents in the volume group. Those reserved * extents are not used by libstorage-ng. Also see doc/lvm.md. */ - unsigned long long reserved_extents; + unsigned long long reserved_extents = 0; void calculate_region(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Filesystems/NfsImpl.cc new/libstorage-ng-4.5.1/storage/Filesystems/NfsImpl.cc --- old/libstorage-ng-4.4.94/storage/Filesystems/NfsImpl.cc 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Filesystems/NfsImpl.cc 2022-03-31 16:28:54.000000000 +0200 @@ -81,6 +81,11 @@ return name.size() >= 3 && name[0] != '/' && name.find(':') != string::npos; } + bool + Nfs::Impl::is_valid_vfstype(FsType& fs_type) + { + return fs_type == FsType::NFS || fs_type == FsType::NFS4 || fs_type == FsType::AUTO; + } pair<string, string> Nfs::Impl::split_name(const string& name) @@ -126,8 +131,9 @@ { const FstabEntry* fstab_entry = etc_fstab.get_entry(i); string device = fstab_entry->get_spec(); + FsType vfstype = fstab_entry->get_fs_type(); - if (is_valid_name(device)) + if (is_valid_name(device) && is_valid_vfstype(vfstype)) entries[Nfs::Impl::split_name(device)].first.emplace_back(fstab_entry); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Filesystems/NfsImpl.h new/libstorage-ng-4.5.1/storage/Filesystems/NfsImpl.h --- old/libstorage-ng-4.4.94/storage/Filesystems/NfsImpl.h 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Filesystems/NfsImpl.h 2022-03-31 16:28:54.000000000 +0200 @@ -66,6 +66,8 @@ static pair<string, string> split_name(const string& name); static string canonical_path(const string& path); + static bool is_valid_vfstype(FsType& fs_type); + static void probe_nfses(Prober& prober); virtual Text get_message_name() const override; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Filesystems/UdfImpl.cc new/libstorage-ng-4.5.1/storage/Filesystems/UdfImpl.cc --- old/libstorage-ng-4.4.94/storage/Filesystems/UdfImpl.cc 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Filesystems/UdfImpl.cc 2022-03-31 16:28:54.000000000 +0200 @@ -49,7 +49,7 @@ { const BlkDevice* blk_device = get_blk_device(); - unsigned int block_size = blk_device->get_region().get_block_size(); + unsigned long long block_size = blk_device->get_region().get_block_size(); if (block_size < 512 * B || block_size > 4 * KiB || !is_power_of_two(block_size)) ST_THROW(InvalidBlockSize(block_size)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Utils/AlignmentImpl.cc new/libstorage-ng-4.5.1/storage/Utils/AlignmentImpl.cc --- old/libstorage-ng-4.4.94/storage/Utils/AlignmentImpl.cc 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Utils/AlignmentImpl.cc 2022-03-31 16:28:54.000000000 +0200 @@ -92,7 +92,7 @@ bool Alignment::Impl::align_region_in_place(Region& region, AlignPolicy align_policy) const { - unsigned long block_size = region.get_block_size(); + unsigned long block_size = region.get_block_size(ULL_HACK); unsigned long long start = region.get_start(); @@ -127,7 +127,7 @@ } break; } - region = Region(start, length, region.get_block_size()); + region = Region(start, length, region.get_block_size(ULL_HACK), ULL_HACK); return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Utils/Region.cc new/libstorage-ng-4.5.1/storage/Utils/Region.cc --- old/libstorage-ng-4.4.94/storage/Utils/Region.cc 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Utils/Region.cc 2022-03-31 16:28:54.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2004-2015] Novell, Inc. - * Copyright (c) 2016 SUSE LLC + * Copyright (c) [2016-2022] SUSE LLC * * All Rights Reserved. * @@ -34,12 +34,24 @@ } + InvalidBlockSize::InvalidBlockSize(unsigned long long block_size) + : Exception(sformat("invalid block size %lld", block_size), LogLevel::ERROR) + { + } + + DifferentBlockSizes::DifferentBlockSizes(unsigned int seen, unsigned int expected) : Exception(sformat("different block sizes, seen: %d, expected: %d", seen, expected), LogLevel::ERROR) { } + DifferentBlockSizes::DifferentBlockSizes(unsigned long long seen, unsigned long long expected) + : Exception(sformat("different block sizes, seen: %lld, expected: %lld", seen, expected), LogLevel::ERROR) + { + } + + NoIntersection::NoIntersection() : Exception("no intersection", LogLevel::WARNING) { @@ -64,6 +76,12 @@ } + Region::Region(unsigned long long start, unsigned long long len, unsigned long long block_size, ull_hack_t) + : impl(make_unique<Impl>(start, len, block_size)) + { + } + + Region::Region(const Region& region) : impl(make_unique<Impl>(region.get_impl())) { @@ -160,11 +178,25 @@ } + unsigned long long + Region::get_block_size(ull_hack_t) const + { + return get_impl().get_block_size(); + } + + void Region::set_block_size(unsigned int block_size) { get_impl().set_block_size(block_size); } + + + void + Region::set_block_size(unsigned long long block_size, ull_hack_t) + { + get_impl().set_block_size(block_size); + } unsigned long long diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Utils/Region.h new/libstorage-ng-4.5.1/storage/Utils/Region.h --- old/libstorage-ng-4.4.94/storage/Utils/Region.h 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Utils/Region.h 2022-03-31 16:28:54.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2004-2015] Novell, Inc. - * Copyright (c) [2016-2017] SUSE LLC + * Copyright (c) [2016-2022] SUSE LLC * * All Rights Reserved. * @@ -30,22 +30,33 @@ #include <vector> #include "storage/Utils/Exception.h" +#include "storage/Utils/Swig.h" namespace storage { + // TODO make block_size unsigned long long everywhere and remove ull_hack + + // ull_hack_t is only used to resolve ambiguities (esp. for the constructors of + // Region). With simple overloading there are several hundreds ambiguities, mainly in + // the testsuite. + enum ull_hack_t { ULL_HACK }; + + class InvalidBlockSize : public Exception { public: - InvalidBlockSize(unsigned int block_size); + InvalidBlockSize(unsigned int block_size) ST_DEPRECATED; + InvalidBlockSize(unsigned long long block_size); }; class DifferentBlockSizes : public Exception { public: - DifferentBlockSizes(unsigned int seen, unsigned int expected); + DifferentBlockSizes(unsigned int seen, unsigned int expected) ST_DEPRECATED; + DifferentBlockSizes(unsigned long long seen, unsigned long long expected); }; @@ -76,6 +87,7 @@ Region(); Region(unsigned long long start, unsigned long long length, unsigned int block_size); + Region(unsigned long long start, unsigned long long length, unsigned long long block_size, ull_hack_t); Region(const Region& region); Region(Region&& region) = default; ~Region(); @@ -128,7 +140,9 @@ void adjust_length(long long delta); unsigned int get_block_size() const; + unsigned long long get_block_size(ull_hack_t) const; void set_block_size(unsigned int block_size); + void set_block_size(unsigned long long block_size, ull_hack_t); 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.4.94/storage/Utils/RegionImpl.cc new/libstorage-ng-4.5.1/storage/Utils/RegionImpl.cc --- old/libstorage-ng-4.4.94/storage/Utils/RegionImpl.cc 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Utils/RegionImpl.cc 2022-03-31 16:28:54.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2004-2015] Novell, Inc. - * Copyright (c) [2015-2017] SUSE LLC + * Copyright (c) [2015-2022] SUSE LLC * * All Rights Reserved. * @@ -30,7 +30,7 @@ namespace storage { - Region::Impl::Impl(unsigned long long start, unsigned long long length, unsigned int block_size) + Region::Impl::Impl(unsigned long long start, unsigned long long length, unsigned long long block_size) : start(start), length(length), block_size(block_size) { assert_valid_block_size(); @@ -53,7 +53,7 @@ void - Region::Impl::assert_valid_block_size(unsigned int block_size) const + Region::Impl::assert_valid_block_size(unsigned long long block_size) const { if (block_size == 0) ST_THROW(InvalidBlockSize(block_size)); @@ -99,7 +99,7 @@ void - Region::Impl::set_block_size(unsigned int block_size) + Region::Impl::set_block_size(unsigned long long block_size) { assert_valid_block_size(block_size); @@ -170,7 +170,7 @@ unsigned long long s = std::max(rhs.get_start(), get_start()); unsigned long long e = std::min(rhs.get_end(), get_end()); - return Region(s, e - s + 1, block_size); + return Region(s, e - s + 1, block_size, ULL_HACK); } @@ -194,13 +194,13 @@ continue; if (used_region.get_start() > start) - ret.emplace_back(start, used_region.get_start() - start, block_size); + ret.emplace_back(start, used_region.get_start() - start, block_size, ULL_HACK); start = max(start, used_region.get_end() + 1); } if (end > start) - ret.emplace_back(start, end - start + 1, block_size); + ret.emplace_back(start, end - start + 1, block_size, ULL_HACK); return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.94/storage/Utils/RegionImpl.h new/libstorage-ng-4.5.1/storage/Utils/RegionImpl.h --- old/libstorage-ng-4.4.94/storage/Utils/RegionImpl.h 2022-03-17 20:08:12.000000000 +0100 +++ new/libstorage-ng-4.5.1/storage/Utils/RegionImpl.h 2022-03-31 16:28:54.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2004-2015] Novell, Inc. - * Copyright (c) [2015-2016] SUSE LLC + * Copyright (c) [2015-2022] SUSE LLC * * All Rights Reserved. * @@ -39,7 +39,7 @@ public: Impl() : start(0), length(0), block_size(0) {} - Impl(unsigned long long start, unsigned long long length, unsigned int block_size); + Impl(unsigned long long start, unsigned long long length, unsigned long long block_size); bool empty() const { return length == 0; } @@ -53,8 +53,8 @@ void adjust_start(long long delta); void adjust_length(long long delta); - unsigned int get_block_size() const { return block_size; } - void set_block_size(unsigned int block_size); + unsigned long long get_block_size() const { return block_size; } + void set_block_size(unsigned long long block_size); unsigned long long to_bytes(unsigned long long blocks) const; unsigned long long to_blocks(unsigned long long bytes) const; @@ -82,13 +82,13 @@ protected: void assert_valid_block_size() const; - void assert_valid_block_size(unsigned int block_size) const; + void assert_valid_block_size(unsigned long long block_size) const; void assert_equal_block_size(const Impl& rhs) const; - unsigned long long start; - unsigned long long length; + unsigned long long start = 0; + unsigned long long length = 0; - unsigned int block_size; + unsigned long long block_size = 0; };