Author: fehr
Date: Tue May 24 19:46:45 2011
New Revision: 64109
URL: http://svn.opensuse.org/viewcvs/yast?rev=64109&view=rev
Log:
- add dummy module inst_do_resize again since it is referenced in control.xml
- various btrfs related bugfixes
- version 2.17.102
Added:
branches/SuSE-Code-11-SP2-Branch/storage/storage/src/inst_do_resize.ycp
Modified:
branches/SuSE-Code-11-SP2-Branch/storage/VERSION
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/BtrfsCo.cc
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/BtrfsCo.h
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.cc
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.h
branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.cc
branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes
branches/SuSE-Code-11-SP2-Branch/storage/storage/src/Makefile.am
branches/SuSE-Code-11-SP2-Branch/storage/yast2-storage.spec.in
Modified: branches/SuSE-Code-11-SP2-Branch/storage/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/VERSION?rev=64109&r1=64108&r2=64109&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/VERSION (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/VERSION Tue May 24 19:46:45 2011
@@ -1 +1 @@
-2.17.101
+2.17.102
Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc?rev=64109&r1=64108&r2=64109&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc Tue May 24 19:46:45 2011
@@ -50,8 +50,10 @@
{
y2mil("constructed btrfs vol from:" << v );
y2mil( "fs:" << fs << " det:" << detected_fs );
+ setCreated(false);
changeMountBy(MOUNTBY_UUID);
devices.push_back(v.device());
+ y2mil("constructed btrfs vol:" << *this );
}
Btrfs::Btrfs(const BtrfsCo& d, const xmlNode* node ) : Volume(d, node)
@@ -529,6 +531,20 @@
Btrfs::getCommitActions(list<commitAction>& l) const
{
Volume::getCommitActions( l );
+ if( !l.empty() && l.back().stage==FORMAT )
+ {
+ Volume const *v = NULL;
+ if( getStorage()->findVolume( l.back().vol()->device(), v, true ) &&
+ getStorage()->isUsedBySingleBtrfs(*v) )
+ {
+ y2mil( "found:" << *v );
+ if( v->created() )
+ {
+ y2mil( "removing:" << l.back() );
+ l.pop_back();
+ }
+ }
+ }
unsigned rem, add;
list<string>::const_iterator i;
if( !dev_add.empty() )
@@ -552,7 +568,7 @@
list<string> sl = getSubvolAddDel( true );
for( list<string>::const_iterator i=sl.begin(); i!=sl.end(); ++i )
l.push_back(commitAction(SUBVOL, cont->type(),
- createSubvolText(false,*i), this, true));
+ createSubvolText(false,*i), this, false));
}
}
Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/BtrfsCo.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/BtrfsCo.cc?rev=64109&r1=64108&r2=64109&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/BtrfsCo.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/BtrfsCo.cc Tue May 24 19:46:45 2011
@@ -155,9 +155,15 @@
}
void
-BtrfsCo::addFromVolume( const Volume& v )
+BtrfsCo::addFromVolume( const Volume& v, string &uuid )
{
Btrfs* b = new Btrfs( *this, v );
+ unsigned long long uid = 12345;
+ BtrfsIter i;
+ while( findBtrfs(decString(uid),i) )
+ ++uid;
+ uuid = decString(uid);
+ b->initUuid( uuid );
vols.push_back(b);
}
Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/BtrfsCo.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/BtrfsCo.h?rev=64109&r1=64108&r2=64109&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/BtrfsCo.h (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/BtrfsCo.h Tue May 24 19:46:45 2011
@@ -43,7 +43,7 @@
BtrfsCo(const BtrfsCo& c);
virtual ~BtrfsCo();
- void addFromVolume( const Volume& v );
+ void addFromVolume( const Volume& v, string& uuid );
void eraseVolume( Volume* v );
int createSubvolume( const string& device, const string& name );
Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.cc?rev=64109&r1=64108&r2=64109&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.cc Tue May 24 19:46:45 2011
@@ -2344,13 +2344,16 @@
co = new BtrfsCo(this);
if( co==NULL )
ret = STORAGE_MEMORY_EXHAUSTED;
+ else if( !have_co )
+ addToList( co );
if( ret==0 )
{
ret = vol->setFormat( format, fs );
if( ret==0 )
{
- co->addFromVolume( *vol );
- vol->setUsedByUuid( UB_BTRFS, "12345" );
+ string uuid;
+ co->addFromVolume( *vol, uuid );
+ vol->setUsedByUuid( UB_BTRFS, uuid );
}
}
}
@@ -5904,7 +5907,7 @@
bool ret = false;
vol = NULL;
ConstVolIterator v;
- if( findVolume( device, v, false, true ))
+ if( findVolume( device, v, false, no_btrfsc ))
{
vol = &(*v);
ret = true;
Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.h?rev=64109&r1=64108&r2=64109&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.h (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Storage.h Tue May 24 19:46:45 2011
@@ -543,8 +543,6 @@
int extendBtrfsVolume( const string& device, const deque<string>& devs );
int shrinkBtrfsVolume( const string& device, const string& dev );
int shrinkBtrfsVolume( const string& device, const deque<string>& devs );
- int newBtrfs( const string& device );
-
int addTmpfsMount( const string& mp, const string& opts );
int removeTmpfsMount( const string& mp );
Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.cc?rev=64109&r1=64108&r2=64109&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.cc Tue May 24 19:46:45 2011
@@ -2520,42 +2520,54 @@
void
Volume::getCommitActions(list<commitAction>& l) const
{
+ Volume const * p=this;
+ if( getStorage()->isUsedBySingleBtrfs(*this))
+ {
+ Volume const * n=NULL;
+ string id = "UUID="+getUsedBy().front().device();
+ y2mil( "usedBy:" << id );
+ if( getStorage()->findVolume( id, n ))
+ {
+ p = n;
+ y2mil( "found:" << *p );
+ }
+ }
if( deleted() )
{
- l.push_back(commitAction(DECREASE, cType(), removeText(false), this, true));
+ l.push_back(commitAction(DECREASE, cType(), p->removeText(false), this, true));
}
else if( needShrink() && !format )
{
- l.push_back(commitAction(DECREASE, cType(), resizeText(false), this, true));
+ l.push_back(commitAction(DECREASE, cType(), p->resizeText(false), this, true));
}
else if( created() )
{
- l.push_back(commitAction(INCREASE, cType(), createText(false), this, false));
+ l.push_back(commitAction(INCREASE, cType(), p->createText(false), this, false));
}
else if( needExtend() && !format )
{
- l.push_back(commitAction(INCREASE, cType(), resizeText(false), this, true));
+ l.push_back(commitAction(INCREASE, cType(), p->resizeText(false), this, true));
}
else if( format )
{
- l.push_back(commitAction(FORMAT, cType(), formatText(false), this, true));
+ l.push_back(commitAction(FORMAT, cType(), p->formatText(false), this, true));
}
else if( needCrsetup(false) )
{
l.push_back(commitAction(mp.empty()?INCREASE:FORMAT, cType(),
- crsetupText(false), this, mp.empty()));
+ p->crsetupText(false), this, mp.empty()));
}
else if (mp != orig_mp || (getStorage()->instsys() && mp=="swap"))
{
- l.push_back(commitAction(MOUNT, cType(), mountText(false), this, false));
+ l.push_back(commitAction(MOUNT, cType(), p->mountText(false), this, false));
}
else if( label != orig_label )
{
- l.push_back(commitAction(MOUNT, cType(), labelText(false), this, false));
+ l.push_back(commitAction(MOUNT, cType(), p->labelText(false), this, false));
}
else if( needFstabUpdate() )
{
- l.push_back(commitAction(MOUNT, cType(), fstabUpdateText(), this, false));
+ l.push_back(commitAction(MOUNT, cType(), p->fstabUpdateText(), this, false));
}
}
Modified: branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes?rev=64109&r1=64108&r2=64109&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/package/yast2-storage.changes Tue May 24 19:46:45 2011
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Tue May 24 11:24:24 CEST 2011 - fehr@suse.de
+
+- add dummy module inst_do_resize again since it is referenced
+ in control.xml
+- various btrfs related bugfixes
+- version 2.17.102
+
+-------------------------------------------------------------------
Tue May 17 13:35:53 CEST 2011 - fehr@suse.de
- huge backport from svn and git head for lots of features
Modified: branches/SuSE-Code-11-SP2-Branch/storage/storage/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/storage/src/Makefile.am?rev=64109&r1=64108&r2=64109&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/storage/src/Makefile.am (original)
+++ branches/SuSE-Code-11-SP2-Branch/storage/storage/src/Makefile.am Tue May 24 19:46:45 2011
@@ -11,6 +11,7 @@
inst_prepdisk.ycp \
inst_resize_ui.ycp \
inst_resize_dialog.ycp \
+ inst_do_resize.ycp \
inst_target_part.ycp \
inst_target_selection.ycp \
storage_finish.ycp
Added: branches/SuSE-Code-11-SP2-Branch/storage/storage/src/inst_do_resize.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/storage/src/inst_do_resize.ycp?rev=64109&view=auto
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/storage/storage/src/inst_do_resize.ycp (added)
+++ branches/SuSE-Code-11-SP2-Branch/storage/storage/src/inst_do_resize.ycp Tue May 24 19:46:45 2011
@@ -0,0 +1,22 @@
+/**
+ * Module: inst_do_resize.ycp
+ *
+ * Authors: Thomas Roelz