Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264313AbTKMPWn (ORCPT ); Thu, 13 Nov 2003 10:22:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264314AbTKMPWn (ORCPT ); Thu, 13 Nov 2003 10:22:43 -0500 Received: from fw.osdl.org ([65.172.181.6]:37857 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S264313AbTKMPWl (ORCPT ); Thu, 13 Nov 2003 10:22:41 -0500 Date: Thu, 13 Nov 2003 07:22:33 -0800 (PST) From: Linus Torvalds To: Jens Axboe cc: Pascal Schmidt , Bill Davidsen , Subject: Re: 2.9test9-mm1 and DAO ATAPI cd-burning corrupt In-Reply-To: <20031113143521.GK4441@suse.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1495 Lines: 39 On Thu, 13 Nov 2003, Jens Axboe wrote: > On Thu, Nov 13 2003, Pascal Schmidt wrote: > > > > My patch from yesterday should handle that situation. > > cdrom_get_last_written is allowed to override the capacity from > > cdrom_read_capacity. > > Yep, that is fine. Well, there is a good argument for not bothering with the "cdrom_get_last_written" at all: the SCSI layer never does anything like that as far as I can see, so arguably everybody who ever used ide-scsi would only ever have seen the READ_CAPACITY command be used. And nobody ever complained about bad capacitites as far as I can remember.. But I might have missed something in the SCSI driver. But I actually see a if (cdrom_get_last_written(..) in sr.c, and it's been #if 0'ed out since before the Bitkeeper tree started. And that code definitely does the READ_CAPACITY first. The "sd.c" code (which is what a MO device would use) obviously doesn't do cdrom_get_last_written either - it just does a READ_CAPACITY. (Well, it does a READ_CAPACITY_16 if it hits a really big disk, but that only hits if the disk has more than 4G sectors, so we can ignore it for CD-ROM's for a while. So I'd argue for just dropping the cdrom_get_last_written() call entirely. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/