Hello community, here is the log from the commit of package yast2-storage checked in at Tue Mar 28 20:48:30 CEST 2006. -------- --- /work/SRC/all/yast2-storage/yast2-storage.changes 2006-03-28 14:12:39.000000000 +0200 +++ /work/src/done/STABLE/yast2-storage/yast2-storage.changes 2006-03-28 19:50:03.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Mar 28 19:49:50 CEST 2006 - fehr@suse.de + +- speed up detection of encryption type on large fs (#158950) +- version 2.13.40 + +------------------------------------------------------------------- @@ -5 +11 @@ -- add preliminary code to support xen devices (#151233) +- add code to support xen devices (#151233) Old: ---- yast2-storage-2.13.39.tar.bz2 New: ---- yast2-storage-2.13.40.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-storage.spec ++++++ --- /var/tmp/diff_new_pack.8Irmqg/_old 2006-03-28 20:19:39.000000000 +0200 +++ /var/tmp/diff_new_pack.8Irmqg/_new 2006-03-28 20:19:39.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-storage (Version 2.13.39) +# spec file for package yast2-storage (Version 2.13.40) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,12 +11,12 @@ # norootforbuild Name: yast2-storage -Version: 2.13.39 +Version: 2.13.40 Release: 1 License: GPL Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-storage-2.13.39.tar.bz2 +Source0: yast2-storage-2.13.40.tar.bz2 prefix: /usr BuildRequires: blocxx-devel docbook-xsl-stylesheets doxygen evms gcc-c++ libxcrypt-devel libxslt openssl-devel perl-XML-Writer sablot sgml-skel swig update-desktop-files yast2 yast2-devtools yast2-installation yast2-perl-bindings yast2-testsuite Requires: yast2 parted yast2-installation yast2-storage-lib yast2-perl-bindings @@ -40,7 +40,7 @@ %prep -%setup -n yast2-storage-2.13.39 +%setup -n yast2-storage-2.13.40 %build %{prefix}/bin/y2tool y2autoconf @@ -165,8 +165,11 @@ %changelog -n yast2-storage * Tue Mar 28 2006 - fehr@suse.de +- speed up detection of encryption type on large fs (#158950) +- version 2.13.40 +* Tue Mar 28 2006 - fehr@suse.de - prevent endless loop when computing proposal (#161288) -- add preliminary code to support xen devices (#151233) +- add code to support xen devices (#151233) - version 2.13.39 * Mon Mar 27 2006 - fehr@suse.de - add script to create 65-cdrom.rules ++++++ yast2-storage-2.13.39.tar.bz2 -> yast2-storage-2.13.40.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.39/VERSION new/yast2-storage-2.13.40/VERSION --- old/yast2-storage-2.13.39/VERSION 2006-03-28 14:12:02.000000000 +0200 +++ new/yast2-storage-2.13.40/VERSION 2006-03-28 19:50:58.000000000 +0200 @@ -1 +1 @@ -2.13.39 +2.13.40 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.39/libstorage/src/Storage.cc new/yast2-storage-2.13.40/libstorage/src/Storage.cc --- old/yast2-storage-2.13.39/libstorage/src/Storage.cc 2006-03-28 13:49:20.000000000 +0200 +++ new/yast2-storage-2.13.40/libstorage/src/Storage.cc 2006-03-28 18:16:30.000000000 +0200 @@ -527,6 +527,7 @@ string::size_type p = dn.find_last_not_of( "0123456789" ); int nr = -1; dn.substr( p+1 ) >> nr; + dn.erase( p+1 ) >> nr; if( nr>=0 ) { Disk *d = new Disk( this, dn, (unsigned)nr, Size/2 ); @@ -3102,7 +3103,7 @@ { if( i!=vol.begin() ) b << " "; - b << (*i)->device(); + b << (*i)->mountDevice(); } b << "> "; y2milestone( "%s", b.str().c_str() ); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.39/libstorage/src/SystemCmd.cc new/yast2-storage-2.13.40/libstorage/src/SystemCmd.cc --- old/yast2-storage-2.13.39/libstorage/src/SystemCmd.cc 2006-03-27 15:02:01.000000000 +0200 +++ new/yast2-storage-2.13.40/libstorage/src/SystemCmd.cc 2006-03-28 19:13:10.000000000 +0200 @@ -91,6 +91,69 @@ return( doExecute( Cmd_Cv )); } +int SystemCmd::executeRestricted( const string& Command_Cv, + long unsigned MaxTimeSec, + long unsigned MaxLineOut, + bool& ExceedTime, bool& ExceedLines ) + { + y2milestone( "cmd:%s MaxTime:%lu MaxLines:%lu", Command_Cv.c_str(), + MaxTimeSec, MaxLineOut ); + ExceedTime = ExceedLines = false; + int ret = executeBackground( Command_Cv ); + unsigned long ts = 0; + unsigned long ls = 0; + unsigned long start_time = time(NULL); + while( !ExceedTime && !ExceedLines && !doWait( false, ret ) ) + { + if( MaxTimeSec>0 ) + { + ts = time(NULL)-start_time; + y2mil( "time used:" << ts ); + } + if( MaxLineOut>0 ) + { + ls = numLines()+numLines(false,IDX_STDERR); + y2mil( "lines out:" << ls ); + } + ExceedTime = MaxTimeSec>0 && ts>MaxTimeSec; + ExceedLines = MaxLineOut>0 && ls>MaxLineOut; + sleep( 1 ); + } + if( ExceedTime || ExceedLines ) + { + int r = kill( Pid_i, SIGKILL ); + y2mil( "kill pid:" << Pid_i << " ret:" << r ); + unsigned count=0; + int Status_ii; + int Wait_ii = -1; + while( count<5 && Wait_ii<=0 ) + { + Wait_ii = waitpid( Pid_i, &Status_ii, WNOHANG ); + y2mil( "waitpid:" << Wait_ii ); + count++; + sleep( 1 ); + } + /* + r = kill( Pid_i, SIGKILL ); + y2mil( "kill pid:" << Pid_i << " ret:" << r ); + count=0; + waitDone = false; + while( count<8 && !waitDone ) + { + y2mil( "doWait:" << count ); + waitDone = doWait( false, ret ); + count++; + sleep( 1 ); + } + */ + Ret_i = -257; + } + y2milestone( "ret:%d ExceedTime:%d ExceedLines:%d", ret, ExceedTime, + ExceedLines ); + return( ret ); + } + + int SystemCmd::execute( const string& Cmd_Cv ) { @@ -526,10 +589,6 @@ { y2milestone( "pid:%d added lines:%zd stderr:%d", Pid_i, Lines_Cr.size()-old_size, Stderr_bv ); - if( Lines_Cr.size()>0 ) - { - y2mil( "last line:\"" << Lines_Cr.back() << '"' ); - } } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.39/libstorage/src/SystemCmd.h new/yast2-storage-2.13.40/libstorage/src/SystemCmd.h --- old/yast2-storage-2.13.39/libstorage/src/SystemCmd.h 2005-12-06 19:00:28.000000000 +0100 +++ new/yast2-storage-2.13.40/libstorage/src/SystemCmd.h 2006-03-28 17:26:50.000000000 +0200 @@ -28,6 +28,10 @@ virtual ~SystemCmd(); int execute( const string& Command_Cv ); int executeBackground( const string& Command_Cv ); + int executeRestricted( const string& Command_Cv, + unsigned long MaxTimeSec, + unsigned long MaxLineOut, + bool& ExceedTime, bool& ExceedLines); void setOutputHandler( void (*Handle_f)( void *, string, bool ), void * Par_p ); void logOutput(); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.39/libstorage/src/Volume.cc new/yast2-storage-2.13.40/libstorage/src/Volume.cc --- old/yast2-storage-2.13.39/libstorage/src/Volume.cc 2006-03-21 14:19:29.000000000 +0100 +++ new/yast2-storage-2.13.40/libstorage/src/Volume.cc 2006-03-28 19:23:25.000000000 +0200 @@ -1302,7 +1302,8 @@ c.execute( "modprobe " + fs_names[detected_fs] ); c.execute( "mount -oro -t " + fsTypeString(detected_fs) + " " + loop_dev + " " + mpname ); - if( c.retcode()==0 ) + bool ok = c.retcode()==0; + if( ok ) { c.execute( "umount " + mpname ); string cmd; @@ -1310,7 +1311,7 @@ { case EXT2: case EXT3: - cmd = "fsck.ext2 -n -f " + loop_dev + " > /dev/null"; + cmd = "fsck.ext2 -n -f " + loop_dev; break; case REISERFS: cmd = "reiserfsck --yes --check -q " + loop_dev; @@ -1320,16 +1321,19 @@ " " + loop_dev; break; } - c.execute( cmd ); + bool excTime, excLines; + c.executeRestricted( cmd, 15, 500, excTime, excLines ); + ok = c.retcode()==0 || (excTime && !excLines); + y2milestone( "ok:%d retcode:%d excTime:%d excLines:%d", + ok, c.retcode(), excTime, excLines ); } - if( c.retcode()!=0 ) + if( !ok ) { detected_fs = fs = FSUNKNOWN; label.erase(); orig_label.erase(); uuid.erase(); } - c.execute( "umount " + mpname ); } } if( fs==FSUNKNOWN ) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.39/storage/src/include/do_proposal_flexible.ycp new/yast2-storage-2.13.40/storage/src/include/do_proposal_flexible.ycp --- old/yast2-storage-2.13.39/storage/src/include/do_proposal_flexible.ycp 2006-03-28 14:12:59.000000000 +0200 +++ new/yast2-storage-2.13.40/storage/src/include/do_proposal_flexible.ycp 2006-03-28 19:51:20.000000000 +0200 @@ -14,7 +14,7 @@ * ************************************************************* - $Id: do_proposal_flexible.ycp 29471 2006-03-28 12:12:50Z fehr $ + $Id: do_proposal_flexible.ycp 29485 2006-03-28 17:51:11Z fehr $ */ { @@ -1200,7 +1200,7 @@ ps[pindex,"size_max_cyl"]:0 > p[2]:0) { sum = sum + weights[index]:0; - y2milestone( "sum %1 wieght %2 pindex %3", sum, + y2milestone( "sum %1 weight %2 pindex %3", sum, weights[index]:0, pindex ); scount = scount+1; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.39/storage/src/inst_custom_part.ycp new/yast2-storage-2.13.40/storage/src/inst_custom_part.ycp --- old/yast2-storage-2.13.39/storage/src/inst_custom_part.ycp 2006-03-15 16:25:01.000000000 +0100 +++ new/yast2-storage-2.13.40/storage/src/inst_custom_part.ycp 2006-03-28 15:18:16.000000000 +0200 @@ -26,7 +26,7 @@ * ************************************************************* - $Id: inst_custom_part.ycp 29008 2006-03-15 15:24:55Z fehr $ + $Id: inst_custom_part.ycp 29473 2006-03-28 13:18:12Z fehr $ */ { @@ -992,7 +992,8 @@ dev_start_cyl = " -- "; } - if( show_disk && + if( show_disk && + !(disk["type"]:`CT_UNKNOWN==`CT_DISK && !real_disk) && (disk["type"]:`CT_UNKNOWN==`CT_DISK || disk["type"]:`CT_UNKNOWN==`CT_LVM || (disk["type"]:`CT_UNKNOWN==`CT_EVMS && size(disk["name"]:"")>0 && diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.39/storage/src/modules/Storage.ycp new/yast2-storage-2.13.40/storage/src/modules/Storage.ycp --- old/yast2-storage-2.13.39/storage/src/modules/Storage.ycp 2006-03-23 14:01:33.000000000 +0100 +++ new/yast2-storage-2.13.40/storage/src/modules/Storage.ycp 2006-03-28 15:18:16.000000000 +0200 @@ -19,7 +19,7 @@ * wurde versucht * "intelligent" zu gestallten und ist im einzelen bei den * entspechenden Funktionen * näher erklärt. * - * $Id: Storage.ycp 29327 2006-03-23 13:01:30Z fehr $ + * $Id: Storage.ycp 29473 2006-03-28 13:18:12Z fehr $ */ { @@ -1323,6 +1323,13 @@ { map c = $[]; c = find( map p, conts, ``(p["device"]:""==device )); + if( c==nil ) + { + map tmp = GetDiskPartition( device ); + y2milestone( "getDiskInfo map %1", tmp ); + if( tmp["disk"]:"" != device ) + c = find( map p, conts, ``(p["device"]:""==tmp["disk"]:"" )); + } y2milestone( "getDiskInfo c:%1", c ); if( c!=nil ) { @@ -3234,7 +3241,9 @@ */ global define boolean IsRealDisk( map entry ) ``{ - return( entry["type"]:`CT_UNKNOWN==`CT_DISK ); + return( entry["type"]:`CT_UNKNOWN==`CT_DISK && + !(entry["type"]:`CT_UNKNOWN==`CT_DISK && entry["readonly"]:false && + entry["driver"]:""=="vbd") ); } global define boolean DeviceRealDisk( string device ) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de