linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "zhao, forrest" <forrest.zhao@intel.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>, liml@rtr.ca, linux-ide@vger.kernel.org
Subject: Re: [PATCH] Snoop SET FEATURES - WRITE CACHE ENABLE/DISABLE command
Date: Mon, 29 May 2006 17:18:08 +0800	[thread overview]
Message-ID: <1148894288.3466.32.camel@forrest26.sh.intel.com> (raw)
In-Reply-To: <447AB9FB.6020706@gmail.com>

On Mon, 2006-05-29 at 18:08 +0900, Tejun Heo wrote:

> > 
> > 1) Tejun's revalidate should trigger scsi_rescan_device(), as your patch 
> > indicates.  But that's pretty much all that needs to be done.
> > 
> > 2) Thus, a new bit (ATA_FLAG_SCSI_RESCAN) and a new workqueue are 
> > unnecessary.
> 
> SCSI rescan is done by issuing commands using scsi_execute_req().  The 
> commands are supposed to be processed via normal SCSI command execution 
> path which is blocked during EH is in progress, so we need to rescan in 
> separate context.
Thank you for giving the reason why my machine hanged when
scsi_rescan_device() is invoked in SCSI EH thread :)
> 
> * I've renamed ata_hotplug_wq to ata_scsi_wq in hotplug patches.  I 
> think rescan can use this wq instead of creating its own.
Yes, ata_scsi_wq will do the work, which can't be done in SCSI EH thread.

> * When snooping for SETFEATURES in ata_scsi_qc_complete(), why check 
> cdb[0] for ATA_16/12?  Isn't simply checking tf.command enough?
Oh, checking cdb[0] for ATA_16/12 is unnecessary since the command id is
unique.

> * There's a race window between ATA revalidation and SCSI rescan.  We 
> can plug this hole by deferring commands till rescan is complete.  But I 
> doubt it would be worth the trouble.
> 
This is really a problem. But the race condition is not so critical that
we need to bother to do some sync between libata and SCSI layer, right?

Thanks,
Forrest

  reply	other threads:[~2006-05-29  9:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-25  9:02 [PATCH] Snoop SET FEATURES - WRITE CACHE ENABLE/DISABLE command zhao, forrest
2006-05-27  0:15 ` Jeff Garzik
2006-05-29  6:35   ` zhao, forrest
2006-05-29 11:29     ` Mark Lord
2006-05-29  9:08   ` Tejun Heo
2006-05-29  9:18     ` zhao, forrest [this message]
2006-05-29  9:46       ` Tejun Heo
2006-05-29  9:20     ` Jeff Garzik
2006-05-29  9:43       ` Tejun Heo
2006-05-30  3:57         ` Jeff Garzik
2006-05-30  4:41     ` Jeff Garzik
2006-05-30  4:50       ` Tejun Heo
2006-05-30  4:57         ` Jeff Garzik
2006-05-30  5:10           ` Tejun Heo
2006-05-30  5:08             ` zhao, forrest
2006-05-30  7:22               ` Tejun Heo

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=1148894288.3466.32.camel@forrest26.sh.intel.com \
    --to=forrest.zhao@intel.com \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=liml@rtr.ca \
    --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).