mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
To: Luben Tuikov <ltuikov@yahoo.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-usb@vger.kernel.org, Greg KH <greg@kroah.com>,
	James Bottomley <James.Bottomley@suse.de>
Subject: Re: [PATCH repost 3] [SCSI] Retrieve the Caching mode page
Date: Tue, 23 Nov 2010 06:30:26 -0800	[thread overview]
Message-ID: <20101123143026.GM20296@one-eyed-alien.net> (raw)
In-Reply-To: <589506.10541.qm@web31809.mail.mud.yahoo.com>

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

On Tue, Nov 23, 2010 at 01:25:23AM -0800, Luben Tuikov wrote:
> --- On Mon, 11/22/10, Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
> wrote:
> 
> > What are the consequences if the device returns what appear to be a
> > Caching Mode Page, but it is actually filled with garbage or otherwise
> > inaccurate data?
> 
> Data corruption would be no different than when determining whether the
> media is write protected or determining other parameters. A similar
> question would be "What would the consequences be if the device
> misreported the media write-protect bit?" I suppose such a device would
> be quite broken and inoperative.

Not really.  In your example case of the write-protect bit, either the
device would be improperly marked as write-protected when it is not, or we
would improperly send write commands to a protected device.  Neither is a
great tradgedy; commands will fail, errors will be generated, and life will
go on.

However, I don't know what is in the Caching Mode Page.  I don't know how
those bits are used to determine the behavior of the rest of the kernel.
Maybe one of those bits means "only store data in Japanese" or something
equally disturbing.

The old code used to make a "safe" default choice if the caching mode page
was not available (for whatever reason).   What are the implications of not
making the "safe" choice improperly (due to mode page corruption)?

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

I need a computer?
					-- Customer
User Friendly, 2/19/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2010-11-23 14:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-22 16:56 Luben Tuikov
2010-11-22 17:07 ` Linus Torvalds
2010-11-22 19:02   ` Douglas Gilbert
2010-11-23  4:59     ` Matthew Dharm
2010-11-23 18:40       ` Douglas Gilbert
2010-11-22 20:02   ` Luben Tuikov
2010-11-23  5:00     ` Matthew Dharm
2010-11-23  9:25       ` Luben Tuikov
2010-11-23 14:30         ` Matthew Dharm [this message]
2010-11-24  9:02           ` Luben Tuikov
2010-11-24 10:10             ` James Bottomley
2010-11-24 14:48               ` Christoph Hellwig
2010-11-24 14:49               ` Alan Stern
2010-11-24 14:58                 ` James Bottomley
2010-11-24 16:55               ` Luben Tuikov
2010-11-23  8:43 Luben Tuikov
2010-12-05 20:53 Luben Tuikov
2010-12-08  0:02 Luben Tuikov
2010-12-08  0:12 ` Greg KH
2010-12-08  5:05   ` James Bottomley
2010-12-08  8:01     ` Luben Tuikov
2010-12-08 15:16     ` Alan Stern
2010-12-08 15:43       ` James Bottomley
2010-12-08 15:57         ` Alan Stern
2010-12-08 16:00           ` 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=20101123143026.GM20296@one-eyed-alien.net \
    --to=mdharm-kernel@one-eyed-alien.net \
    --cc=James.Bottomley@suse.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ltuikov@yahoo.com \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®