-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
cfs_spin_unlock(&g_uuid_lock);
return rc;
}
+EXPORT_SYMBOL(lustre_uuid_to_peer);
/* Add a nid to a niduuid. Multiple nids can be added to a single uuid;
LNET will choose the best one. */
int i;
found = 1;
- for (i = 0; i < data->un_nid_count; i++)
+ for (i = 0; i < entry->un_nid_count; i++)
if (nid == entry->un_nids[i])
break;
- if (i == data->un_nid_count) {
- LASSERT(data->un_nid_count < NIDS_MAX);
- data->un_nids[++data->un_nid_count] = nid;
- break;
+ if (i == entry->un_nid_count) {
+ LASSERT(entry->un_nid_count < NIDS_MAX);
+ entry->un_nids[entry->un_nid_count++] = nid;
}
+ break;
}
}
if (!found)
}
return 0;
}
+EXPORT_SYMBOL(class_add_uuid);
/* Delete the nids for one uuid if specified, otherwise delete all */
int class_del_uuid(const char *uuid)
break;
}
}
+ break;
}
cfs_spin_unlock (&g_uuid_lock);
RETURN(found);