mirror of https://github.com/schoebel/mars
main: ensure inital presence of actual dir
This commit is contained in:
parent
de25b2e1ba
commit
90a6c6e0c0
|
@ -8141,6 +8141,15 @@ static void exit_main(void)
|
||||||
brick_msleep(1000);
|
brick_msleep(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static noinline
|
||||||
|
void ensure_actual(char *peer)
|
||||||
|
{
|
||||||
|
char *actual_dir = path_make("/mars/actual-%s", peer);
|
||||||
|
|
||||||
|
(void)mars_mkdir(actual_dir);
|
||||||
|
brick_string_free(actual_dir);
|
||||||
|
}
|
||||||
|
|
||||||
static int __init init_main(void)
|
static int __init init_main(void)
|
||||||
{
|
{
|
||||||
#if defined(MARS_HAS_PREPATCH) || \
|
#if defined(MARS_HAS_PREPATCH) || \
|
||||||
|
@ -8237,6 +8246,11 @@ static int __init init_main(void)
|
||||||
brick_mem_reserve();
|
brick_mem_reserve();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Ensure that the bare minimum is present, even when
|
||||||
|
* userspace support is missing.
|
||||||
|
*/
|
||||||
|
ensure_actual(my_id());
|
||||||
|
|
||||||
status = compute_emergency_mode();
|
status = compute_emergency_mode();
|
||||||
if (unlikely(status < 0)) {
|
if (unlikely(status < 0)) {
|
||||||
MARS_ERR("Sorry, your /mars/ filesystem is too small!\n");
|
MARS_ERR("Sorry, your /mars/ filesystem is too small!\n");
|
||||||
|
|
Loading…
Reference in New Issue