-/* -*- 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2012, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
below = under->ld_ops->ldo_object_alloc(env, obj->lo_header, under);
if (below != NULL) {
lu_object_add(obj, below);
+ cl_object_page_init(lu2cl(obj), sizeof(struct lovsub_page));
result = 0;
} else
result = -ENOMEM;
if (lov) {
LASSERT(lov->lo_type == LLT_RAID0);
LASSERT(lov->u.raid0.lo_sub[los->lso_index] == los);
- cfs_spin_lock(&lov->u.raid0.lo_sub_lock);
- lov->u.raid0.lo_sub[los->lso_index] = NULL;
- cfs_spin_unlock(&lov->u.raid0.lo_sub_lock);
+ spin_lock(&lov->u.raid0.lo_sub_lock);
+ lov->u.raid0.lo_sub[los->lso_index] = NULL;
+ spin_unlock(&lov->u.raid0.lo_sub_lock);
}
lu_object_fini(obj);
{
struct lovsub_object *los = lu2lovsub(obj);
- return (*p)(env, cookie, "[%i]", los->lso_index);
+ return (*p)(env, cookie, "[%d]", los->lso_index);
}
static int lovsub_attr_set(const struct lu_env *env, struct cl_object *obj,
};
struct lu_object *lovsub_object_alloc(const struct lu_env *env,
- const struct lu_object_header *unused,
- struct lu_device *dev)
+ const struct lu_object_header *unused,
+ struct lu_device *dev)
{
- struct lovsub_object *los;
- struct lu_object *obj;
-
- ENTRY;
- OBD_SLAB_ALLOC_PTR_GFP(los, lovsub_object_kmem, CFS_ALLOC_IO);
- if (los != NULL) {
- struct cl_object_header *hdr;
-
- obj = lovsub2lu(los);
- hdr = &los->lso_header;
- cl_object_header_init(hdr);
- lu_object_init(obj, &hdr->coh_lu, dev);
- lu_object_add_top(&hdr->coh_lu, obj);
- los->lso_cl.co_ops = &lovsub_ops;
- obj->lo_ops = &lovsub_lu_obj_ops;
- } else
- obj = NULL;
- RETURN(obj);
+ struct lovsub_object *los;
+ struct lu_object *obj;
+
+ ENTRY;
+ OBD_SLAB_ALLOC_PTR_GFP(los, lovsub_object_kmem, GFP_NOFS);
+ if (los != NULL) {
+ struct cl_object_header *hdr;
+
+ obj = lovsub2lu(los);
+ hdr = &los->lso_header;
+ cl_object_header_init(hdr);
+ lu_object_init(obj, &hdr->coh_lu, dev);
+ lu_object_add_top(&hdr->coh_lu, obj);
+ los->lso_cl.co_ops = &lovsub_ops;
+ obj->lo_ops = &lovsub_lu_obj_ops;
+ } else
+ obj = NULL;
+ RETURN(obj);
}
/** @} lov */