Mailinglist Archive: yast-commit (62 mails)

< Previous Next >
[yast-commit] r62505 - in /trunk/storage/storage/src: include/ep-raid-lib.ycp modules/Storage.ycp
  • From: aschnell@xxxxxxxxxxxxxxxxx
  • Date: Mon, 27 Sep 2010 08:38:31 -0000
  • Message-id: <20100927083832.3475D322E1@xxxxxxxxxxxxxxxxx>
Author: aschnell
Date: Mon Sep 27 10:38:30 2010
New Revision: 62505

URL: http://svn.opensuse.org/viewcvs/yast?rev=62505&view=rev
Log:
- adapted to libstorage md raid spare changes

Modified:
trunk/storage/storage/src/include/ep-raid-lib.ycp
trunk/storage/storage/src/modules/Storage.ycp

Modified: trunk/storage/storage/src/include/ep-raid-lib.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-raid-lib.ycp?rev=62505&r1=62504&r2=62505&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-raid-lib.ycp (original)
+++ trunk/storage/storage/src/include/ep-raid-lib.ycp Mon Sep 27 10:38:30 2010
@@ -17,7 +17,7 @@
foreach(string dev, devs, {
Storage::SetPartitionId(dev, Partitions::fsid_raid);
Storage::SetPartitionFormat(dev, false, `none);
- if (!Storage::ExtendMd(raid_nr, dev))
+ if (!Storage::ExtendMd(raid_nr, [ dev ]))
ret = false;
});

@@ -31,7 +31,7 @@

foreach(string dev, devs, {
Storage::UnchangePartitionId(dev);
- if (!Storage::ShrinkMd(raid_nr, dev))
+ if (!Storage::ShrinkMd(raid_nr, [ dev ]))
ret = false;
});


Modified: trunk/storage/storage/src/modules/Storage.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=62505&r1=62504&r2=62505&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Mon Sep 27 10:38:30 2010
@@ -2690,7 +2690,7 @@
integer tmp = conv_mdstring[type]:0;
list<string> dummy = [];
string rd = sformat("/dev/md%1", nr );
- ret = LibStorage::StorageInterface::createMd( sint, rd, tmp, dummy );
+ ret = LibStorage::StorageInterface::createMd(sint, rd, tmp, dummy, dummy);
if( ret<0 )
y2error( "CreateMd sint ret:%1", ret );
UpdateTargetMapDisk( "/dev/md" );
@@ -2707,33 +2707,36 @@
if (v == type)
tmp = k;
});
-
+
+ list<string> dummy = [];
string rd = sformat("/dev/md%1", nr );
- ret = LibStorage::StorageInterface::createMd(sint, rd, tmp, devices);
+ ret = LibStorage::StorageInterface::createMd(sint, rd, tmp, devices,
dummy);
if( ret<0 )
y2error( "CreateMdWithDevs sint ret:%1", ret );
UpdateTargetMap();
return ret==0;
}

-global boolean ExtendMd( integer nr, string dev )
+global boolean ExtendMd( integer nr, list<string> devs )
{
- y2milestone( "ExtendMd nr:%1 dev:%2", nr, dev );
+ y2milestone( "ExtendMd nr:%1 devs:%2", nr, devs );
integer ret = 0;
+ list<string> dummy = [];
string rd = sformat("/dev/md%1", nr );
- ret = LibStorage::StorageInterface::extendMd( sint, rd, dev );
+ ret = LibStorage::StorageInterface::extendMd( sint, rd, devs, dummy );
if( ret<0 )
y2error( "ExtendMd sint ret:%1", ret );
UpdateTargetMap();
return( ret==0 );
}

-global boolean ShrinkMd( integer nr, string dev )
+global boolean ShrinkMd( integer nr, list<string> devs )
{
- y2milestone( "ShrinkMd nr:%1 dev:%2", nr, dev );
+ y2milestone( "ShrinkMd nr:%1 devs:%2", nr, devs );
integer ret = 0;
+ list<string> dummy = [];
string rd = sformat("/dev/md%1", nr );
- ret = LibStorage::StorageInterface::shrinkMd( sint, rd, dev );
+ ret = LibStorage::StorageInterface::shrinkMd( sint, rd, devs, dummy );
if( ret<0 )
y2error( "ShrinkMd sint ret:%1", ret );
UpdateTargetMap();
@@ -2812,7 +2815,8 @@
tmp = k;
});

- ret = LibStorage::StorageInterface::computeMdSize(sint, tmp, devices,
sizeK);
+ list<string> dummy = [];
+ ret = LibStorage::StorageInterface::computeMdSize(sint, tmp, devices,
dummy, sizeK);
if( ret!=0 )
y2milestone( "ComputeMdSize sint ret:%1", ret );
return ret;
@@ -3007,12 +3011,10 @@
ret = Storage::CreateMd( p["nr"]:0, p["raid_type"]:"raid1" );
if( ret && haskey( p, "chunk_size" ))
Storage::ChangeMdChunk( p["nr"]:0, p["chunk_size"]:4 );
- if( ret && HasRaidParity( p["raid_type"]:"" ) &&
- haskey( p, "parity_algorithm" ))
- Storage::ChangeMdParity( p["nr"]:0,
- p["parity_algorithm"]:"" );
- foreach( string d, p["devices"]:[],
- ``{ret=Storage::ExtendMd( p["nr"]:0, d )&&ret;});
+ if( ret && HasRaidParity( p["raid_type"]:"" ) && haskey( p,
"parity_algorithm" ))
+ Storage::ChangeMdParity(p["nr"]:0, p["parity_algorithm"]:"");
+ if (ret)
+ ret = Storage::ExtendMd(p["nr"]:0, p["devices"]:[]);
}
else if( ctype == `CT_LOOP )
{

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages