Mailinglist Archive: yast-commit (590 mails)

< Previous Next >
[yast-commit] r61625 - in /branches/SuSE-Code-11-SP1-Branch/storage: libstorage/src/AppUtil.cc libstorage/src/AppUtil.h libstorage/src/MdPart.cc libstorage/src/Volume.cc package/yast2-storage.changes
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Thu, 08 Apr 2010 16:59:27 -0000
  • Message-id: <E1Nzv4h-0005fu-IS@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Thu Apr 8 18:59:27 2010
New Revision: 61625

URL: http://svn.opensuse.org/viewcvs/yast?rev=61625&view=rev
Log:
- fixed mount-by id for partitioned MDs (bnc #594347)

Modified:
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/AppUtil.cc
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/AppUtil.h
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPart.cc
branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.cc
branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes

Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/AppUtil.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/AppUtil.cc?rev=61625&r1=61624&r2=61625&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/AppUtil.cc
(original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/AppUtil.cc Thu Apr
8 18:59:27 2010
@@ -479,6 +479,13 @@
}


+ string
+ udevAppendPart(const string& s, unsigned num)
+ {
+ return s + "-part" + decString(num);
+ }
+
+
map<string, string>
getUdevLinks(const char* path)
{

Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/AppUtil.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/AppUtil.h?rev=61625&r1=61624&r2=61625&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/AppUtil.h (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/AppUtil.h Thu Apr
8 18:59:27 2010
@@ -61,6 +61,8 @@

bool readlink(const string& path, string& buf);

+ string udevAppendPart(const string&, unsigned num);
+
void getUdevMap(const char* path, std::map<string, std::list<string>>& m);
void getRevUdevMap(const char* path, std::map<string, string>& m);


Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPart.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPart.cc?rev=61625&r1=61624&r2=61625&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPart.cc (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/MdPart.cc Thu Apr
8 18:59:27 2010
@@ -167,12 +167,9 @@
MdPart::udevId() const
{
list<string> ret;
- for (list<string>::const_iterator i = alt_names.begin();
- i != alt_names.end(); i++)
- {
- if (i->find("/by-id/") != string::npos)
- ret.push_back(*i);
- }
+ const list<string> tmp = co()->udevId();
+ for (list<string>::const_iterator i = tmp.begin(); i != tmp.end(); ++i)
+ ret.push_back(udevAppendPart("/dev/disk/by-id/" + *i, num));
return ret;
}


Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.cc?rev=61625&r1=61624&r2=61625&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.cc (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Volume.cc Thu Apr
8 18:59:27 2010
@@ -131,7 +131,8 @@
{
MountByType mb = cont->getStorage()->getDefaultMountBy();
y2mil( "mby:" << mb_names[mb] << " type:" << cType() );
- if ((cType() != DISK && cType() != DMRAID && cType() != DMMULTIPATH) &&
(mb == MOUNTBY_ID || mb == MOUNTBY_PATH))
+ if ((cType() != DISK && cType() != DMRAID && cType() != DMMULTIPATH &&
cType() != MDPART) &&
+ (mb == MOUNTBY_ID || mb == MOUNTBY_PATH))
mb = MOUNTBY_DEVICE;
if (cType() == NFSC && mb != MOUNTBY_DEVICE)
mb = MOUNTBY_DEVICE;
@@ -152,7 +153,8 @@
Volume::allowedMountBy(storage::MountByType mby, const string& mp)
{
bool ret = true;
- if ((cType() != DISK && cType() != DMRAID && cType() != DMMULTIPATH) &&
(mby == MOUNTBY_ID || mby == MOUNTBY_PATH))
+ if ((cType() != DISK && cType() != DMRAID && cType() != DMMULTIPATH &&
cType() != MDPART)
+ && (mby == MOUNTBY_ID || mby == MOUNTBY_PATH))
ret = false;
if (cType() == NFSC && mby != MOUNTBY_DEVICE)
ret = false;
@@ -615,7 +617,7 @@
else if( mby == MOUNTBY_ID || mby == MOUNTBY_PATH )
{
// TODO: why not use allowedMountBy()?
- if (cType() != DISK && cType() != DMRAID && cType() != DMMULTIPATH)
+ if (cType() != DISK && cType() != DMRAID && cType() != DMMULTIPATH
&& cType() != MDPART)
ret = VOLUME_MOUNTBY_UNSUPPORTED_BY_VOLUME;
}
if( ret==0 )

Modified: branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes?rev=61625&r1=61624&r2=61625&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes
(original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes Thu
Apr 8 18:59:27 2010
@@ -1,8 +1,13 @@
-------------------------------------------------------------------
+Thu Apr 08 17:41:16 CEST 2010 - aschnell@xxxxxxx
+
+- fixed mount-by id for partitioned MDs (bnc #594347)
+- 2.17.97
+
+-------------------------------------------------------------------
Thu Apr 8 16:00:19 CEST 2010 - fehr@xxxxxxx

- backport fixes from head to fix (bnc #592197)
-- 2.17.97

-------------------------------------------------------------------
Mon Mar 29 16:08:36 CEST 2010 - aschnell@xxxxxxx

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

< Previous Next >
This Thread
  • No further messages