light: disallow modprobe when UUID is missing

This commit is contained in:
Thomas Schoebel-Theuer 2015-03-18 13:02:19 +01:00
parent 9cb5b54cdc
commit 876625d66a

View File

@ -5619,7 +5619,13 @@ static int __init init_light(void)
{
extern int min_free_kbytes;
int new_limit = 4096;
int status = 0;
struct kstat dummy;
int status = mars_stat("/mars/uuid", &dummy, true);
if (unlikely(status < 0)) {
printk(KERN_ERR "cannot load MARS: cluster UUID is missing. Mount /mars/, and/or use {create,join}-cluster first.\n");
return -ENOENT;
}
// bump the min_free limit
if (min_free_kbytes < new_limit)