On Sun, Jan 23, 2000 at 04:16:39PM +0000, Alan Cox wrote:

> > complained about this specific issue before.  For that matter, I am not
> > aware of any serious problems involving removeable media - I am sure people
> > will point it out if there are issues of which I am unaware.
> 
> 2K block size media currently dies at the partition scan. Its on my list to
> figure if thats partition code bugs or if the scsi layer is failing to set
> the blocksize table for the media (which would also do it)
> 
> Actual tar to /dev/sda with such media is fine so the main code is happy

Sounds like something trivial to fix (but I do not have such media
so cannot check).

Looking at the 2.3.40 source:

scsi_dev_init() calls scan_scsis() and then for each device sdtpnt->init
and sdtpnt->attach and sdtpnt->finish.
sd_init() does blksize_size[anything] = 1024, sd_hardsizes[anything] = 512.
  The comment says that it reads partition table entries, but that is false
  these days - the comment should be removed.
sd_attach() does not do anything of interest.
sd_finish() calls sd_init_onedisk(), which determines size and sectorsize.
  If sectorsize==2048 blksize_size[*] is set to 2048.
  Strange enough nothing is changed for sectorsize 4096 - this looks like a bug.
  (Anyone with scsi hardware with sectors of size 4096 or 8192?)
Afterwards, sd_finish() calls register_disk() which reads the partition table.

Indeed, register_disk() calls grok_partitions(), which calls check_partition(),
which first investigates everything for acorn partitions, delaying all boots
by several milliseconds, and then for msdos_partitions.
All partition table readers do
        bread(dev,0,get_ptable_blocksize(dev))
and this uses blksize_size[].

So, at first sight, I see nothing wrong for 2K block size media.
What precisely goes wrong / is the error message?

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to