X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=mount.c;h=55f11341a6bd03b9f134b2766721fd397a38d1d7;hp=cc94ca6f2365cb078275ee9ad323efefbe345c83;hb=825636e5a88338436a1cd910319d020038389187;hpb=8d567588cad053f79abe603ab113e1b85a92f1da diff --git a/mount.c b/mount.c index cc94ca6f2..55f11341a 100644 --- a/mount.c +++ b/mount.c @@ -33,6 +33,8 @@ #include "strv.h" #include "mount-setup.h" #include "unit-name.h" +#include "mount.h" +#include "dbus-mount.h" static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = { [MOUNT_DEAD] = UNIT_INACTIVE, @@ -50,32 +52,27 @@ static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = { [MOUNT_MAINTAINANCE] = UNIT_INACTIVE, }; -static const char* const state_string_table[_MOUNT_STATE_MAX] = { - [MOUNT_DEAD] = "dead", - [MOUNT_MOUNTING] = "mounting", - [MOUNT_MOUNTING_DONE] = "mounting-done", - [MOUNT_MOUNTED] = "mounted", - [MOUNT_REMOUNTING] = "remounting", - [MOUNT_UNMOUNTING] = "unmounting", - [MOUNT_MOUNTING_SIGTERM] = "mounting-sigterm", - [MOUNT_MOUNTING_SIGKILL] = "mounting-sigkill", - [MOUNT_REMOUNTING_SIGTERM] = "remounting-sigterm", - [MOUNT_REMOUNTING_SIGKILL] = "remounting-sigkill", - [MOUNT_UNMOUNTING_SIGTERM] = "unmounting-sigterm", - [MOUNT_UNMOUNTING_SIGKILL] = "unmounting-sigkill", - [MOUNT_MAINTAINANCE] = "maintainance" -}; +static void mount_init(Unit *u) { + Mount *m = MOUNT(u); -static char *mount_name_from_where(const char *where) { - assert(where); + assert(u); + assert(u->meta.load_state == UNIT_STUB); + + m->timeout_usec = DEFAULT_TIMEOUT_USEC; + exec_context_init(&m->exec_context); - if (streq(where, "/")) - return strdup("-.mount"); + /* We need to make sure that /bin/mount is always called in + * the same process group as us, so that the autofs kernel + * side doesn't send us another mount request while we are + * already trying to comply its last one. */ + m->exec_context.no_setsid = true; - return unit_name_build_escape(where+1, NULL, ".mount"); + m->timer_watch.type = WATCH_INVALID; + + m->control_command_id = _MOUNT_EXEC_COMMAND_INVALID; } -static void service_unwatch_control_pid(Mount *m) { +static void mount_unwatch_control_pid(Mount *m) { assert(m); if (m->control_pid <= 0) @@ -111,47 +108,11 @@ static void mount_done(Unit *u) { exec_command_done_array(m->exec_command, _MOUNT_EXEC_COMMAND_MAX); m->control_command = NULL; - service_unwatch_control_pid(m); + mount_unwatch_control_pid(m); unit_unwatch_timer(u, &m->timer_watch); } -static void mount_init(Unit *u) { - Mount *m = MOUNT(u); - - assert(u); - assert(u->meta.load_state == UNIT_STUB); - - m->timeout_usec = DEFAULT_TIMEOUT_USEC; - exec_context_init(&m->exec_context); - - /* We need to make sure that /bin/mount is always called in - * the same process group as us, so that the autofs kernel - * side doesn't send us another mount request while we are - * already trying to comply its last one. */ - m->exec_context.no_setsid = true; - - m->timer_watch.type = WATCH_INVALID; -} - -static int mount_notify_automount(Mount *m, int status) { - Unit *p; - char *k; - - assert(m); - - if (!(k = unit_name_change_suffix(UNIT(m)->meta.id, ".automount"))) - return -ENOMEM; - - p = manager_get_unit(UNIT(m)->meta.manager, k); - free(k); - - if (!p) - return 0; - - return automount_send_ready(AUTOMOUNT(p), status); -} - static int mount_add_node_links(Mount *m) { Unit *device; char *e; @@ -183,15 +144,15 @@ static int mount_add_node_links(Mount *m) { if (r < 0) return r; - if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, device)) < 0) + if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, device, true)) < 0) return r; - if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, device)) < 0) + if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, device, true)) < 0) return r; if (UNIT(m)->meta.manager->running_as == MANAGER_INIT || UNIT(m)->meta.manager->running_as == MANAGER_SYSTEM) - if ((r = unit_add_dependency(device, UNIT_WANTS, UNIT(m))) < 0) + if ((r = unit_add_dependency(device, UNIT_WANTS, UNIT(m), false)) < 0) return r; return 0; @@ -219,20 +180,20 @@ static int mount_add_path_links(Mount *m) { if (path_startswith(m->where, n->where)) { - if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, UNIT(other))) < 0) + if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, UNIT(other), true)) < 0) return r; if (n->from_etc_fstab || n->from_fragment) - if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, UNIT(other))) < 0) + if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, UNIT(other), true)) < 0) return r; } else if (path_startswith(n->where, m->where)) { - if ((r = unit_add_dependency(UNIT(m), UNIT_BEFORE, UNIT(other))) < 0) + if ((r = unit_add_dependency(UNIT(m), UNIT_BEFORE, UNIT(other), true)) < 0) return r; if (m->from_etc_fstab || m->from_fragment) - if ((r = unit_add_dependency(UNIT(other), UNIT_REQUIRES, UNIT(m))) < 0) + if ((r = unit_add_dependency(UNIT(other), UNIT_REQUIRES, UNIT(m), true)) < 0) return r; } } @@ -260,10 +221,9 @@ static bool mount_test_option(const char *haystack, const char *needle) { static int mount_add_target_links(Mount *m) { const char *target; MountParameters *p; - Unit *u; + Unit *tu; int r; - bool noauto; - bool handle; + bool noauto, handle, automount; assert(m); @@ -276,8 +236,9 @@ static int mount_add_target_links(Mount *m) { noauto = mount_test_option(p->options, MNTOPT_NOAUTO); handle = mount_test_option(p->options, "comment=systemd.mount"); + automount = mount_test_option(p->options, "comment=systemd.automount"); - if (noauto && !handle) + if (noauto && !handle && !automount) return 0; if (mount_test_option(p->options, "_netdev") || @@ -286,14 +247,28 @@ static int mount_add_target_links(Mount *m) { else target = SPECIAL_LOCAL_FS_TARGET; - if ((r = manager_load_unit(UNIT(m)->meta.manager, target, NULL, &u)) < 0) + if ((r = manager_load_unit(UNIT(m)->meta.manager, target, NULL, &tu)) < 0) return r; - if (handle) - if ((r = unit_add_dependency(u, UNIT_WANTS, UNIT(m))) < 0) + if (automount) { + Unit *am; + + if ((r = unit_load_related_unit(UNIT(m), ".automount", &am)) < 0) + return r; + + if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(am), true)) < 0) return r; - return unit_add_dependency(UNIT(m), UNIT_BEFORE, u); + return unit_add_dependency(UNIT(am), UNIT_BEFORE, tu, true); + + } else { + + if (handle) + if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(m), true)) < 0) + return r; + + return unit_add_dependency(UNIT(m), UNIT_BEFORE, tu, true); + } } static int mount_verify(Mount *m) { @@ -304,14 +279,7 @@ static int mount_verify(Mount *m) { if (UNIT(m)->meta.load_state != UNIT_LOADED) return 0; - if (!m->where) { - log_error("%s lacks Where setting. Refusing.", UNIT(m)->meta.id); - return -EINVAL; - } - - path_kill_slashes(m->where); - - if (!(e = mount_name_from_where(m->where))) + if (!(e = unit_name_from_path(m->where, ".mount"))) return -ENOMEM; b = unit_has_name(UNIT(m), e); @@ -338,6 +306,12 @@ static int mount_load(Unit *u) { /* This is a new unit? Then let's add in some extras */ if (u->meta.load_state == UNIT_LOADED) { + if (!m->where) + if (!(m->where = unit_name_to_path(u->meta.id))) + return -ENOMEM; + + path_kill_slashes(m->where); + /* Minor validity checking */ if ((m->parameters_fragment.options || m->parameters_fragment.fstype) && !m->parameters_fragment.what) return -EBADMSG; @@ -361,6 +335,18 @@ static int mount_load(Unit *u) { return mount_verify(m); } +static int mount_notify_automount(Mount *m, int status) { + Unit *p; + int r; + + assert(m); + + if ((r = unit_get_related_unit(UNIT(m), ".automount", &p)) < 0) + return r == -ENOENT ? 0 : r; + + return automount_send_ready(AUTOMOUNT(p), status); +} + static void mount_set_state(Mount *m, MountState state) { MountState old_state; assert(m); @@ -379,8 +365,9 @@ static void mount_set_state(Mount *m, MountState state) { state != MOUNT_REMOUNTING_SIGTERM && state != MOUNT_REMOUNTING_SIGKILL) { unit_unwatch_timer(UNIT(m), &m->timer_watch); - service_unwatch_control_pid(m); + mount_unwatch_control_pid(m); m->control_command = NULL; + m->control_command_id = _MOUNT_EXEC_COMMAND_INVALID; } if (state == MOUNT_MOUNTED || @@ -398,57 +385,54 @@ static void mount_set_state(Mount *m, MountState state) { mount_notify_automount(m, -ENODEV); if (state != old_state) - log_debug("%s changed %s → %s", UNIT(m)->meta.id, state_string_table[old_state], state_string_table[state]); + log_debug("%s changed %s -> %s", + UNIT(m)->meta.id, + mount_state_to_string(old_state), + mount_state_to_string(state)); unit_notify(UNIT(m), state_translation_table[old_state], state_translation_table[state]); } static int mount_coldplug(Unit *u) { Mount *m = MOUNT(u); + MountState new_state = MOUNT_DEAD; + int r; assert(m); assert(m->state == MOUNT_DEAD); - if (m->from_proc_self_mountinfo) - mount_set_state(m, MOUNT_MOUNTED); + if (m->deserialized_state != m->state) + new_state = m->deserialized_state; + else if (m->from_proc_self_mountinfo) + new_state = MOUNT_MOUNTED; - return 0; -} - -static int mount_spawn(Mount *m, ExecCommand *c, pid_t *_pid) { - pid_t pid; - int r; + if (new_state != m->state) { - assert(m); - assert(c); - assert(_pid); + if (new_state == MOUNT_MOUNTING || + new_state == MOUNT_MOUNTING_DONE || + new_state == MOUNT_REMOUNTING || + new_state == MOUNT_UNMOUNTING || + new_state == MOUNT_MOUNTING_SIGTERM || + new_state == MOUNT_MOUNTING_SIGKILL || + new_state == MOUNT_UNMOUNTING_SIGTERM || + new_state == MOUNT_UNMOUNTING_SIGKILL || + new_state == MOUNT_REMOUNTING_SIGTERM || + new_state == MOUNT_REMOUNTING_SIGKILL) { - if ((r = unit_watch_timer(UNIT(m), m->timeout_usec, &m->timer_watch)) < 0) - goto fail; + if (m->control_pid <= 0) + return -EBADMSG; - if ((r = exec_spawn(c, - NULL, - &m->exec_context, - NULL, 0, - true, - true, - UNIT(m)->meta.manager->confirm_spawn, - UNIT(m)->meta.cgroup_bondings, - &pid)) < 0) - goto fail; + if ((r = unit_watch_pid(UNIT(m), m->control_pid)) < 0) + return r; - if ((r = unit_watch_pid(UNIT(m), pid)) < 0) - /* FIXME: we need to do something here */ - goto fail; + if ((r = unit_watch_timer(UNIT(m), m->timeout_usec, &m->timer_watch)) < 0) + return r; + } - *_pid = pid; + mount_set_state(m, new_state); + } return 0; - -fail: - unit_unwatch_timer(UNIT(m), &m->timer_watch); - - return r; } static void mount_dump(Unit *u, FILE *f, const char *prefix) { @@ -475,7 +459,7 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) { "%sFrom /proc/self/mountinfo: %s\n" "%sFrom fragment: %s\n" "%sKillMode: %s\n", - prefix, state_string_table[m->state], + prefix, mount_state_to_string(m->state), prefix, m->where, prefix, strna(p->what), prefix, strna(p->fstype), @@ -493,6 +477,42 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) { exec_context_dump(&m->exec_context, f, prefix); } +static int mount_spawn(Mount *m, ExecCommand *c, pid_t *_pid) { + pid_t pid; + int r; + + assert(m); + assert(c); + assert(_pid); + + if ((r = unit_watch_timer(UNIT(m), m->timeout_usec, &m->timer_watch)) < 0) + goto fail; + + if ((r = exec_spawn(c, + NULL, + &m->exec_context, + NULL, 0, + true, + true, + UNIT(m)->meta.manager->confirm_spawn, + UNIT(m)->meta.cgroup_bondings, + &pid)) < 0) + goto fail; + + if ((r = unit_watch_pid(UNIT(m), pid)) < 0) + /* FIXME: we need to do something here */ + goto fail; + + *_pid = pid; + + return 0; + +fail: + unit_unwatch_timer(UNIT(m), &m->timer_watch); + + return r; +} + static void mount_enter_dead(Mount *m, bool success) { assert(m); @@ -563,7 +583,6 @@ fail: } static void mount_enter_unmounting(Mount *m, bool success) { - ExecCommand *c; int r; assert(m); @@ -571,18 +590,19 @@ static void mount_enter_unmounting(Mount *m, bool success) { if (!success) m->failure = true; - m->control_command = c = m->exec_command + MOUNT_EXEC_UNMOUNT; + m->control_command_id = MOUNT_EXEC_UNMOUNT; + m->control_command = m->exec_command + MOUNT_EXEC_UNMOUNT; if ((r = exec_command_set( - c, + m->control_command, "/bin/umount", m->where, NULL)) < 0) goto fail; - service_unwatch_control_pid(m); + mount_unwatch_control_pid(m); - if ((r = mount_spawn(m, c, &m->control_pid)) < 0) + if ((r = mount_spawn(m, m->control_command, &m->control_pid)) < 0) goto fail; mount_set_state(m, MOUNT_UNMOUNTING); @@ -595,16 +615,16 @@ fail: } static void mount_enter_mounting(Mount *m) { - ExecCommand *c; int r; assert(m); - m->control_command = c = m->exec_command + MOUNT_EXEC_MOUNT; + m->control_command_id = MOUNT_EXEC_MOUNT; + m->control_command = m->exec_command + MOUNT_EXEC_MOUNT; if (m->from_fragment) r = exec_command_set( - c, + m->control_command, "/bin/mount", m->parameters_fragment.what, m->where, @@ -613,7 +633,7 @@ static void mount_enter_mounting(Mount *m) { NULL); else if (m->from_etc_fstab) r = exec_command_set( - c, + m->control_command, "/bin/mount", m->where, NULL); @@ -623,9 +643,9 @@ static void mount_enter_mounting(Mount *m) { if (r < 0) goto fail; - service_unwatch_control_pid(m); + mount_unwatch_control_pid(m); - if ((r = mount_spawn(m, c, &m->control_pid)) < 0) + if ((r = mount_spawn(m, m->control_command, &m->control_pid)) < 0) goto fail; mount_set_state(m, MOUNT_MOUNTING); @@ -644,7 +664,6 @@ static void mount_enter_mounting_done(Mount *m) { } static void mount_enter_remounting(Mount *m, bool success) { - ExecCommand *c; int r; assert(m); @@ -652,7 +671,8 @@ static void mount_enter_remounting(Mount *m, bool success) { if (!success) m->failure = true; - m->control_command = c = m->exec_command + MOUNT_EXEC_REMOUNT; + m->control_command_id = MOUNT_EXEC_REMOUNT; + m->control_command = m->exec_command + MOUNT_EXEC_REMOUNT; if (m->from_fragment) { char *buf = NULL; @@ -669,7 +689,7 @@ static void mount_enter_remounting(Mount *m, bool success) { o = "remount"; r = exec_command_set( - c, + m->control_command, "/bin/mount", m->parameters_fragment.what, m->where, @@ -680,7 +700,7 @@ static void mount_enter_remounting(Mount *m, bool success) { free(buf); } else if (m->from_etc_fstab) r = exec_command_set( - c, + m->control_command, "/bin/mount", m->where, "-o", "remount", @@ -693,9 +713,9 @@ static void mount_enter_remounting(Mount *m, bool success) { goto fail; } - service_unwatch_control_pid(m); + mount_unwatch_control_pid(m); - if ((r = mount_spawn(m, c, &m->control_pid)) < 0) + if ((r = mount_spawn(m, m->control_command, &m->control_pid)) < 0) goto fail; mount_set_state(m, MOUNT_REMOUNTING); @@ -727,7 +747,6 @@ static int mount_start(Unit *u) { assert(m->state == MOUNT_DEAD || m->state == MOUNT_MAINTAINANCE); m->failure = false; - mount_enter_mounting(m); return 0; } @@ -773,6 +792,72 @@ static int mount_reload(Unit *u) { return 0; } +static int mount_serialize(Unit *u, FILE *f, FDSet *fds) { + Mount *m = MOUNT(u); + + assert(m); + assert(f); + assert(fds); + + unit_serialize_item(u, f, "state", mount_state_to_string(m->state)); + unit_serialize_item(u, f, "failure", yes_no(m->failure)); + + if (m->control_pid > 0) + unit_serialize_item_format(u, f, "control-pid", "%u", (unsigned) m->control_pid); + + if (m->control_command_id >= 0) + unit_serialize_item(u, f, "control-command", mount_exec_command_to_string(m->control_command_id)); + + return 0; +} + +static int mount_deserialize_item(Unit *u, const char *key, const char *value, FDSet *fds) { + Mount *m = MOUNT(u); + int r; + + assert(u); + assert(key); + assert(value); + assert(fds); + + if (streq(key, "state")) { + MountState state; + + if ((state = mount_state_from_string(value)) < 0) + log_debug("Failed to parse state value %s", value); + else + m->deserialized_state = state; + } else if (streq(key, "failure")) { + int b; + + if ((b = parse_boolean(value)) < 0) + log_debug("Failed to parse failure value %s", value); + else + m->failure = b || m->failure; + + } else if (streq(key, "control-pid")) { + unsigned pid; + + if ((r = safe_atou(value, &pid)) < 0 || pid <= 0) + log_debug("Failed to parse control-pid value %s", value); + else + m->control_pid = (pid_t) pid; + } else if (streq(key, "control-command")) { + MountExecCommand id; + + if ((id = mount_exec_command_from_string(value)) < 0) + log_debug("Failed to parse exec-command value %s", value); + else { + m->control_command_id = id; + m->control_command = m->exec_command + id; + } + + } else + log_debug("Unknown serialization key '%s'", key); + + return 0; +} + static UnitActiveState mount_active_state(Unit *u) { assert(u); @@ -782,7 +867,15 @@ static UnitActiveState mount_active_state(Unit *u) { static const char *mount_sub_state_to_string(Unit *u) { assert(u); - return state_string_table[MOUNT(u)->state]; + return mount_state_to_string(MOUNT(u)->state); +} + +static bool mount_check_gc(Unit *u) { + Mount *m = MOUNT(u); + + assert(m); + + return m->from_etc_fstab || m->from_proc_self_mountinfo; } static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) { @@ -796,11 +889,14 @@ static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) { m->failure = m->failure || !success; assert(m->control_pid == pid); - assert(m->control_command); - - exec_status_fill(&m->control_command->exec_status, pid, code, status); m->control_pid = 0; + if (m->control_command) { + exec_status_fill(&m->control_command->exec_status, pid, code, status); + m->control_command = NULL; + m->control_command_id = _MOUNT_EXEC_COMMAND_INVALID; + } + log_debug("%s control process exited, code=%s status=%i", u->meta.id, sigchld_code_to_string(code), status); /* Note that mount(8) returning and the kernel sending us a @@ -935,9 +1031,7 @@ static int mount_add_one( if (where[0] != '/') return 0; - e = mount_name_from_where(where); - - if (!e) + if (!(e = unit_name_from_path(where, ".mount"))) return -ENOMEM; if (!(u = manager_get_unit(m, e))) { @@ -1170,8 +1264,10 @@ finish: static void mount_shutdown(Manager *m) { assert(m); - if (m->proc_self_mountinfo) + if (m->proc_self_mountinfo) { fclose(m->proc_self_mountinfo); + m->proc_self_mountinfo = NULL; + } } static int mount_enumerate(Manager *m) { @@ -1179,18 +1275,20 @@ static int mount_enumerate(Manager *m) { struct epoll_event ev; assert(m); - if (!(m->proc_self_mountinfo = fopen("/proc/self/mountinfo", "r"))) - return -errno; + if (!m->proc_self_mountinfo) { + if (!(m->proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"))) + return -errno; - m->mount_watch.type = WATCH_MOUNT; - m->mount_watch.fd = fileno(m->proc_self_mountinfo); + m->mount_watch.type = WATCH_MOUNT; + m->mount_watch.fd = fileno(m->proc_self_mountinfo); - zero(ev); - ev.events = EPOLLERR; - ev.data.ptr = &m->mount_watch; + zero(ev); + ev.events = EPOLLERR; + ev.data.ptr = &m->mount_watch; - if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->mount_watch.fd, &ev) < 0) - return -errno; + if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->mount_watch.fd, &ev) < 0) + return -errno; + } if ((r = mount_load_etc_fstab(m)) < 0) goto fail; @@ -1301,7 +1399,7 @@ int mount_path_is_mounted(Manager *m, const char* path) { char *e, *slash; Unit *u; - if (!(e = mount_name_from_where(t))) { + if (!(e = unit_name_from_path(t, ".mount"))) { r = -ENOMEM; goto finish; } @@ -1333,11 +1431,38 @@ finish: return r; } +static const char* const mount_state_table[_MOUNT_STATE_MAX] = { + [MOUNT_DEAD] = "dead", + [MOUNT_MOUNTING] = "mounting", + [MOUNT_MOUNTING_DONE] = "mounting-done", + [MOUNT_MOUNTED] = "mounted", + [MOUNT_REMOUNTING] = "remounting", + [MOUNT_UNMOUNTING] = "unmounting", + [MOUNT_MOUNTING_SIGTERM] = "mounting-sigterm", + [MOUNT_MOUNTING_SIGKILL] = "mounting-sigkill", + [MOUNT_REMOUNTING_SIGTERM] = "remounting-sigterm", + [MOUNT_REMOUNTING_SIGKILL] = "remounting-sigkill", + [MOUNT_UNMOUNTING_SIGTERM] = "unmounting-sigterm", + [MOUNT_UNMOUNTING_SIGKILL] = "unmounting-sigkill", + [MOUNT_MAINTAINANCE] = "maintainance" +}; + +DEFINE_STRING_TABLE_LOOKUP(mount_state, MountState); + +static const char* const mount_exec_command_table[_MOUNT_EXEC_COMMAND_MAX] = { + [MOUNT_EXEC_MOUNT] = "ExecMount", + [MOUNT_EXEC_UNMOUNT] = "ExecUnmount", + [MOUNT_EXEC_REMOUNT] = "ExecRemount", +}; + +DEFINE_STRING_TABLE_LOOKUP(mount_exec_command, MountExecCommand); + const UnitVTable mount_vtable = { .suffix = ".mount", .no_alias = true, .no_instances = true, + .no_isolate = true, .init = mount_init, .load = mount_load, @@ -1351,12 +1476,19 @@ const UnitVTable mount_vtable = { .stop = mount_stop, .reload = mount_reload, + .serialize = mount_serialize, + .deserialize_item = mount_deserialize_item, + .active_state = mount_active_state, .sub_state_to_string = mount_sub_state_to_string, + .check_gc = mount_check_gc, + .sigchld_event = mount_sigchld_event, .timer_event = mount_timer_event, + .bus_message_handler = bus_mount_message_handler, + .enumerate = mount_enumerate, .shutdown = mount_shutdown };