linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Artem Bokhan <aptem@ngs.ru>
Cc: linux-ide@vger.kernel.org, Tejun Heo <htejun@gmail.com>
Subject: Re: bad sectors, suspicious behaviour
Date: Fri, 08 Aug 2008 09:50:33 -0400	[thread overview]
Message-ID: <489C4F29.6020007@rtr.ca> (raw)
In-Reply-To: <489C4B6E.9070306@rtr.ca>

Mark Lord wrote:
> Artem Bokhan wrote:
> ..
>> I'm trying to emulate OS behaviour when something goes wrong with sata 
>> hard drive, for example, unrecoverable "bad blocks". By some reason I 
>> do not want to use any sw/hw raid.
> ..
> 
> Note that you can create/remove *real* bad sectors on most drives
> by using "hdparm --make-bad-sector" and "hdparm --repair-sector".
> 
>> I took new hard drive, because it should contain (and it contains) 
>> unreadable (not reallocated yet) sectros, and did
>>
>> 'dd if=/dev/sda of=/dev/null bs=1M'.
>>
>> first run dd log (errors1.txt) looks OK, drive recovers, as I suppose, 
>> approximately at time
>>
>> cat
>> /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:02.0/host4/target4:0:0/4:0:0:0/timeout 
>>
>> 30
>>
>> but when running dd second time, log looks strange (errors2.txt)
> ..
>> [75702.039300] ata5.00: NCQ disabled due to excessive errors
>> [75702.039382]          res 41/00:08:00:a8:36/00:00:01:00:00/40 Emask 
>> 0x1 (device error)
>> [75702.039452]          res 41/00:00:01:00:00/00:00:01:00:00/40 Emask 
>> 0x1 (device error)
>> [75702.039522] ata5: hard resetting link
>> [75702.936061] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>> [75702.996080] ata5.00: max_sectors limited to 256 for NCQ
>> [75703.296058] ata5.00: max_sectors limited to 256 for NCQ
>> [75703.296061] ata5.00: configured for UDMA/133
>> [75703.296069] ata5: EH complete
>> [75703.296098] ------------[ cut here ]------------
>> [75703.296100] WARNING: at drivers/ata/libata-core.c:4732 ata_qc_issue+0x1ca/0x230 [libata]()
..
That line is this one (linux-2.6.26.2):

        WARN_ON(ap->ops->error_handler && ata_tag_valid(link->active_tag));

So this should trigger only when link->active_tag is valid, which doesn't normally happen.
But the convoluted traceback shows that this code path came from the EH,
so something in libata EH is likely neglecting to clear link->active_tag
before issuing a new command.  

Tejun?



  reply	other threads:[~2008-08-08 13:50 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08 10:02 bad sectors, suspicious behaviour Artem Bokhan
2008-08-08 13:34 ` Mark Lord
2008-08-08 13:50   ` Mark Lord [this message]
2008-08-08 14:14     ` Mark Lord
2008-08-11 11:12       ` Bokhan Artem
2008-08-13  8:40       ` Tejun Heo
2008-08-13 10:47         ` Artem Bokhan
2008-08-13 10:50           ` Tejun Heo
2008-08-13 11:19             ` Artem Bokhan
2008-08-13 11:24               ` [PATCH #upstream-fixes] sata_mv: don't issue two DMA commands concurrently Tejun Heo
2008-08-13 11:37                 ` Artem Bokhan
2008-08-13 11:52                   ` Tejun Heo
2008-08-13 12:05                     ` Artem Bokhan
2008-08-13 12:21                       ` Tejun Heo
2008-08-13 12:32                         ` Artem Bokhan
2008-08-13 16:17                       ` Mark Lord
2008-08-13 17:37                         ` Bokhan Artem
2008-08-13 19:58                         ` Bokhan Artem
2008-08-13 23:36                           ` Mark Lord
2008-08-14  7:42                             ` Artem Bokhan
2008-08-14 12:40                               ` Mark Lord
2008-08-14 12:58                                 ` Artem Bokhan
2008-08-14 13:17                                 ` Artem Bokhan
2008-08-14 19:49                                   ` Mark Lord
2008-08-15  5:35                                     ` Artem Bokhan
2008-08-15 12:27                                       ` Mark Lord
2008-08-13 16:57                       ` Greg Freemyer
2008-08-13 17:29                         ` Bokhan Artem
2008-08-13 17:50                           ` Greg Freemyer
2008-08-13 18:04                             ` Bokhan Artem
2008-08-13 18:13                               ` Greg Freemyer
2008-08-13 11:47                 ` Artem Bokhan
2008-08-13 11:52                   ` Tejun Heo
2008-08-22 16:28                     ` Grant Grundler
2008-08-13 16:10                 ` Mark Lord
2008-08-22  6:11                 ` Jeff Garzik
2008-08-22 17:01                   ` Martin Michlmayr
2008-08-26 13:54                     ` Mark Lord
2008-08-29  7:12                       ` Martin Michlmayr
2008-08-26  1:24                 ` Gwendal Grignou
2008-08-26  7:04                   ` Tejun Heo
2008-08-26 13:58                     ` Mark Lord
  -- strict thread matches above, loose matches on Subject: below --
2008-08-08  2:57 bad sectors, suspicious behaviour Artem Bokhan

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=489C4F29.6020007@rtr.ca \
    --to=liml@rtr.ca \
    --cc=aptem@ngs.ru \
    --cc=htejun@gmail.com \
    --cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).