MLN modifications

From SOFTICE

Jump to: navigation, search

Contents

Developed by:

Synopsis

The following modifications have been made to MLN 0.82b23:

  • Implemented proper COW (copy-on-write) file system support
  • Fixed build freezes that occur when the build directory is an SMB (Samba) based filesystem

COW (Copy on Write) Filesystem Support

By default, MLN 0.82b23 makes a copy of each host's source filesystem template. This defeats the main purpose of COW filesystems, which is to conserve disk space. To fix this, perform the following modification.

Search for, and replace the following two lines...

print "Building cow_filesystem base: $cow_filesystem\n";
buildFilesystem( $cow_filesystem, $template, $temp_size );

...with these lines:

print "Linking to cow_filesystem base: $cow_filesystem\n";
system("$shell{'LN'} -s $TEMPLATEDIR/$template $IMAGEDIR/$cow_filesystem");

SMB Freezes

MLN builds can freeze when the target build directory is located on an SMB based filesystem. This is because MLN doesn't wait for SMB writes to finish. To correct this, make the following modification to add a 1-second pause after each UML hosts' file system is setup:

Search for the following line, which was added when enabling proper COW filesystem support:

system("$shell{'LN'} -s $TEMPLATEDIR/$template $IMAGEDIR/$cow_filesystem");

Add the following line underneath it:

system("/bin/sleep 1");

This fix may also correct similar problems with other network-based filesystems.

References

  • [1] COW Filesystem Patch
Personal tools