Hello community, here is the log from the commit of package libstorage for openSUSE:12.3 checked in at 2013-02-19 13:37:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.3/libstorage (Old) and /work/SRC/openSUSE:12.3/.libstorage.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage", Maintainer is "aschn...@suse.com" Changes: -------- --- /work/SRC/openSUSE:12.3/libstorage/libstorage.changes 2013-02-08 07:12:22.000000000 +0100 +++ /work/SRC/openSUSE:12.3/.libstorage.new/libstorage.changes 2013-02-19 13:37:06.000000000 +0100 @@ -1,0 +2,12 @@ +Fri Feb 15 10:00:20 CET 2013 - aschn...@suse.de + +- version 2.23.5 +- detect fake partitions on FBA DASDs (bnc#786164) + +------------------------------------------------------------------- +Thu Feb 7 16:48:23 CET 2013 - f...@suse.de + +- create partition type "gpt_sync_mbr" instead of plain gpt also + on ppc architecture (bnc#797485) + +------------------------------------------------------------------- Old: ---- libstorage-2.23.4.tar.bz2 New: ---- libstorage-2.23.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage.spec ++++++ --- /var/tmp/diff_new_pack.fLxeio/_old 2013-02-19 13:37:06.000000000 +0100 +++ /var/tmp/diff_new_pack.fLxeio/_new 2013-02-19 13:37:06.000000000 +0100 @@ -17,7 +17,7 @@ Name: libstorage -Version: 2.23.4 +Version: 2.23.5 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: libstorage-%{version}.tar.bz2 ++++++ libstorage-2.23.4.tar.bz2 -> libstorage-2.23.5.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.4/VERSION new/libstorage-2.23.5/VERSION --- old/libstorage-2.23.4/VERSION 2013-02-07 15:29:31.000000000 +0100 +++ new/libstorage-2.23.5/VERSION 2013-02-19 12:02:36.000000000 +0100 @@ -1 +1 @@ -2.23.4 +2.23.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.4/bindings/python/libstorage.py new/libstorage-2.23.5/bindings/python/libstorage.py --- old/libstorage-2.23.4/bindings/python/libstorage.py 2013-02-07 15:39:18.000000000 +0100 +++ new/libstorage-2.23.5/bindings/python/libstorage.py 2013-02-19 12:10:44.000000000 +0100 @@ -451,6 +451,9 @@ __swig_setmethods__["transport"] = _libstorage.DiskInfo_transport_set __swig_getmethods__["transport"] = _libstorage.DiskInfo_transport_get if _newclass:transport = _swig_property(_libstorage.DiskInfo_transport_get, _libstorage.DiskInfo_transport_set) + __swig_setmethods__["has_fake_partition"] = _libstorage.DiskInfo_has_fake_partition_set + __swig_getmethods__["has_fake_partition"] = _libstorage.DiskInfo_has_fake_partition_get + if _newclass:has_fake_partition = _swig_property(_libstorage.DiskInfo_has_fake_partition_get, _libstorage.DiskInfo_has_fake_partition_set) __swig_setmethods__["iscsi"] = _libstorage.DiskInfo_iscsi_set __swig_getmethods__["iscsi"] = _libstorage.DiskInfo_iscsi_get if _newclass:iscsi = _swig_property(_libstorage.DiskInfo_iscsi_get, _libstorage.DiskInfo_iscsi_set) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.4/storage/Disk.cc new/libstorage-2.23.5/storage/Disk.cc --- old/libstorage-2.23.4/storage/Disk.cc 2013-02-05 12:48:51.000000000 +0100 +++ new/libstorage-2.23.5/storage/Disk.cc 2013-02-15 10:47:03.000000000 +0100 @@ -50,7 +50,7 @@ unsigned long long SizeK, SystemInfo& systeminfo) : Container(s, name, device, staticType(), systeminfo), init_disk(false), transport(TUNKNOWN), dmp_slave(false), no_addpart(false), - gpt_enlarge(false), del_ptable(false) + gpt_enlarge(false), del_ptable(false), has_fake_partition(false) { logfile_name = boost::replace_all_copy(nm, "/", "_"); getMajorMinor(); @@ -69,7 +69,7 @@ : Container(s, name, device, staticType(), systeminfo), max_primary(0), ext_possible(false), max_logical(0), init_disk(false), transport(TUNKNOWN), dmp_slave(false), no_addpart(false), - gpt_enlarge(false), range(255), del_ptable(false) + gpt_enlarge(false), range(255), del_ptable(false), has_fake_partition(false) { y2mil("constructed Disk name:" << name << " nr " << num << " sizeK:" << SizeK); logfile_name = name + decString(num); @@ -84,7 +84,7 @@ : Container(s, staticType(), node), label(), udev_path(), udev_id(), max_primary(0), ext_possible(false), max_logical(0), init_disk(false), transport(TUNKNOWN), dmp_slave(false), no_addpart(false), - gpt_enlarge(false), range(4), del_ptable(false) + gpt_enlarge(false), range(4), del_ptable(false), has_fake_partition(false) { logfile_name = nm; @@ -114,7 +114,7 @@ init_disk(c.init_disk), transport(c.transport), dmp_slave(c.dmp_slave), no_addpart(c.no_addpart), gpt_enlarge(c.gpt_enlarge), range(c.range), - del_ptable(c.del_ptable) + del_ptable(c.del_ptable), has_fake_partition(c.has_fake_partition) { y2deb("copy-constructed Disk " << dev); @@ -181,6 +181,18 @@ } + Region + Disk::detectSysfsBlkRegion(bool log_error) const + { + string size_p = sysfsPath() + "/size"; + + unsigned long long len = 0; + read_sysfs_property(size_p, len, log_error); + + return Region(0, len); + } + + void Disk::triggerUdevUpdate() const { @@ -484,6 +496,9 @@ y2mil("nm:" << nm); if (!dmp_slave && !checkPartedValid(systeminfo, pl, range_exceed)) { + ronly = true; + has_fake_partition = checkFakePartition(systeminfo, pl); + Text txt = sformat( // popup text %1$s is replaced by disk name e.g. /dev/hda _("The partitioning on disk %1$s is not readable by\n" @@ -495,11 +510,10 @@ "cannot add, edit, resize, or remove partitions from that\n" "disk with this tool."), dev.c_str() ); - if( getenv("LIBSTORAGE_NO_PART_CHECK")!=NULL ) + if( has_fake_partition || getenv("LIBSTORAGE_NO_PART_CHECK")!=NULL ) y2war( "ignoring failed partition check parted/kernel on disk:" << device() ); else getStorage()->addInfoPopupText( dev, txt ); - ronly = true; } if( range_exceed>0 ) { @@ -572,7 +586,7 @@ } } - // But if parted sees no disk the kernel must also see no disks. + // But if parted sees no partitions the kernel must also see no partitions. if (pl.empty()) { @@ -591,6 +605,30 @@ bool +Disk::checkFakePartition(SystemInfo& systeminfo, const list<Partition*>& pl) const +{ + // For FBA DASDs without an partition table the kernel generates a fake + // partition spanning almost the whole disk. + + if (isDasd() && detected_label.empty() && pl.size() == 1 && pl.front()->nr() == 1) + { + Region disk_region = detectSysfsBlkRegion(); + Region part_region = pl.front()->detectSysfsBlkRegion(); + + y2mil("disk:" << disk_region << " part:" << part_region); + + if (disk_region.end() == part_region.end() && part_region.start() == 2) + { + y2mil("found fake partition on " << device()); + return true; + } + } + + return false; +} + + +bool Disk::checkPartedValid(SystemInfo& systeminfo, list<Partition*>& pl, unsigned long& range_exceed) const { @@ -1586,7 +1624,8 @@ if( lab=="gpt" ) { const ArchInfo& ai = getStorage()->getArchInfo(); - if( !ai.is_efiboot && (ai.arch=="i386" || ai.arch=="x86_64")) + if( !ai.is_efiboot && + (ai.arch=="i386" || ai.arch=="ppc" || ai.arch=="x86_64")) { y2mil( "efi:" << ai.is_efiboot << " arch:" << ai.arch ); lab = LABEL_GPT_SYNC_MBR; @@ -2422,6 +2461,7 @@ info.initDisk = init_disk; info.iscsi = transport == ISCSI; info.transport = transport; + info.has_fake_partition = has_fake_partition; tinfo = info; } @@ -2453,6 +2493,8 @@ s << " GptEnlarge"; if (d.del_ptable) s << " delPT"; + if (d.has_fake_partition) + s << " has_fake_partition"; return( s ); } @@ -2476,6 +2518,8 @@ logDiffEnum(log, "transport", transport, rhs.transport); logDiff(log, "del_ptable", del_ptable, rhs.del_ptable); + + logDiff(log, "has_fake_partition", has_fake_partition, rhs.has_fake_partition); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.4/storage/Disk.h new/libstorage-2.23.5/storage/Disk.h --- old/libstorage-2.23.4/storage/Disk.h 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.5/storage/Disk.h 2013-02-15 10:16:33.000000000 +0100 @@ -93,6 +93,9 @@ virtual string sysfsPath() const; static string sysfsPath( const string& device ); + /* disk region from sysfs in 512 byte blocks */ + Region detectSysfsBlkRegion(bool log_error = true) const; + unsigned numPartitions() const; bool isDasd() const { return( nm.find("dasd")==0 ); } bool isIScsi() const { return transport == ISCSI; } @@ -239,6 +242,7 @@ bool checkPartedValid(SystemInfo& systeminfo, list<Partition*>& pl, unsigned long& rng) const; virtual bool checkPartitionsValid(SystemInfo& systeminfo, const list<Partition*>& pl) const; + bool checkFakePartition(SystemInfo& systeminfo, const list<Partition*>& pl) const; bool callDelpart(unsigned nr) const; bool callAddpart(unsigned nr, const Region& blkRegion) const; @@ -295,6 +299,7 @@ bool gpt_enlarge; unsigned long range; bool del_ptable; + bool has_fake_partition; mutable storage::DiskInfo info; // workaround for broken ycp bindings diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.23.4/storage/StorageInterface.h new/libstorage-2.23.5/storage/StorageInterface.h --- old/libstorage-2.23.4/storage/StorageInterface.h 2013-01-22 11:28:07.000000000 +0100 +++ new/libstorage-2.23.5/storage/StorageInterface.h 2013-02-15 10:16:33.000000000 +0100 @@ -322,6 +322,7 @@ unsigned maxLogical; bool initDisk; Transport transport; + bool has_fake_partition; bool iscsi; // deprecated }; -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org