Red Hat Bugzilla – Bug 135943
remove or limit "Using deprecated /dev/sg mechanism instead of SG_IO on the actual device" messages
Last modified: 2007-11-30 17:07:13 EST
Description of problem:
The following hunk from SOURCES/linux-2.6.0-compile.patch causes a
huge number (thousands depending on number of disks in the system,
repeatedly over time) of messages to be spewn to the console by tools
such as Dell OpenManage Storage Administrator due to its (ab)use
of /dev/sg to detect devices. Please remove this hunk, it's also not
included upstream, or re-architect it to spew far less often (once
per open is still way too often for the same app).
@@ -241,6 +241,12 @@ sg_open(struct inode *inode, struct file
+ /* scsi generic is only for non-disk, non-cd, non-tape
+ if ( (sdp->device->type == TYPE_DISK) || (sdp->device->type
== TYPE_MOD) || (sdp->device->type == TYPE_ROM)
+ || (sdp->device->type == TYPE_WORM) || ( sdp->device->type
+ printk(KERN_WARNING "%s: Using deprecated /dev/sg
mechanism instead of SG_IO on the actual device\n",current\
/* This driver's module count bumped by fops_get in
/* Prevent the device driver from vanishing while we sleep */
Version-Release number of selected component (if applicable):
always by any app (such as ploink.c given to Doug Ledford to debug a
RHEL3 SCSI race condition between various actions (add/remove/open)
on SCSI devices.
Steps to Reproduce:
1. Run something that opens /dev/sg* repeatedly
kernel spews to the console
kernel warns once or occasionally at KERN_DEBUG level, not constantly
due to app constantly calling open(/dev/sg).
Note, the above patch is provided by Red Hat only, it has not been
included upstream. While you can argue that the app should change to
not use /dev/sg, forcing all apps to do so to avoid clogging the
system with these messages will limit third party app availability on
RHEL4. Dell OpenManage apps currently plan on using the RHEL2.1 and
RHEL3 compatibility promised by RHEL4 marketing to have their apps
ready within a year of RHEL4 launch.
Doug, can we expect this to be fixed for RHEL4 RC please?
Setting state to modified per status from Doug:
This one is done (although not by me, as it turns out this message was a
Red Hat added message and we just removed it).
Removal confirmed with 2.6.9-1.730_EL.
Verified via code inspection that this has been fixed in kernel 2.6.9-
1.751_EL. The printk KERN_WARNING message has been removed. Thanks.
Removing from internal RC Blocker list. Sue: Please do the same from