Re: 4.7GB DVD-RAM geometry wrong?

Jens Axboe (axboe@suse.de)
Wed, 15 Aug 2001 13:17:33 +0200


--Rgf3q3z9SdmXC6oT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Aug 15 2001, Joseph N. Hall wrote:
> I don't know if I'm doing this the right way or not. I did spend an hour
> or three googling for "linux dvd-ram" and the like, and all I came up with
> was a bunch of 2.2-specific stuff, until I found a usenet posting that
> said in effect "you can write to /dev/scd0". So I gave that a try
> and it worked. Sort of.
>
> I have a Panasonic DVD-RAM, LF-D201 (SCSI 4.7/9.4GB). I put in a
> 4.7GB type II cartridge (that's a single-sided disk), did 'mkfs
> /dev/scd0' and then mounted it, and ... I have a 2.2GB disk!

Attached patch should fix it, Linus please apply.

-- 
Jens Axboe

--Rgf3q3z9SdmXC6oT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=sr_cap-1

--- /opt/kernel/linux-2.4.9-pre4/drivers/scsi/sr_ioctl.c Thu Jul 5 20:28:17 2001 +++ drivers/scsi/sr_ioctl.c Wed Aug 15 13:15:21 2001 @@ -545,7 +545,7 @@ switch (cmd) { case BLKGETSIZE: - return put_user(scsi_CDs[target].capacity >> 1, (long *) arg); + return put_user(scsi_CDs[target].capacity, (long *) arg); case BLKROSET: case BLKROGET: case BLKRASET:

--Rgf3q3z9SdmXC6oT-- - 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/