lkml.org 
[lkml]   [2001]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: loop device broken in 2.4.6-pre5
        From jari.ruusu@pp.inet.fi Tue Jun 26 10:20:51 2001

    This patch fixes the problem. Please consider applying.

    --- linux-2.4.6-pre5/drivers/block/loop.c Sat Jun 23 07:52:39 2001
    +++ linux/drivers/block/loop.c Tue Jun 26 09:21:47 2001
    @@ -653,7 +653,7 @@
    bs = 0;
    if (blksize_size[MAJOR(lo_device)])
    bs = blksize_size[MAJOR(lo_device)][MINOR(lo_device)];
    - if (!bs)
    + if (!bs || S_ISREG(inode->i_mode))
    bs = BLOCK_SIZE;

    set_blocksize(dev, bs);

    But why 1024? Next week your neighbour comes and has a file-backed
    loop device with an odd number of 512-byte sectors.
    If you want a guarantee, then I suppose one should pick 512.
    (Or make the set blocksize ioctl also work on loop devices.)

    Andries
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:55    [W:0.023 / U:0.236 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site