linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* DVD-RAM media detected with wrong number of blocks (2.4.7)
@ 2001-07-24  2:10 David Johnson
  2001-07-24  8:25 ` Jens Axboe
  2001-07-24 13:02 ` David Johnson
  0 siblings, 2 replies; 4+ messages in thread
From: David Johnson @ 2001-07-24  2:10 UTC (permalink / raw)
  To: linux-kernel

When attempting to create an ext2 partition on a dvd-ram (2.6G/5.2G) 
media the number of blocks is detected wrong causing only half of the 
disk to be usable.  When creating the filesystem with mke2fs only 
609480 2K blocks are allowed instead of 1218960 2K blocks, and I end 
up with a 1.2GB partition instead of 2.4GB one.  The 1.2GB fs works 
fine, it's just a bit small :(

This is with 2.4.7 using a Creative DVD-RAM drive (1216S) on an Adaptec 2940UW.

The correct number of blocks is detected in 2.4.6


[...]
SCSI subsystem driver Revision: 1.00
PCI: Found IRQ 11 for device 00:0c.0
scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.1.13
         <Adaptec 2940 Ultra SCSI adapter>
         aic7880: Ultra Wide Channel A, SCSI Id=7, 16/255 SCBs

   Vendor: CREATIVE  Model: DVD-RAM RAM1216S  Rev: 1311
   Type:   CD-ROM                             ANSI SCSI revision: 02
(scsi0:A:4): 10.000MB/s transfers (10.000MHz, offset 15)
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 4, lun 0
sr0: scsi3-mmc drive: 0x/0x dvd-ram cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.12
[...]


$ mke2fs -b 2048 /dev/scd0
mke2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
/dev/scd0 is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=2048 (log=1)
Fragment size=2048 (log=1)
152608 inodes, 609480 blocks
30474 blocks (5.00%) reserved for the super user
First data block=0
38 block groups
16384 blocks per group, 16384 fragments per group
4016 inodes per group
Superblock backups stored on blocks:
         16384, 49152, 81920, 114688, 147456, 409600, 442368

Writing inode tables: done
Writing superblocks and filesystem accounting information: done
$



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DVD-RAM media detected with wrong number of blocks (2.4.7)
  2001-07-24  2:10 DVD-RAM media detected with wrong number of blocks (2.4.7) David Johnson
@ 2001-07-24  8:25 ` Jens Axboe
  2001-07-24 13:02 ` David Johnson
  1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2001-07-24  8:25 UTC (permalink / raw)
  To: David Johnson; +Cc: linux-kernel

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

On Mon, Jul 23 2001, David Johnson wrote:
> When attempting to create an ext2 partition on a dvd-ram (2.6G/5.2G) 
> media the number of blocks is detected wrong causing only half of the 
> disk to be usable.  When creating the filesystem with mke2fs only 
> 609480 2K blocks are allowed instead of 1218960 2K blocks, and I end 
> up with a 1.2GB partition instead of 2.4GB one.  The 1.2GB fs works 
> fine, it's just a bit small :(
> 
> This is with 2.4.7 using a Creative DVD-RAM drive (1216S) on an Adaptec 
> 2940UW.
> 
> The correct number of blocks is detected in 2.4.6

Does this work?

-- 
Jens Axboe


[-- Attachment #2: sr-cap-1 --]
[-- Type: text/plain, Size: 348 bytes --]

--- drivers/scsi/sr_ioctl.c~	Tue Jul 24 10:24:46 2001
+++ drivers/scsi/sr_ioctl.c	Tue Jul 24 10:24:59 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 >> 2, (long *) arg);
 	case BLKROSET:
 	case BLKROGET:
 	case BLKRASET:

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DVD-RAM media detected with wrong number of blocks (2.4.7)
  2001-07-24  2:10 DVD-RAM media detected with wrong number of blocks (2.4.7) David Johnson
  2001-07-24  8:25 ` Jens Axboe
@ 2001-07-24 13:02 ` David Johnson
  2001-07-24 13:04   ` Jens Axboe
  1 sibling, 1 reply; 4+ messages in thread
From: David Johnson @ 2001-07-24 13:02 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

On 7/24/01, Jens Axboe wrote:
>On Mon, Jul 23 2001, David Johnson wrote:
>> When attempting to create an ext2 partition on a dvd-ram (2.6G/5.2G)
>> media the number of blocks is detected wrong causing only half of the
>> disk to be usable.  When creating the filesystem with mke2fs only
>> 609480 2K blocks are allowed instead of 1218960 2K blocks, and I end
>> up with a 1.2GB partition instead of 2.4GB one.  The 1.2GB fs works
>> fine, it's just a bit small :(
>>
>> This is with 2.4.7 using a Creative DVD-RAM drive (1216S) on an Adaptec
>> 2940UW.
>>
>> The correct number of blocks is detected in 2.4.6
>
>Does this work?
>

Shifting another bit causes the size to get cut in half again, not 
shifting at all appears to be the correct thing to do.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DVD-RAM media detected with wrong number of blocks (2.4.7)
  2001-07-24 13:02 ` David Johnson
@ 2001-07-24 13:04   ` Jens Axboe
  0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2001-07-24 13:04 UTC (permalink / raw)
  To: David Johnson; +Cc: linux-kernel

On Tue, Jul 24 2001, David Johnson wrote:
> On 7/24/01, Jens Axboe wrote:
> >On Mon, Jul 23 2001, David Johnson wrote:
> >>When attempting to create an ext2 partition on a dvd-ram (2.6G/5.2G)
> >>media the number of blocks is detected wrong causing only half of the
> >>disk to be usable.  When creating the filesystem with mke2fs only
> >>609480 2K blocks are allowed instead of 1218960 2K blocks, and I end
> >>up with a 1.2GB partition instead of 2.4GB one.  The 1.2GB fs works
> >>fine, it's just a bit small :(
> >>
> >>This is with 2.4.7 using a Creative DVD-RAM drive (1216S) on an Adaptec
> >>2940UW.
> >>
> >>The correct number of blocks is detected in 2.4.6
> >
> >Does this work?
> >
> 
> Shifting another bit causes the size to get cut in half again, not 
> shifting at all appears to be the correct thing to do.

Yes of course, braino. So eliminating the shift gets the right size for
you, correct?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-07-24 13:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-24  2:10 DVD-RAM media detected with wrong number of blocks (2.4.7) David Johnson
2001-07-24  8:25 ` Jens Axboe
2001-07-24 13:02 ` David Johnson
2001-07-24 13:04   ` Jens Axboe

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).