-/* -*- 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.
* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
LASSERT(dev != NULL);
lmv = &dev->u.lmv;
*eof = 1;
- return snprintf(page, count, "%s\n",
+ return snprintf(page, count, "%s\n",
placement_policy2name(lmv->lmv_placement));
}
placement_policy_t policy;
struct lmv_obd *lmv;
- if (copy_from_user(dummy, buffer, MAX_POLICY_STRING_SIZE))
+ if (cfs_copy_from_user(dummy, buffer, MAX_POLICY_STRING_SIZE))
return -EFAULT;
LASSERT(dev != NULL);
policy = placement_name2policy(dummy, len);
if (policy != PLACEMENT_INVAL_POLICY) {
- spin_lock(&lmv->lmv_lock);
- lmv->lmv_placement = policy;
- spin_unlock(&lmv->lmv_lock);
+ spin_lock(&lmv->lmv_lock);
+ lmv->lmv_placement = policy;
+ spin_unlock(&lmv->lmv_lock);
} else {
CERROR("Invalid placement policy \"%s\"!\n", dummy);
return -EINVAL;
struct obd_device *dev = p->private;
struct lmv_obd *lmv = &dev->u.lmv;
int idx = tgt - &(lmv->tgts[0]);
-
+
return seq_printf(p, "%d: %s %sACTIVE\n", idx, tgt->ltd_uuid.uuid,
tgt->ltd_active ? "" : "IN");
}
struct proc_dir_entry *dp = PDE(inode);
struct seq_file *seq;
int rc;
-
+
rc = seq_open(file, &lmv_tgt_sops);
if (rc)
return rc;