* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, 2014, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
/* Return true if backfs_ops has operations for the given mount_type. */
int backfs_mount_type_okay(enum ldd_mount_type mount_type)
{
- if (unlikely(mount_type >= LDD_MT_LAST || mount_type < 0)) {
+ if (mount_type >= LDD_MT_LAST || mount_type < 0) {
fatal();
fprintf(stderr, "fs type out of range %d\n", mount_type);
return 0;
struct stat sbuf;
char fullpath[PATH_MAX];
char *path = mop->mo_skpath;
- int type = 0;
int rc;
/* init logging */
return -errno;
}
- if (IS_SERVER(&mop->mo_ldd)) {
- if (IS_MGS(&mop->mo_ldd))
- type |= SK_TYPE_MGS;
- if (IS_MDT(&mop->mo_ldd) || IS_OST(&mop->mo_ldd))
- type |= SK_TYPE_SERVER;
- } else {
- type |= SK_TYPE_CLIENT;
- if (!S_ISREG(sbuf.st_mode)) {
- fprintf(stderr, "Invalid shared key path, must be a "
- "file for client mounts: %s\n", path);
- return -EINVAL;
- }
- }
-
/* Load individual keys or a directory of them */
if (S_ISREG(sbuf.st_mode)) {
- return sk_load_keyfile(path, type);
+ return sk_load_keyfile(path);
} else if (!S_ISDIR(sbuf.st_mode)) {
fprintf(stderr, "Invalid shared key path: %s\n", path);
return -ENOKEY;
if (!S_ISREG(sbuf.st_mode))
continue;
- rc = sk_load_keyfile(fullpath, type);
+ rc = sk_load_keyfile(fullpath);
if (rc) {
fprintf(stderr, "Failed to load key %s\n", fullpath);
}