5449acc gfs-kernel: workaround for bz479081. Prefault user pages.

Authored and Committed by Benjamin Marzinski 15 years ago
    gfs-kernel: workaround for bz479081. Prefault user pages.
    
    The bug uncovered in 479081 does not seem fixable without a massive
    change to how gfs works.  There is a lock ordering mismatch between
    the process address space lock and the glocks. The only good way to
    avoid this in all cases is to not hold the glock for so long, which
    is what gfs2 does. This is impossible without completely changing
    how gfs does locking.  Fortunately, this is only a problem when you
    have multiple processes sharing an address space, and are doing IO
    to a gfs file with a userspace buffer that's part of an mmapped gfs
    file. In this case, prefaulting the buffer's pages immediately
    before acquiring the glocks significantly shortens the window for
    this deadlock. Closing the window any more causes a large
    performance hit.
    
        
file modified
+55 -31