From: Jeff Garzik <jeff@garzik.org>
To: "zhao, forrest" <forrest.zhao@intel.com>, htejun@gmail.com
Cc: liml@rtr.ca, linux-ide@vger.kernel.org
Subject: Re: [PATCH] Snoop SET FEATURES - WRITE CACHE ENABLE/DISABLE command
Date: Fri, 26 May 2006 20:15:01 -0400 [thread overview]
Message-ID: <44779A05.4010209@garzik.org> (raw)
In-Reply-To: <1148547763.23979.15.camel@forrest26.sh.intel.com>
zhao, forrest wrote:
> Hi, all
>
> This patch makes libata "Snoop SET FEATURES - WRITE CACHE ENABLE/DISABLE
> command" and clean the things up(e.g. revalidate and rescan).
>
> Here is the processing path:
>
> 1 in ata_scsi_qc_complete(), if we find that a "SET FEATURES - WRITE CACHE
> ENABLE/DISABLE" command is executed successfully, we schedule the according
> port to do revalidation
> 2 in ata_dev_revalidate(), if we find that the "write cahce enable bit" was
> changed, set port flags in order to schedule scsi_rescan_device() later in
> ata_scsi_error()
> 3 in ata_scsi_error(), if ATA_FLAG_SCSI_RESCAN is set for ap->flags, we
> queue the ata_scsi_dev_rescan() to work_queue "ata_scsi_wq"
> 4 at last, scsi_rescan_device() is invoked, so the current state of "write
> cahce enable bit" is propogated to SCSI layer.
I agree with the concept, and agree that the SCSI layer must be notified
when the ATA write cache type changes. However, I NAK the patch for the
following reasons:
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.
3) While the following test is correct,
+ if ((dev->id[85] & (1 << 5)) != (id[85] & (1 << 5)))
+ dev->ap->flags |= ATA_FLAG_SCSI_RESCAN;
there is no pressing need to avoid unnecessary rescans, during revalidation.
4) Using [__]scsi_add_device() is a regression from using scsi_scan_target()
next prev parent reply other threads:[~2006-05-27 0:15 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 [this message]
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
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=44779A05.4010209@garzik.org \
--to=jeff@garzik.org \
--cc=forrest.zhao@intel.com \
--cc=htejun@gmail.com \
--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).