[lkml]   [1999]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: mmap on a device returns ENODEV

    On Wed, 8 Dec 1999 09:07:51 -0800 (PST), Linus Torvalds
    <> said:

    >> I have discovered in the usual way (looking at the code) that it seems
    >> the 2.2 kernel doesn't support mmap on devices. In the do_mmap function
    >> (mm/mmap.c:247), ENODEV is returned if the file doesn't support the mmap
    >> operation.

    > Yes. This should finally be a thing of the past soon: one of the issues is
    > that the mmap() code requires the page cache, and the page cache didn't
    > use to handle the case of large devices correctly, and as such couldn't be
    > used - and raw devices for that reason had their very own special code.

    There is one big problem with this: software raid.

    We had this come up before but it never really reached a resolution.
    To work efficiently, soft raid 5 wants access to all cached data for
    its parity calculations. Ingo has already been talking about putting
    the page cache overlay buffers back into the buffer cache hash lists
    specifically for that purpose.

    As soon as we have <4k-blocksize buffers pinned in this way in the
    page cache, we cannot freely relocate those buffers to be page-aligned
    with respect to their physical location.

    The layering-violation of the soft raid code already means that you
    cannot safely run journaling or swap on top of raid 1 or raid 5. One
    way or another, we need to define the right semantics for IO: does it
    always go throught the buffer cache, linked into the hash lists and
    findable by the raid code, or is ll_rw_block the sole API?

    Raid 5 is going to have a hard time anyway continuing its cache
    snooping if the proposals to add a kiobuf-based alternative interface
    to the request layer pan out.


    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 13:55    [W:0.022 / U:194.316 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site