From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: David Martin <tasio@tasio.net>,
linux-scsi@vger.kernel.org,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
Maarten Bressers <mbres@gentoo.org>,
Daniel Drake <dsd@gentoo.org>,
Cell Broadband Engine OSS Development <cbe-oss-dev@ozlabs.org>
Subject: Re: [Cbe-oss-dev] [regression/bisected] corrupt CD data after media change and delay
Date: Mon, 09 Jun 2008 10:05:16 -0500 [thread overview]
Message-ID: <1213023916.3508.23.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0806091546260.22138@vixen.sonytel.be>
On Mon, 2008-06-09 at 15:54 +0200, Geert Uytterhoeven wrote:
> I managed to reproduce it on my laptop (Core 2 Duo, SATA DVD-RAM, running
> Ubuntu 8.04 for amd64), by booting Debian's 2.6.25 kernel into recovery mode.
> So the problem is not PS3-specific.
>
> Worse, I never got an updated /sys/block/sr0/size for the second CD, not even
> when mounting it ASAP (which is ca. 15-20 seconds after inserting it). It
> always stayed at the value for the first CD.
>
> Note that Debian's tar is `smart' and optimizes `tar cf /dev/null' by never
> reading the input files, so you have to e.g. pipe the resulting archive to
> `cat > /dev/null' or so.
Well, we have the taxonomy. It's something to do with the media change
trigger. Could you try getting the output of this patch and correlate
the prints with your success and failure cases?
Thanks,
James
---
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 7ee86d4..2b58772 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -212,6 +212,8 @@ static int sr_media_change(struct cdrom_device_info *cdi, int slot)
if (retval || (scsi_sense_valid(sshdr) &&
/* 0x3a is medium not present */
sshdr->asc == 0x3a)) {
+ printk("+10+ the result = 0x%x, skip size update ", retval);
+ scsi_show_sense_hdr(&sshdr);
/* Media not present or unable to test, unit probably not
* ready. This usually means there is no disc in the drive.
* Mark as changed, and we will figure it out later once
@@ -232,7 +234,7 @@ static int sr_media_change(struct cdrom_device_info *cdi, int slot)
sr_cd_check(cdi);
get_sectorsize(cd);
}
-
+ printk("+11+ Return forcing update is %d\n", retval);
out:
/* Notify userspace, that media has changed. */
if (retval != cd->previous_state)
next prev parent reply other threads:[~2008-06-09 15:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 14:06 [regression/bisected] corrupt CD data after media change and delay Geert Uytterhoeven
2008-06-06 15:13 ` James Bottomley
2008-06-06 17:27 ` Geert Uytterhoeven
2008-06-09 12:54 ` Geert Uytterhoeven
2008-06-09 13:54 ` [Cbe-oss-dev] " Geert Uytterhoeven
2008-06-09 15:05 ` James Bottomley [this message]
2008-06-09 15:27 ` Geert Uytterhoeven
[not found] ` <1213028647.3508.33.camel@localhost.localdomain>
2008-06-10 15:11 ` Geert Uytterhoeven
2008-06-10 15:22 ` James Bottomley
2008-06-10 15:20 ` James Bottomley
2008-06-10 15:49 ` Boaz Harrosh
2008-06-10 15:56 ` James Bottomley
2008-06-10 16:12 ` Boaz Harrosh
2008-06-10 16:17 ` James Bottomley
2008-06-13 17:33 ` Geert Uytterhoeven
2008-06-18 8:47 ` Alessandro Suardi
2008-06-18 11:13 ` Geert Uytterhoeven
2008-06-18 12:15 ` Alessandro Suardi
2008-06-21 14:18 ` Alessandro Suardi
2008-06-22 8:18 ` Geert Uytterhoeven
2008-06-22 13:14 ` Alessandro Suardi
2008-07-11 21:25 ` Alessandro Suardi
2008-07-12 12:08 ` Alessandro Suardi
2008-07-13 13:33 ` James Bottomley
2008-07-23 20:25 ` Alessandro Suardi
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=1213023916.3508.23.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=cbe-oss-dev@ozlabs.org \
--cc=dsd@gentoo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mbres@gentoo.org \
--cc=tasio@tasio.net \
/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