On Sat, 30 Sep 2000, Alexander Viro wrote:
> <blinks> WTF does FS have to that? But anyway, the most trivial way is
> to have the driver set blk_size[major][minor] to sector size and do
> fd = open("your_device_name",O_RDONLY);
> lseek(fd, 25600, 0);
> read(fd, buf, 16384);
Thank you for that answer.
> Driver will get a sequence of requests in its queue. Requests will have
> ->rq_dev set to your device, ->sector from 50 to 81 and ->nr_sectors == 1
> (provided that they will not get merged, indeed). It's up to the driver
> to decide what to do with them. For the rest of kernel device is just a
> linear array of blocks. Where/how do you get the data for block number n
> is entirely up to the driver. You get to decide how to interpret these
> numbers - upper layers simply do not give a damn. If you treat
> req->sector==50 as "access sector with LBA==50" - that's it.
Now how do you access beyond the limits of the FS/Partition?
We are narrowing to point that appears to make zero sense, until you
realize that what is reported to Linux as capacity is less than reality.
You can only make Linux access the stuff that knows about.
Thus, assume single partition and completely used, well all that you know
about and can access because of restrictions not known to you, because
nobody told you they were there.
Recall the 30GB drive de-stroked to 15GB:
Linux can only find the first 15GB, how to you get to the other 15GB if
you can legally get there? Your method above can not do it, can it?
The Linux ATA/IDE guy
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:26 EST