Re: reading 1 hardsector size, not one block size

From: Andries Brouwer (aeb@veritas.com)
Date: Fri Sep 29 2000 - 07:03:58 EST


At 00:40 29/09/2000, Matt_Domsch@Dell.com wrote:

> >I'm writing some code to grok the Intel EFI GUID Partition Table structures.
> >To to so, my partition reading code (in fs/partitions) needs to be able to
> >read one physical sector at a time, particularly the first and last sectors
> >on the disk. The bread() function ultimately calls ll_rw_block(), which
> >checks that my read size is the same as the block size, which is 1024 for a
> >SCSI disk, while the physical sector size is 512 bytes. The EFI Spec calls
> >for reading/writing on the physical block size.

You can set the blocksize yourself before reading.

On Fri, Sep 29, 2000 at 02:20:25AM +0100, Anton Altaparmakov wrote:

> And if it has an odd number then you can't read the last sector at all! -
> That's what prevents linear raid and proper NTFS support from working on
> "odd sized" partitions...

But the question was about reading from disk, not about reading
from partition.

> It became apparent that despite that the code in many source files in the
> kernel uses BLOCK_SIZE macro it at the same time assumes that it equals
> 1024, which is, IMHO, a strange thing to assume to say the least, but
> anyway, all those places have to be fixed first.

But BLOCK_SIZE is not what is used. It is only the default.
Actual values are in these arrays.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:24 EST