linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Sonu a <p10sonu@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: md disk fault communication code
Date: Fri, 18 Apr 2014 16:13:34 +1000	[thread overview]
Message-ID: <20140418161334.025262bb@notabene.brown> (raw)
In-Reply-To: <CAAcCrhQEW4Yzz2YQri3hzNExQVWqquvN8dzzxZN+5DBZbAtcRw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

On Fri, 18 Apr 2014 13:38:58 +0800 Sonu a <p10sonu@gmail.com> wrote:

> when disk is removed with out mdadm as I see from the stack below the
> communication reaching the md driver.
> 
> dump_stack+0x49/0x5e
> md_error+0x50/0x110 [md_mod]
> state_store+0x43/0x300 [md_mod]
> rdev_attr_store+0xad/0xd0 [md_mod]
> ? sysfs_write_file+0x62/0x1c0
> sysfs_write_file+0x138/0x1c0
> vfs_write+0xc0/0x1e0
> SyS_write+0x5a/0xa0
> ? __audit_syscall_exit+0x246/0x2f0
> system_call_fastpath+0x16/0x1b
> 
> could someone point me to the code which is monitoring scsi disks
> status and thus calling md driver sysfs interface accordingly ?

I think you ask asking how md_error gets called when a SCSI device fails,
having already discovered how it is called when you explicitly write to a
sysfs file.

Nothing monitors the scsi disks.  md only discovers failure if it sends a
request to a disk, and the request signals an error.  If you search for
'bi_end_io', functions assigned to this field are called when a request
finishes.  Those functions might call md_error if the request failed, or they
might schedule some other handling first to try to correct the error.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2014-04-18  6:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18  5:38 md disk fault communication code Sonu a
2014-04-18  6:13 ` NeilBrown [this message]
2014-04-18  6:47   ` Sonu a
2014-04-18  7:16     ` NeilBrown

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=20140418161334.025262bb@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=p10sonu@gmail.com \
    /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).