[lkml]   [2000]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: reading 1 hardsector size, not one block size
At 00:40 29/09/2000, 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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.049 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site