File corruption after Alt+SysRq unmount (?)

From: Matt Yourst (yourst@mit.edu)
Date: Sat May 27 2000 - 02:43:48 EDT

  • Next message: Brian Gerst: "Re: [KBUILD] Re: Announcing CML2, a replacement for the kbuild system"

    Something strange seems to be going on with ReiserFS 3.6.6 on kernel
    2.4.0-test1. I don't know if this is a bug in the kernel itself or in ReiserFS,
    but it appears to be corrupting files when I unmount the filesystem using the
    Alt+SysRq+U method.

    Basically I had made a rescue disk with ReiserFS and the IDE drivers compiled as
    modules. I booted this disk and mounted my main ReiserFS partition, edited some
    files, rebuilt my ramdisk image on the partition, copied it back to the
    diskette, and rebooted again (I did cleanly unmount the partition with the SysRq
    method, or so I thought.)

    When I repeated this procedure after booting, I found that the last file I had
    edited on the ReiserFS partition was corrupted (it was ~250 bytes, but the last
    100 bytes were wrongly filled with zeros.) In another instance, I had edited one
    file, synced and unmounted the partition and rebooted only to find that the
    original version of the file was still there! In all cases, this was only the
    file data - no ReiserFS metadata seemed to be corrupted.

    These problems have never happened with recent ReiserFS versions when I either
    shut down the machine normally or cut power (in this case, the journaling works
    flawlessly.) They only seem to happen when I'm doing testing work and use
    Alt+SysRq+U to unmount ReiserFS prior to rebooting. I have a feeling that
    buffers are never flushed correctly even though the page cache appears to be
    vaild, but why just on ReiserFS? (It never happens on ext2 as far as I know.)
    This could also be a Linux problem (i.e., with the page cache or buffer cache
    flushing), but I don't know.

    Has anyone else experienced this? I'll try to do Alt+SysRq unmounts on a scrap
    partition over and over to confirm this if possible.

    - Matt Yourst

    -------------------------------------------------------------
     Matt T. Yourst Massachusetts Institute of Technology
     yourst@mit.edu 617.225.7690
     513 French House - 476 Memorial Drive - Cambridge, MA 02136
    -------------------------------------------------------------

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



    This archive was generated by hypermail 2b29 : Sat May 27 2000 - 02:47:38 EDT