public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ken Moffat <zarniwhoop@ntlworld.com>
To: Gwendal Grignou <gwendal@google.com>
Cc: linux-kernel@vger.kernel.org, jgarzik@redhat.com
Subject: Re: [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check
Date: Fri, 29 Mar 2013 20:34:43 +0000	[thread overview]
Message-ID: <20130329203443.GA30494@milliways> (raw)
In-Reply-To: <20130329183103.GA27693@milliways>

On Fri, Mar 29, 2013 at 06:31:03PM +0000, Ken Moffat wrote:
> On Thu, Mar 28, 2013 at 10:56:49PM -0700, Gwendal Grignou wrote:
> 
>  Hmm, not sure.  Smartd started and was happy to monitor the disk,
> but I got two new messages between 'found in smartd database' and
> 'is SMART capable. Adding to "monitor" list' -
> 
> Mar 29 17:26:42 ac4tv smartd[2481]: Device: /dev/sda, not capable of
> SMART Health Status check
> Mar 29 17:26:42 ac4tv smartd[2481]: Device: /dev/sda, enable SMART
> Automatic Offline Testing failed.
> 
>  I've seen the first (intermittently) when a drive was starting to
> fail, and apparently there was a taskfile issue in the days of 2.6.22
> which also caused it to appear.  I don't think I've seen the second
> of these before.
> 
>  After going back and forth between the kernel where I reverted your
> original patch, and regular rc4 plus this new patch the output from
> running smartctl as root all seems to be consistent (including
> 'Passed' for the health check).
> 
>  I'm now running with the patch again, and I've started a manual
> 'long' test (which will take 85 minutes, the default 'offline' is
> about 150 minutes).
> 

 Looks like the problem is confined to smartd, smartctl is
different and working fine.  The new messages only come from smartd.cpp :
(sorry, long lines to avoid word wrapping)

  // capability check: SMART status
  if (cfg.smartcheck && ataSmartStatus2(atadev) == -1) {
    PrintOut(LOG_INFO,"Device: %s, not capable of SMART Health Status check\n",name);
    cfg.smartcheck = false;
  }

and

  // enable/disable automatic on-line testing
  if (cfg.autoofflinetest) {
    // is this an enable or disable request?
    const char *what=(cfg.autoofflinetest==1)?"disable":"enable";
    if (!smart_val_ok)
      PrintOut(LOG_INFO,"Device: %s, could not %s SMART Automatic Offline Testing.\n",name, what);
    else {
      // if command appears unsupported, issue a warning...
      if (!isSupportAutomaticTimer(&state.smartval))
        PrintOut(LOG_INFO,"Device: %s, SMART Automatic Offline Testing unsupported...\n",name);
      // ... but then try anyway
      if ((cfg.autoofflinetest==1)?ataDisableAutoOffline(atadev):ataEnableAutoOffline(atadev))
        PrintOut(LOG_INFO,"Device: %s, %s SMART Automatic Offline Testing failed.\n", name, what);
      else
        PrintOut(LOG_INFO,"Device: %s, %sd SMART Automatic Offline Testing.\n", name, what);
    }
  }

 I've no idea about the details, but it looks to me as if smartd is
still getting different values returned to it.  The capability check
normally was ok (silent), the automatic testing normally showed as
'enabled'd.

ken
-- 
das eine Mal als Tragödie, das andere Mal als Farce

  reply	other threads:[~2013-03-29 20:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28  1:01 smartd broken in 3.9.0-rc4 Ken Moffat
2013-03-28 20:59 ` smartd broken in 3.9.0-rc4 : bisected Ken Moffat
2013-03-29  0:56   ` Gwendal Grignou
2013-03-29  5:56     ` [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check Gwendal Grignou
2013-03-29 18:31       ` Ken Moffat
2013-03-29 20:34         ` Ken Moffat [this message]
2013-03-29 23:30           ` Ken Moffat
2013-04-03 23:49       ` Jeff Garzik
2013-04-04 18:25         ` Gwendal Grignou
2013-04-08 22:07         ` Ken Moffat
  -- strict thread matches above, loose matches on Subject: below --
2013-03-25 17:26 ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression Ronald
2013-03-29 15:26 ` [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check Gwendal Grignou
2013-03-29 16:10   ` Krzysztof Mazur
2013-03-29 17:06     ` Gwendal Grignou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130329203443.GA30494@milliways \
    --to=zarniwhoop@ntlworld.com \
    --cc=gwendal@google.com \
    --cc=jgarzik@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox