Opened 3 weeks ago

Closed 3 weeks ago

#1618 closed defect (fixed)

program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO

Reported by: Roy Sigurd Karlsbakk Owned by:
Priority: minor Milestone: Release 7.4
Component: all Version:
Keywords: linux scsi Cc:

Description

Hi all

For years, I've been spammed with "program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO" in the kernel log. This happens on several machines with varying versions of primarily Debian, but also others. The last one I checked, was one with fully updated Bullseye with smartmontools version:

smartmontools release 7.2 dated 2020-12-30 at 16:48:30 UTC
smartmontools SVN rev 5155 dated 2020-12-30 at 16:49:18
smartmontools build host: x86_64-pc-linux-gnu
smartmontools build with: C++14, GCC 10.2.1 20201224
smartmontools configure arguments: '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--localstatedir=/var' '--disable-option-checking' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu' '--prefix=/usr' '--sysconfdir=/etc' '--mandir=/usr/share/man' '--with-initscriptdir=no' '--docdir=/usr/share/doc/smartmontools' '--with-attributelog=/var/lib/smartmontools/attrlog.' '--with-drivedbdir=/var/lib/smartmontools/drivedb' '--with-exampledir=/usr/share/doc/smartmontools/examples/' '--with-savestates=/var/lib/smartmontools/smartd.' '--with-smartdplugindir=/etc/smartmontools/smartd_warning.d' '--with-smartdscriptdir=/usr/share/smartmontools' '--with-systemdenvfile=/etc/default/smartmontools' '--with-systemdsystemunitdir=/lib/systemd/system' '--with-libsystemd=auto' '--with-selinux' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CXXFLAGS=-g -O2 -fdebug-prefix-map=/build/smartmontools-aUy3Yi/smartmontools-7.2=. -fstack-protector-strong -Wformat -Werror=format-security -fsigned-char -Wall' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/smartmontools-aUy3Yi/smartmontools-7.2=. -fstack-protector-strong -Wformat -Werror=format-security -fsigned-char -Wall'

Change History (4)

comment:1 Changed 3 weeks ago by Christian Franke

Keywords: linux scsi added
Milestone: undecided

Please see r5348, ticket #93 and GH issue/129.

Please test a recent CI build from https://builds.smartmontools.org/

The old SCSI_IOCTL_SEND_COMMAND should no longer be used unless -d 3ware,N or -d marvell is specified.

comment:2 Changed 3 weeks ago by Roy Sigurd Karlsbakk

I tried with a new version and it's gone. I also tried with another machine with the same distro and same smartmontools version and also there, it's gone, so I have noe idea what's wrong with this old one. But again - on the old one - the new smartmontools version fixed it. I guess this can be closed.

comment:3 Changed 3 weeks ago by Christian Franke

Thanks for testing. Early SG_IO support was added 18 years ago (r1772). There was possibly some bug in the detection code such that SCSI_IOCTL_SEND_COMMAND was sometimes still used. Seems to be fixed in r5348.

comment:4 Changed 3 weeks ago by Christian Franke

Milestone: undecidedRelease 7.4
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.