Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 312450 Details for
Bug 456392
Xen Support more than 16 disk devices (userland)
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch the python stuff to accept devices > xvdp
expand-xvd-16-tools-python.patch (text/plain), 4.09 KB, created by
Chris Lalancette
on 2008-07-23 10:04:32 UTC
(
hide
)
Description:
Patch the python stuff to accept devices > xvdp
Filename:
MIME Type:
Creator:
Chris Lalancette
Created:
2008-07-23 10:04:32 UTC
Size:
4.09 KB
patch
obsolete
>diff -urp xen-3.1.0-src/tools/python/xen/util/blkif.py xen-3.1.0-src.new/tools/python/xen/util/blkif.py >--- xen-3.1.0-src/tools/python/xen/util/blkif.py 2008-07-01 13:36:32.000000000 +0200 >+++ xen-3.1.0-src.new/tools/python/xen/util/blkif.py 2008-07-14 20:46:47.000000000 +0200 >@@ -18,29 +18,34 @@ def blkdev_name_to_number(name): > > n = expand_dev_name(name) > >+ devname = 'virtual-device' >+ devnum = None >+ > try: >- return os.stat(n).st_rdev >+ return (devname, os.stat(n).st_rdev) > except Exception, ex: > log.debug("exception looking up device number for %s: %s", name, ex) > pass > >- if re.match( '/dev/sd[a-p]([1-9]|1[0-5])?', n): >- return 8 * 256 + 16 * (ord(n[7:8]) - ord('a')) + int(n[8:] or 0) >- >- if re.match( '/dev/hd[a-t]([1-9]|[1-5][0-9]|6[0-3])?', n): >+ if re.match( '/dev/sd[a-p]([1-9]|1[0-5])?$', n): >+ devnum = 8 * 256 + 16 * (ord(n[7:8]) - ord('a')) + int(n[8:] or 0) >+ elif re.match( '/dev/hd[a-t]([1-9]|[1-5][0-9]|6[0-3])?', n): > ide_majors = [ 3, 22, 33, 34, 56, 57, 88, 89, 90, 91 ] > major = ide_majors[(ord(n[7:8]) - ord('a')) / 2] > minor = ((ord(n[7:8]) - ord('a')) % 2) * 64 + int(n[8:] or 0) >- return major * 256 + minor >- >- if re.match( '/dev/xvd[a-p]([1-9]|1[0-5])?', n): >- return 202 * 256 + 16 * (ord(n[8:9]) - ord('a')) + int(n[9:] or 0) >- >- # see if this is a hex device number >- if re.match( '^(0x)?[0-9a-fA-F]+$', name ): >- return string.atoi(name,16) >+ devnum = major * 256 + minor >+ elif re.match( '/dev/xvd[a-p]([1-9]|1[0-5])?$', n): >+ devnum = (202 << 8) + ((ord(n[8:9]) - ord('a')) << 4) + int(n[9:] or 0) >+ elif re.match('/dev/xvd[q-z]([1-9]|1[0-5])?$', n): >+ devname = 'virtual-device-ext' >+ devnum = (1 << 28) + ((ord(n[8:9]) - ord('a')) << 8) + int(n[9:] or 0) >+ elif re.match('/dev/xvd[a-i][a-z]([1-9]|1[0-5])?$', n): >+ devname = 'virtual-device-ext' >+ devnum = (1 << 28) + (((ord(n[8:9]) - ord('a') + 1) * 26 + (ord(n[9:10]) - ord('a'))) << 8) + int(n[10:] or 0) >+ elif re.match( '^(0x)?[0-9a-fA-F]+$', name ): >+ devnum = string.atoi(name,16) > >- return None >+ return (devname, devnum) > > def blkdev_segment(name): > """Take the given block-device name (e.g. '/dev/sda1', 'hda') >@@ -52,7 +57,7 @@ def blkdev_segment(name): > type: 'Disk' or identifying name for partition type > """ > val = None >- n = blkdev_name_to_number(name) >+ (name, n) = blkdev_name_to_number(name) > if not n is None: > val = { 'device' : n, > 'start_sector' : long(0), >diff -urp xen-3.1.0-src/tools/python/xen/xend/server/blkif.py xen-3.1.0-src.new/tools/python/xen/xend/server/blkif.py >--- xen-3.1.0-src/tools/python/xen/xend/server/blkif.py 2008-07-01 13:36:33.000000000 +0200 >+++ xen-3.1.0-src.new/tools/python/xen/xend/server/blkif.py 2008-07-14 20:47:37.000000000 +0200 >@@ -85,11 +85,11 @@ class BlkifController(DevController): > if not xroot.get_enable_image_format_probing(): > back.update({'format' : 'raw'}) > >- devid = blkif.blkdev_name_to_number(dev) >+ (device_path, devid) = blkif.blkdev_name_to_number(dev) > if devid is None: > raise VmError('Unable to find number for device (%s)' % (dev)) > >- front = { 'virtual-device' : "%i" % devid, >+ front = { device_path : "%i" % devid, > 'device-type' : dev_type > } > >diff -urp xen-3.1.0-src/tools/xm-test/lib/XmTestLib/block_utils.py xen-3.1.0-src.new/tools/xm-test/lib/XmTestLib/block_utils.py >--- xen-3.1.0-src/tools/xm-test/lib/XmTestLib/block_utils.py 2007-05-18 16:45:21.000000000 +0200 >+++ xen-3.1.0-src.new/tools/xm-test/lib/XmTestLib/block_utils.py 2008-07-14 20:48:26.000000000 +0200 >@@ -15,7 +15,7 @@ __all__ = [ "block_attach", "block_detac > > > def get_state(domain, devname): >- number = xen.util.blkif.blkdev_name_to_number(devname) >+ (path, number) = xen.util.blkif.blkdev_name_to_number(devname) > s, o = traceCommand("xm block-list %s | awk '/^%d/ {print $4}'" % > (domain.getName(), number)) > if s != 0:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 456392
:
312449
| 312450