Messages in this thread |  | | Date | Mon, 2 Oct 2000 03:29:23 +0200 | From | Andries Brouwer <> | Subject | Re: Meaning of blk_size |
| |
On Mon, Oct 02, 2000 at 02:33:20AM +0200, Daniel Phillips wrote: > On Mon, 02 Oct 2000, Andries Brouwer wrote:
> > [you sounded as if you noticed a discrepancy somewhere - so I expected: > > foo.c uses this in line 123 but bar.c uses that in line 666.] > > No, I'm just trying to understand the meaning of the "+ 1" in ll_rw_block.c, > generic_make_request: > > unsigned long maxsector = (blk_size[major][MINOR(bh->b_rdev)] << 1) + 1;
blk_size[][] gives a block count blk_size[][]<<1 gives a sector count
but if the device had an odd number of sectors, the sector count is one larger than twice the block count.
(thus, this is not the precisely correct test; the knowledge about the number of sectors lives in the dev->sizes array; here we only have a rough check)
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/
|  |