diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-11-06 14:28:01 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 22:16:40 -0700 |
commit | 2b41e68a08548ce44b4d145900dab2bb04cd34f7 (patch) | |
tree | f2e96c9f150775e3673891d38a5af23d4246c826 /udev.h | |
parent | 482b0ecd8fcc2651c003c6f1ae9a2d3301ecf34a (diff) |
[PATCH] replace tdb database by simple lockless file database
This makes the udev operation completely lockless by storing a
file for every node in /dev/.udevdb/* This solved the problem
with deadlocking concurrent udev processes waiting for each other
to release the file lock under heavy load.
Diffstat (limited to 'udev.h')
-rw-r--r-- | udev.h | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -41,26 +41,21 @@ #define LINE_SIZE 256 -/* length of public data to store in udevdb */ -#define UDEVICE_DB_LEN (offsetof(struct udevice, devpath)) - struct udevice { + char devpath[DEVPATH_SIZE]; + char subsystem[SUBSYSTEM_SIZE]; char name[NAME_SIZE]; char owner[OWNER_SIZE]; char group[GROUP_SIZE]; char type; int major; int minor; - unsigned int mode; /* not mode_t due to conflicting definitions in different libcs */ + mode_t mode; char symlink[NAME_SIZE]; int partitions; int config_line; char config_file[NAME_SIZE]; long config_uptime; - - /* private data, not stored in udevdb */ - char devpath[DEVPATH_SIZE]; - char subsystem[SUBSYSTEM_SIZE]; char bus_id[SYSFS_NAME_LEN]; char bus[SYSFS_NAME_LEN]; char program_result[NAME_SIZE]; @@ -81,7 +76,7 @@ extern char **main_argv; extern char **main_envp; extern char sysfs_path[SYSFS_PATH_MAX]; extern char udev_root[PATH_MAX]; -extern char udev_db_filename[PATH_MAX+NAME_MAX]; +extern char udev_db_path[PATH_MAX+NAME_MAX]; extern char udev_permissions_filename[PATH_MAX+NAME_MAX]; extern char udev_config_filename[PATH_MAX+NAME_MAX]; extern char udev_rules_filename[PATH_MAX+NAME_MAX]; |