Package: bonnie++
Version: 1.97.1+b1

If you ask for symlinks and subdirectories, bonnie++ creates
dangling symlinks and fails:

$ /usr/sbin/bonnie++ -d /tmp -s 0 -n 1:-2:0:32
Create files in sequential order...done.
Stat files in sequential order...Can't stat file 0000000020P
Cleaning up test directory after error.

The criticial operations are:

22368 chdir("/tmp")                     = 0
22368 mkdir("./Bonnie.22368", 0700)     = 0
22368 chdir("./Bonnie.22368")           = 0
22368 mkdir("00000", 0700)              = 0
        ...
22368 mkdir("00031", 0700)              = 0
22368 open("00000/0000000000D", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 3
22368 symlink("00000/0000000000D", "00000/0000000001d6l5hxs") = 0
        ...
22368 symlink("00000/0000000000D", "00000/0000000020P") = 0
        ...
22368 symlink("00000/0000000000D", "00031/00000003ffPO") = 0
22368 chdir("00000")                    = 0
22368 open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
22368 stat64("0000000020P", 0xffb551b0) = -1 ENOENT (No such file or directory)

The problem is that /tmp/Bonnie.22368/00000/0000000020P is a symlink to
/tmp/Bonnie.22368/00000/00000/0000000000D, which doesn't exist.


There are two obvious fixes, but I'm not sure which is preferred:
1) add "../" to the front of the symlink targets
2) create one real file per directory and remove the directory
   name from the symlink targets.

Reply via email to