| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The previous "gplv2-only" was copy&past mistake. This re-licensing is
correct -- there is not any other contributor to this code.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The "." command will search $PATH before $PWD if the argument
specified contains no path qualifiers which can cause problems if
you happen to have something in $PATH named the same. The
attached patch changes all of the ". <foo>" in the tests subdir.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
This patch:
- replaces "$1" with "$*" for ts_init function
- add ts_has_option function
- removes some tailing white-spaces
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
The patch moves "if $UID != 0" test to a new function. That's better
than duplicate the code on many places.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* the lock function uses F_SETLK / F_SETLKW as a conditional wait.
It's more reliable and better for performance to close the
MOUNTED_LOCK file in unlock_mtab(), otherwise concurrent process will
be wait by while () { link() } loop instead on fcntl(F_SETLKW).
Thanks to Jeff Moyer <moyer@redhat.com> who found the problem two
year ago.
* when open(MOUNTED_LOCK) failed, we need to try everything again, but
the original code didn't zeroize "we_created_lockfile" and the old
version in particular case left lock_mtab() without locked /etc/mtab.
This is nasty bug.
* the original locking code had bad performance due too long sleep
(1s), between attempts. Now we're more aggressive and we use
5000ms. The result is that more processes is able to lock mtab in
short time slice.
Thanks to Peter Rockai <prockai@redhat.com> who found the problem
and suggest a first version of the code with usleep.
* now we don't count number of attempts anymore, but we count sum of
time which we spend in the mtab_lock(). The number of attempts is
not important (and it also depends on CPU performance, load,
scheduler, ...), the important thing is how long we spend with
locking. Now time limit is 30s.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The test starts concurrently many processes that use lock_mtab() as
lock for access to same file.
Signed-off-by: Karel Zak <kzak@redhat.com>
|