[lkml]   [2000]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 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)

    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:39    [W:0.047 / U:12.356 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site