Comment 21 for bug 874774

Revision history for this message
TJ (tj) wrote :

I've been doing some local testing on the DEVLINKS patches to optimise the iterations. I developed a user script to test the function in a simulated environment. The script and log from my complex LVM/crypt system are contained in the attached archive.

Please see the README in the archive for more details. Here's a summary:

I created the script to compare algorithms to eliminate unnecessary iterations of the "while read ..."
and "for link in $DEVLINKS" loops. These were brought to my attention by Steve Langasek's comments
in Launchpad bug #874774.

The attached log-file demostrates how the current function (with bug-fix modifications by SL)
does several unnecessary iterations of entries in crypttab, and of paths in $DEVLINKS.

Specfically, search for the lines following ">>253:14 = dm-14" in test_crypt.log to compare how the
two versions of the function perform the matching and the unnecessary iterations in the original function
on my complex LVM/crypted system.