]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Merge commit 'remotes/fml/master'
authorroot <root@braid.x>
Fri, 28 Mar 2008 14:10:20 +0000 (15:10 +0100)
committerroot <root@braid.x>
Fri, 28 Mar 2008 14:10:20 +0000 (15:10 +0100)
dss.c
dss.ggo

diff --git a/dss.c b/dss.c
index 02d0c8bd5d9e1cc5ef3c5051088a8c99bbe60021..413f88df90271603b344bd778fb8d3f4282a9520 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -629,7 +629,6 @@ static void parse_config_file(int override)
        }
        DSS_EMERG_LOG("loglevel: %d\n", conf.loglevel_arg);
 //     cmdline_parser_dump(logfile? logfile : stdout, &conf);
-       ret = dss_chdir(conf.dest_dir_arg);
 out:
        free(config_file);
        if (ret >= 0)
@@ -638,10 +637,23 @@ out:
        exit(EXIT_FAILURE);
 }
 
+static void change_to_dest_dir(void)
+{
+       int ret;
+
+       DSS_INFO_LOG("changing cwd to %s\n", conf.dest_dir_arg);
+       ret = dss_chdir(conf.dest_dir_arg);
+       if (ret >= 0)
+               return;
+       DSS_EMERG_LOG("%s\n", dss_strerror(-ret));
+       exit(EXIT_FAILURE);
+}
+
 static void handle_sighup(void)
 {
        DSS_NOTICE_LOG("SIGHUP\n");
        parse_config_file(1);
+       change_to_dest_dir();
 }
 
 static void handle_signal(void)
@@ -965,6 +977,7 @@ int main(int argc, char **argv)
 
        if (conf.daemon_given)
                daemon_init();
+       change_to_dest_dir();
        setup_signal_handling();
        ret = call_command_handler();
        if (ret < 0)
diff --git a/dss.ggo b/dss.ggo
index 849b40d102aa08ec31e2853dcd10b2330bb12839..5c3783774420c9297e3d970a3f61adf434ddd791 100644 (file)
--- a/dss.ggo
+++ b/dss.ggo
@@ -304,7 +304,7 @@ option "min-free-percent-inodes" i
 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 "Minimal percent of free inodes"
 int typestr="percent"
-default="2"
+default="0"
 optional
 details="
        Specify the minimum amount of free inodes on the file system
@@ -312,5 +312,10 @@ details="
        are free, snatshot removal kicks in just as in case of low
        disk space.
 
-       A value of zero deactivates this check.
+       Note that not every file system supports the concept of inodes.
+       Moreover it is not possible to reliably detect whether this is
+       the case. Therefore this feature is disabled by default. It's
+       safe to enable it for ext3 file systems on linux though.
+
+       A value of zero (the default) deactivates this check.
 "