Hello, on Genode we use Rump since a while [0] to leverage the file system implementation. Lately we encountered rarely (not ever reproducible) corruption in written files of some few corrupted kB when we heavily stress/write data of several GB during installation of a VM.
After some weeks of debugging and ruling out various reasons (and fixing also issues on Genode's side) I finally could track down the root cause to missing functionality in sys/rump/librump/rumpvfs/vm_vfs.c. After following the hint in the vm_vfs.c file, that the code is similar/based on src/sys/uvm/uvm_pager.c, I extended vm_vfs.c accordingly properly (at least I hope so) by the error handling part. It seems, correct me if I'm wrong, that pages got freed which hold not yet written data (indicated by b_error member of struct buf). With the error handling change we finally could avoid the rarely corruption. (original Genode issue [1], just the patch [2]) We would like to contribute this change back, if applicable and after some proper review by you. Since the relevant Rump kernel code did not change for a longer time, we hope the patch should be easily applicable to upstream. Thanks for any feedback, Alex. [0] https://genode.org/documentation/release-notes/14.02#NetBSD_file_systems_using_rump_kernels [1] https://github.com/genodelabs/genode/issues/2677 [2] https://github.com/genodelabs/genode/blob/7c5552a4412e42527c6bbc1a347b8aa2237a941c/repos/dde_rump/patches/vm_vfs.patch -- Alexander Boettcher Genode Labs http://www.genode-labs.com - http://www.genode.org Genode Labs GmbH - Amtsgericht Dresden - HRB 28424 - Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
