summaryrefslogtreecommitdiff
path: root/udev/udevadm-settle.c
AgeCommit message (Collapse)Author
2011-05-18release 169Kay Sievers
2011-05-18udevadm: settle: wake up more often if --seq-start= or --exit-if-exists= is usedKay Sievers
2011-05-16libudev: queue - always rebuild queue file when nothing is queued anymoreKay Sievers
2011-04-28set event timeout to 60 sec and settle timeout to 120Kay Sievers
2011-04-20udevadm: settle - kill alarm()Kay Sievers
2011-04-13udevadm: settle - watch queue fileKay Sievers
2011-04-13udevadm: control - add --exitKay Sievers
2010-05-27while (1) -> for (;;)Kay Sievers
2009-10-31unblock signals we might want to handleKay Sievers
On Thu, Oct 29, 2009 at 19:15, Christian P. Schmidt <schmidt@digadd.de> wrote: > After the getty replaces itself with login the pam module pam_mount > calls mount. This in turn determines that the partition to be mounted is > LUKS encrypted, and calls cryptsetup. Cryptsetup receives the password, > unlocks the partition, and calls udevadm settle in order to avoid some > problems in interaction with LVM. > > udevadm settle never returns. > > The problem here is that SIGUSR1 and SIGALRM are both blocked in oldmask > already, and never reach udevadm. No care is ever taken to ensure those > signals are not blocked.
2009-09-14udevadm: print all messages to stderr with priority higher or equal than LOG_ERRMarco d'Itri
It is needed to prevent errors in udev from going unnoticed (e.g. when udevd is not running).
2009-08-30use nanosleep() instead of usleep()Daniel Mierswa
POSIX.1-2001 declares usleep() function obsolete and POSIX.1-2008 removes it. [Kay Sievers] - include time.h - use const for timespec - scsi_id: drop rand() in retry loop - modem-probe: rename msuspend() to msleep()
2009-08-01update a few years of copyrightKay Sievers
2009-05-29udevadm: settle - add --exit-if-exists=<file>Kay Sievers
2009-05-21udevadm: settle - make --timeout=0 workingKay Sievers
2009-05-21udevd: implement a more efficient queue file formatAlan Jenkins
Directory lookups show up in profiling. The queue files are responsible for a large proportion of file-related system calls in udev coldplug. Instead of creating a file for each event, append their details to a log file. The file is periodically rebuilt (garbage-collected) to prevent it from growing indefinitely. This single queue file replaces both the queue directory and the uevent_seqnum file. On desktop systems the file tends not to grow beyond one page. So it should also save a small amount of memory in tmpfs. Tests on a running EeePC indicate average savings of 5% *udevd* cpu time as measured by oprofile. __link_path_walk is reduced from 1.5% to 1.3%. It is not completely clear where the rest of the gains come from. In tests running ~400 events, the queue file is rebuilt about 5 times. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-05-20udevadm: settle - fix timeoutAlan Jenkins
The timeout wasn't working when settle was run as root: # udevadm control --stop-exec-queue # udevadm trigger # udevadm settle --timeout=1 ... (hangs) Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-05-05remove asmlinkageKay Sievers
2009-03-12udevadm: settle - synchronise with the udev daemonScott James Remnant
There's still a slight race condition when using udevadm settle, if the udev daemon has a pending inotify event but hasn't yet generated the "change" uevent for it, the kernel and udev sequence numbers will match and settle will exit. Now udevadm settle will send a control message to udevd, which will respond by sending SIGUSR1 back to the waiting udevadm settle once it has completed the main loop iteration in which it received the control message. If there were no pending inotify events, this will simply wake up the udev daemon and allow settle to continue. If there are pending inotify events, they are handled first in the main loop so when settle is continued they will have been turned into uevents and the kernel sequence number will have been incremented. Since the inotify event is pending for udevd when the close() system call returns (it's queued as part of the kernel handling for that system call), and since the kernel sequence number is incremented by writing to the uevent file (as udevd does), this solves the race. When the settle continues, if there were pending inotify events that udevd had not read, they are now pending uevents which settle can wait for. Signed-off-by: Scott James Remnant <scott@ubuntu.com>
2009-03-11udevadm: settle - use timeout signal, instead of loop counterKay Sievers
2009-03-07udevadm: add text for new options to command and man pageKay Sievers
2009-03-04udevadm: settle - add --seq-start= --seq-end=Kay Sievers
It might be useful in some cases not to wait for "all" events. $ read START < /sys/kernel/uevent_seqnum $ (do something which may create uevents) $ udevadm settle --seq-start=$START
2009-02-05test: add test for empty and non-existent ATTRKay Sievers
2009-01-23udevadm: settle - fix typoKay Sievers
2008-12-08udevadm: settle - allow --timeout=0 and --quietKay Sievers
2008-10-24fix uninitialized variable warningsKay Sievers
2008-10-02use no_argument, required_argument, optional_argument in longoptsKay Sievers
2008-10-01udevadm: settle - use libudev queueKay Sievers
2008-09-10use size definitions from libudevKay Sievers
2008-09-10get rid of udev_sysdeps.cKay Sievers
2008-09-10update file headersKay Sievers
2008-09-08move udev_ctrl to libudev-privateKay Sievers
2008-09-06use libudev code, unify logging, pass udev context around everywhereKay Sievers
2008-09-04udevadm: move init from commands to udevadmKay Sievers
2008-09-03udevadm: rename internal functions to udevadm_*Kay Sievers
2008-09-03udevadm: rename source filesKay Sievers