Bug 513070
| Summary: | cciss disk devices do not have storage capability in HAL | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Tom Coughlan <coughlan> | ||||||||
| Component: | kernel | Assignee: | Rob Evers <revers> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Red Hat Kernel QE team <kernel-qe> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | high | ||||||||||
| Version: | 5.4 | CC: | apevec, azarembo, cmeadors, dzickus, jzapleta, karen.skweres, llim, mike.miller, mjenner, ohudlick, ovirt-maint, revers, rhughes, rpacheco, sghosh, syeghiay, vbenes, yeylon | ||||||||
| Target Milestone: | rc | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | 489982 | Environment: | |||||||||
| Last Closed: | 2009-09-02 08:35:05 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | 489982 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Comment 1
RHEL Program Management
2009-07-21 20:34:24 UTC
Created attachment 354668 [details]
original patch from Mike Miller
Created attachment 354670 [details]
Mike Miller's patch without fix for 510178, which is already committed
Comment on attachment 354668 [details]
original patch from Mike Miller
Originally attached for reference only.
Comment from Redhat internal code review: > > @@ -4040,10 +4308,24 @@ static struct pci_driver cciss_pci_driver = { > */ > static int __init cciss_init(void) > { > + int err; > + > printk(KERN_INFO DRIVER_NAME "\n"); > > + err = bus_register(&cciss_bus_type); I did not see a bus_unregister when the module is unloaded. Created attachment 355289 [details]
call bus_unregister in cciss_remove_one
Patch to call bus_unregister during module unload.
in kernel-2.6.18-160.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5 Please do NOT transition this bugzilla state to VERIFIED until our QE team has sent specific instructions indicating when to do so. However feel free to provide a comment indicating that this fix has been verified. Mike Miller, Another problem was noticed after this was accepted, during a late internal code review: ----- > +++ b/drivers/block/cciss.c > > +static ssize_t dev_show_vendor(struct device *dev, > > + struct device_attribute *attr, char *buf) > > +{ > > + drive_info_struct *drv = to_drv(dev); > > + struct ctlr_info *h = to_hba(dev->parent); > > + char vendor[VENDOR_LEN + 1]; > > + unsigned long flags; > > + int ret = 0; > > + > > + spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags); > > + if (h->busy_configuring) > > + ret = -EBUSY; > > + else > > + memcpy(vendor, drv->vendor, VENDOR_LEN + 1); > > + spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); > > + > > + if (ret) > > + return ret; > > + else > > + return snprintf(buf, sizeof(vendor) + 1, "%s\n", drv->vendor); > > +} I do not understand why snprintf uses drv->vendor after you have gone to the trouble of copying it out into auto array vendor[]. > > + memcpy(model, drv->model, MODEL_LEN + 1); > > + return snprintf(buf, sizeof(model) + 1, "%s\n", drv->model); Same here. > > + memcpy(rev, drv->rev, REV_LEN + 1); > > + return snprintf(buf, sizeof(rev) + 1, "%s\n", drv->rev); Here, too. Clearly I misunderstand the intent of the author or fail to read the code. Care to help me out? ----- Can you get a patch for this upstream, and roll it into the next cciss update for rhel5.5? Rob Not being the original author I'm not sure what the intent may have been. It seem to more of a cosmetic issue than anything but I will submit patches upstream. Not sure if it is something in sysfs or just udev rule missing, but with kernel-2.6.18-160 and hal-0.5.8.1-52.el5 I don't get /dev/disk/by-id/cciss-* symlinks, while on Fedora they're created (Fedora version tested was F8 with kernel-2.6.23.1-42.fc8 and udev-116-3.fc8) (In reply to comment #22) > Not sure if it is something in sysfs or just udev rule missing, but with > kernel-2.6.18-160 and hal-0.5.8.1-52.el5 I don't get /dev/disk/by-id/cciss-* > symlinks, while on Fedora they're created (Fedora version tested was F8 with > kernel-2.6.23.1-42.fc8 and udev-116-3.fc8) scsi_id doesn't work with cciss - meaning driver doesn't support SCSI INQUIRY? workaround using cciss_id (from device-mapper-multipath RPM)
/lib/udev/cciss.sh:
#!/bin/sh
echo ID_SERIAL=$(/sbin/cciss_id $1)
/etc/udev/rules.d/60-cciss.rules:
KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="", IMPORT{program}="cciss.sh %p", ENV{ID_BUS}="cciss"
KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="cciss*p[0-9]*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-1243.html |