All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Linux-scsi@vger.kernel.org
Subject: why disk info gets printk'ed twice?
Date: Tue, 23 Oct 2007 01:37:28 +0400	[thread overview]
Message-ID: <471D1818.3070509@msgid.tls.msk.ru> (raw)

Every dmesg users provide contains double info
about identification of [scsi,ata,..] disk drives
found in the system.  Here's mine:

scsi 2:0:0:0: Direct-Access     ATA      ST3808110AS      n/a  PQ: 0 ANSI: 5
loading module sd_mod
sd 2:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 2:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 >
sd 2:0:0:0: [sda] Attached SCSI disk

Why the lines beginning with "sd 2:0:0:0:" gets duplicated?
Can this be fixed somehow?

All the messages are in drivers/scsi/sd_mod.c, printed out by
functions called from within sd_revalidate_disk().  This routine
gets called from two contexts:
 sd_store_cache_type(), which is a sysfs thing, it seems, and
 sd_probe(), which gets called from .probe method of scsi_driver

So it seems to me that scsi_driver.probe() method gets called
twice for some reason...

This question has been asked several times, but I don't recall
any answers to it.

Thanks.

/mjt

             reply	other threads:[~2007-10-22 21:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22 21:37 Michael Tokarev [this message]
2007-10-23  0:08 ` why disk info gets printk'ed twice? David Miller
2007-10-23  0:13 ` Matthew Wilcox

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=471D1818.3070509@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=Linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.