From: "jack_wang" <jack_wang@usish.com>
Cc: "James.Bottomley@suse.de" <James.Bottomley@suse.de>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: Re: Re: sd: Why we need to call sd_revalidate_disk twice in sd_probe_async
Date: Thu, 11 Nov 2010 08:31:55 +0800 [thread overview]
Message-ID: <201011110831550629239@usish.com> (raw)
In-Reply-To: yq1eiatzdw6.fsf@sermon.lab.mkp.net
>>>>> "Jack" == Jack Wang <jack_wang@usish.com> writes:
Jack> I notice in sd.c, we call sd_revalidate_disk twice in function
Jack> sd_probe_async? Are there some special reasons?
I'm traveling right now and don't have my scribbles. But my recollection
is that it's due to a quirk in the way things are registered with the
block layer. Some limits are hanging off of the request queue and some
off of struct gendisk.
For stacking purposes we need to set some queue defaults before we
register the gendisk. And then we do a second revalidate pass to get
everything in place after the gendisk has been set up. Alignment
offsets, for instance, need to be updated after the partition table has
been read.
So, yes. It is intentional that revalidate is called both before and
after add_disk().
If this causing you problems? And if so, why?
Hi, Martin
Thanks for explaination, I just curious about the duplicated call, No problems found.
Jack
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2010-11-11 0:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 7:21 sd: Why we need to call sd_revalidate_disk twice in sd_probe_async Jack Wang
2010-11-10 10:11 ` Martin K. Petersen
2010-11-11 0:31 ` jack_wang [this message]
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=201011110831550629239@usish.com \
--to=jack_wang@usish.com \
--cc=James.Bottomley@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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