summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2013-09-26core: rework how we match mount units against each otherLennart Poettering
Previously to automatically create dependencies between mount units we matched every mount unit agains all others resulting in O(n^2) complexity. On setups with large amounts of mount units this might make things slow. This change replaces the matching code to use a hashtable that is keyed by a path prefix, and points to a set of units that require that path to be around. When a new mount unit is installed it is hence sufficient to simply look up this set of units via its own file system paths to know which units to order after itself. This patch also changes all unit types to only create automatic mount dependencies via the RequiresMountsFor= logic, and this is exposed to the outside to make things more transparent. With this change we still have some O(n) complexities in place when handling mounts, but that's currently unavoidable due to kernel APIs, and still substantially better than O(n^2) as before. https://bugs.freedesktop.org/show_bug.cgi?id=69740
2013-09-26execute.c: little modernizationZbigniew Jędrzejewski-Szmek
2013-09-25cgroup: if we do a cgroup operation then do something on all supported ↵Lennart Poettering
controllers Previously we did operations like attach, trim or migrate only on the controllers that were enabled for a specific unit. With this changes we will now do them for all supproted controllers, and fall back to all possible prefix paths if the specified paths do not exist. This fixes issues if a controller is being disabled for a unit where it was previously enabled, and makes sure that all processes stay as "far down" the tree as groups exist.
2013-09-24support acpi firmware performance data (FPDT)Kay Sievers
Prefer firmware-provided performance data over loader-exported ones; if ACPI data is available, always use it, otherwise try to read the loader data. The firmware-provided variables start at the time the first EFI image is executed and end when the operating system exits the boot services; the (loader) time calculated in systemd-analyze increases.
2013-09-23cgroup: always enable memory.use_hierarchy= for all cgroups in the memory ↵Lennart Poettering
hierarchy The non-hierarchial mode contradicts the whole idea of a cgroup tree so let's not support this. In the future the kernel will only support the hierarchial logic anyway.
2013-09-17Use first partition in /proc/swaps for hibernation testZbigniew Jędrzejewski-Szmek
It seems that the kernel uses the first configured partition for hibernation. If it is too full, hibernation will fail. Test that directly.
2013-09-17cgroup: get rid of MemorySoftLimit=Lennart Poettering
The cgroup attribute memory.soft_limit_in_bytes is unlikely to stay around in the kernel for good, so let's not expose it for now. We can readd something like it later when the kernel guys decided on a final API for this.
2013-09-17Make tmpdir removal asynchronousZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=68232
2013-09-17man: add a list of environment variablesZbigniew Jędrzejewski-Szmek
2013-09-17specifier: rework specifier calls to return proper error messageLennart Poettering
Previously the specifier calls could only indicate OOM by returning NULL. With this change they will return negative errno-style error codes like everything else.
2013-09-16transaction.c: do not point users to logs when unit not foundZbigniew Jędrzejewski-Szmek
The logs are unlikely to contain any useful information in this case. Also, change "walked on cycle path" to "found dependency on", which is less technical and indicates the direction. With the old message, I was never sure if prior units depended on later ones, or vice versa. https://bugzilla.redhat.com/show_bug.cgi?id=996133 https://bugzilla.redhat.com/show_bug.cgi?id=997082
2013-09-16cgroup: add missing equals for BlockIOWeightGao feng
2013-09-16swap: create .wants symlink to 'auto' swap devicesTom Gundersen
As we load unit files lazily, we need to make sure something pulls in swap units that should be started automatically, otherwise the default dependencies will never be applied. This partially reinstates code removed in commit 64347fc2b983f33e7efb0fd2bb44e133fb9f30f4. Also don't order swap devices after swap.target when they are 'nofail'.
2013-09-13swap: fix reverse dependenciesTom Gundersen
Make sure swap.target correctly requires/wants the swap units. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=69291. Reported-by: Hussam Al-Tayeb
2013-09-13core/cgroup: first print then freeLukas Nykryn
2013-09-13cgroup: fix incorrectly setting memory cgroupGao feng
If the memory_limit of unit is -1, we should write "-1" to the file memory.limit_in_bytes. not the (unit64_t) -1. otherwise the memory.limit_in_bytes will be set to zero.
2013-09-13cgroup: correct the log informationGao feng
it should be memory.soft_limit_in_bytes.
2013-09-13cgroup: add the missing setting of variable's valueGao feng
set the value of variable "r" to the return value of cg_set_attribute.
2013-09-13automount: rename repeat_unmont to repeat_unmountDavid Mackey
Trivial cleanup of repeat_unmount() spelling.
2013-09-12core: notify triggered by socket of a serviceUmut Tezduyar
2013-09-12service: Implement 'on-watchdog' restart optionHannes Reinecke
Services using the watchdog option might want to be restarted only if the watchdog triggers.
2013-09-11core: failed scope units may not be restartedLennart Poettering
We don't allow reusing of scopes.
2013-09-11swap: handle nofail/noauto in coreTom Gundersen
2013-09-11mount: filesystems mounted in the initrd should not conflict with ↵Tom Gundersen
umount.target in the real root These mounts should be kept around and unmounted in the shutdown ramfs. Currently, we will still attempt to umount these in the final kill spree, but we should consider avoiding that too. Also, the should_umount function should be generalised and put into util.c or something like that, but we are still discussing precisely how.
2013-09-11mount: move device links handling from generatorTom Gundersen
This makes mount units work like swap units: when the backing device appears the mount unit will be started. v2: the device should want the mount unconditionally, not only for DefaultDependencies=yes
2013-09-11swap: backing device should unconditionally want swap unitTom Gundersen
There is no need to restrict this to only the 'nofail' case. In the '!nofail' case the unit is already wanted by swap.target, so this is not a functional change.
2013-09-10cgroup: setup BlockIODeviceWeight in bus_cgroup_set_propertyGao feng
This patch adds the support for setting up BlockIODeviceWeight in bus_cgroup_set_property. most of the codes are copied from the case that sets up DeviceAllow.
2013-09-10cgroup: compare fs paths with path_equal() rather than streq()Lennart Poettering
2013-09-10cgroup: setup BlockIORead/WriteBandwidth in bus_cgroup_set_propertyGao feng
This patch adds the support for setting up BlockIORead/WriteBandwidth in bus_cgroup_set_property.
2013-09-10blkio bandwidth: don't clean up all of entries in blockio_device_bandwidths listGao feng
if we get BlockIOReadBandwidth="", we should only remove the read-bandwidth-entries in blockio_device_bandwidths list.
2013-09-10service: remove pidfile after exit of a serviceLukas Nykryn
2013-09-09run: allow non-absolute paths as commandZbigniew Jędrzejewski-Szmek
2013-09-09systemd-run: properly escape argumentsZbigniew Jędrzejewski-Szmek
Spaces, quotes, and such, were not properly escaped. We should write them like we read them. https://bugs.freedesktop.org/show_bug.cgi?id=67971
2013-08-30main: drop capabilities of userhelpers before oursHarald Hoyer
First drop the capabilities of the userhelpers before dropping our own, otherwise we might not be allowed to drop the capabilities of the userhelpers. Especially, if we want to drop CAP_SYS_MODULE. Credits: Matteo Sasso
2013-08-28Do not realloc strings, which are already in the hashmap as keysHarald Hoyer
This prevents corruption of the hashmap, because we would free() the keys in the hashmap, if the unit is already in there, with the same cgroup path.
2013-08-28Revert "cgroup.c: check return value of unit_realize_cgroup_now()"Harald Hoyer
This reverts commit 1f11a0cdfe397cc404d61ee679fc12f58c0a885b.
2013-08-28cgroup: only check once when mode is UNIT_CHECKGao feng
If the mode is UNIT_CHECK,it means we only want to check if the paramaters are valid. the first round of cycle already did this check, no need to check again.
2013-08-28device cgroup: don't create a new CGroupDeviceAllow when it already in the listGao feng
If a device node is already in the device_allow list of CGroupContext, we should replace it instead of create a new one and append this new one to the end of device_allow list. change from v1: use streq to replace !strcmp
2013-08-28blcokio bandwidth: add missing set of CGroupBlockIODeviceBandwidth's readGao feng
BlockIOReadBandwidth and BlockIOWriteBandwidth both use config_parse_blockio_bandwidth to set up CGroupBlockIODeviceBandwidth, We should set the read value based on the left values in config files.
2013-08-27log to kmsg when "debug" is used on the kernel command lineKay Sievers
2013-08-23"-" prefix for InaccessibleDirectories and ReadOnlyDirectoriesMaciej Wereski
2013-08-23blkio: fix incorrect setting of cpu_sharesGao feng
We should set up blockio_weight not cpu_shares.
2013-08-23cgroup.c: check return value of unit_realize_cgroup_now()Harald Hoyer
do not recurse further, if unit_realize_cgroup_now() failed
2013-08-14selinux-access: move GPL to LGPL licenceKay Sievers
On Wed, Aug 14, 2013 at 10:31 PM, Daniel J Walsh <dwalsh@redhat.com> wrote: > On 08/14/2013 04:17 PM, Kay Sievers wrote: > > > > this patch added GPL code to systemd, which otherwise is all LGPL. We need > > to make sure we can always split out any code to a separate shared library > > ... > > > > Mind if I switch your src/core/selinux-access.[ch] files to LGPL? > I have no problem with it. Should be LGPL anyways.
2013-08-13logind: restore logic to kill user processes when session endsLennart Poettering
2013-08-09service: prohibit Restart= set when Type=oneshotMaciej Wereski
2013-08-09service: always unwatch PIDs before forgetting old onesLennart Poettering
2013-08-08dbus: use _cleanup_free_ instead of freeing ourselfRonny Chevalier
2013-08-06systemd: fix segv in snapshot creationZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=67848
2013-08-03pkg-config: export systemd{system,user}generatordir and catalogdirZbigniew Jędrzejewski-Szmek
We export the location of a bunch of directories this way, so it makes sense to add those three. Especially catalogdir is something that we want people to add things to. Note on the naming: the first two are tied closely to systemd itself, so I prefixed them with "systemd". The third one is rather more generic, so no prefix. https://bugs.freedesktop.org/show_bug.cgi?id=67635