* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#include <limits.h>
#include <ctype.h>
-#ifdef __linux__
-/* libcfs.h is not really needed here, but on SLES10/PPC, fs.h includes idr.h
- * which requires BITS_PER_LONG to be defined */
-#include <libcfs/libcfs.h>
-#ifndef BLKGETSIZE64
-#include <linux/fs.h> /* for BLKGETSIZE64 */
-#endif
-#include <linux/version.h>
-#endif
#include <lustre_disk.h>
#include <lustre_param.h>
#include <lnet/lnetctl.h>
}
mop.mo_ldd.ldd_flags &= ~(LDD_F_WRITECONF | LDD_F_VIRGIN);
+ /* svname of the form lustre:OST1234 means never registered */
+ ret = strlen(mop.mo_ldd.ldd_svname);
+ if (mop.mo_ldd.ldd_svname[ret - 8] == ':') {
+ mop.mo_ldd.ldd_svname[ret - 8] = '-';
+ mop.mo_ldd.ldd_flags |= LDD_F_VIRGIN;
+ } else if (mop.mo_ldd.ldd_svname[ret - 8] == '=') {
+ mop.mo_ldd.ldd_svname[ret - 8] = '-';
+ mop.mo_ldd.ldd_flags |= LDD_F_WRITECONF;
+ }
+
if (strstr(mop.mo_ldd.ldd_params, PARAM_MGSNODE))
mop.mo_mgs_failnodes++;