2001-02-13 23:49:54

by Andries E. Brouwer

[permalink] [raw]
Subject: Re: block ioctl to read/write last sector

From [email protected] Wed Feb 14 00:37:25 2001

> Look at the addpart utility in the util-linux package.
> It will allow you to add a partition disjoint from
> previously existing partitions.
> And since a partition can start on an odd sector,
> this should allow you to also read the last sector.
>
> Do I overlook something?

Yes. The addpart utility just uses the block-layer ioctls to dynamically
add and/or remove partitions. What this is doing is just adjusting the
kernel's idea of what the current partition scheme is. This has _nothing_
to do with actually reading or writing data from the disk.

But it changes the idea of odd and even.
A partition can start on an odd sector.

Andries


2001-02-14 14:19:46

by Michael E Brown

[permalink] [raw]
Subject: Re: block ioctl to read/write last sector

On Wed, 14 Feb 2001 [email protected] wrote:

> But it changes the idea of odd and even.
> A partition can start on an odd sector.
>

That is orthogonal to the issue that I am trying to solve with my patch.
My code is trying to make it possible to access sectors at the _end_ of
the disk that you cannot access any other way. Example:

Disk with 1001 blocks. Hardware 512-byte sector size. The block layer uses
1024-byte soft blocksize. This means that, at the _end_ of the disk there
is a single sector that represents half of a software sector. The block
layer will not normally let you read or write that sector because it is
not a full sector.

Another example: Disk with 7 blocks (very small disk :-). Hardware
blocksize=512, Block layer uses 4096-byte blocksize. Now you have _three_
hardware blocks at the end of the disk that the block layer will not let
you read or write.

My patch allows an alternate method to access these sectors. My patch has
nothing to do with partitioning.

--
Michael Brown
Linux Systems Group
Dell Computer Corp