[lkml]   [1996]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectAnother loop device bug (2.0)
    Someone noted in a recent message (which I no longer have) that the loop
    device failed when used with a another block device. As others pointed
    out, block devices are supported.

    Some testing produced rather bad results. Copying an 8.5 MB filesystem
    containing about 700 files into a new ext2 partition with cpio failed on
    each attempt. Two types of errors occurred - missing names that should
    have been in directories, and improperly updated allocation bitmaps.

    It appears that directory (or bitmap) blocks were reread from the lower-
    level real device _before_ a previously updated block had been written
    out. The real problem is that the underlying block was not marked as
    "up-to-date", so the loop logic reread it.

    The included patch seems to fix this. It has been tested by copying a
    filesystem of 370 MB and about 20000 files. The filesystem was then
    unmounted, remounted (again through the loop device), and all files
    matched with "cmp".

    --- linux/drivers/block/loop.c.orig Sun May 5 21:28:51 1996
    +++ linux/drivers/block/loop.c Thu Jun 20 00:29:45 1996
    @@ -225,8 +225,10 @@
    goto error_out;
    - if (CURRENT->cmd == WRITE)
    + if (CURRENT->cmd == WRITE) {
    + mark_buffer_uptodate(bh, 1);
    mark_buffer_dirty(bh, 1);
    + }
    dest_addr += size;
    len -= size;
    B. D. Elliott (Seattle)

     \ /
      Last update: 2005-03-22 13:37    [W:0.017 / U:9.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site