OBD_ALLOC_LARGE(r0->lo_sub, r0->lo_nr * sizeof r0->lo_sub[0]);
if (r0->lo_sub != NULL) {
int psz = 0;
OBD_ALLOC_LARGE(r0->lo_sub, r0->lo_nr * sizeof r0->lo_sub[0]);
if (r0->lo_sub != NULL) {
int psz = 0;
(*p)(env, cookie, "stripes: %d, %s, lsm{%p 0x%08X %d %u %u}:\n",
r0->lo_nr, lov->lo_layout_invalid ? "invalid" : "valid", lsm,
(*p)(env, cookie, "stripes: %d, %s, lsm{%p 0x%08X %d %u %u}:\n",
r0->lo_nr, lov->lo_layout_invalid ? "invalid" : "valid", lsm,
lsm->lsm_stripe_count, lsm->lsm_layout_gen);
for (i = 0; i < r0->lo_nr; ++i) {
struct lu_object *sub;
lsm->lsm_stripe_count, lsm->lsm_layout_gen);
for (i = 0; i < r0->lo_nr; ++i) {
struct lu_object *sub;
(*p)(env, cookie,
"released: %s, lsm{%p 0x%08X %d %u %u}:\n",
lov->lo_layout_invalid ? "invalid" : "valid", lsm,
(*p)(env, cookie,
"released: %s, lsm{%p 0x%08X %d %u %u}:\n",
lov->lo_layout_invalid ? "invalid" : "valid", lsm,
* hit this assertion.
* Anyway, it's still okay to call attr_get w/o type guard as layout
* can't go if locks exist. */
* hit this assertion.
* Anyway, it's still okay to call attr_get w/o type guard as layout
* can't go if locks exist. */
CDEBUG(D_INODE, "file:"DFID" wait for active IO, now: %d.\n",
PFID(lu_object_fid(lov2lu(lov))),
CDEBUG(D_INODE, "file:"DFID" wait for active IO, now: %d.\n",
PFID(lu_object_fid(lov2lu(lov))),
lov->lo_type = LLT_EMPTY;
result = new_ops->llo_init(env,
lov->lo_type = LLT_EMPTY;
result = new_ops->llo_init(env,
init_waitqueue_head(&lov->lo_waitq);
cl_object_page_init(lu2cl(obj), sizeof(struct lov_page));
init_waitqueue_head(&lov->lo_waitq);
cl_object_page_init(lu2cl(obj), sizeof(struct lov_page));
lov->lo_layout_invalid = true;
GOTO(out, result = -EBUSY);
}
lov->lo_layout_invalid = true;
GOTO(out, result = -EBUSY);
}
- ENTRY;
- OBD_SLAB_ALLOC_PTR_GFP(lov, lov_object_kmem, __GFP_IO);
- if (lov != NULL) {
- obj = lov2lu(lov);
- lu_object_init(obj, NULL, dev);
- lov->lo_cl.co_ops = &lov_ops;
- lov->lo_type = -1; /* invalid, to catch uninitialized type */
- /*
- * object io operation vector (cl_object::co_iop) is installed
- * later in lov_object_init(), as different vectors are used
- * for object with different layouts.
- */
- obj->lo_ops = &lov_lu_obj_ops;
- } else
- obj = NULL;
- RETURN(obj);
+ ENTRY;
+ OBD_SLAB_ALLOC_PTR_GFP(lov, lov_object_kmem, GFP_NOFS);
+ if (lov != NULL) {
+ obj = lov2lu(lov);
+ lu_object_init(obj, NULL, dev);
+ lov->lo_cl.co_ops = &lov_ops;
+ lov->lo_type = -1; /* invalid, to catch uninitialized type */
+ /*
+ * object io operation vector (cl_object::co_iop) is installed
+ * later in lov_object_init(), as different vectors are used
+ * for object with different layouts.
+ */
+ obj->lo_ops = &lov_lu_obj_ops;
+ } else
+ obj = NULL;
+ RETURN(obj);
if (lov->lo_lsm != NULL) {
lsm = lsm_addref(lov->lo_lsm);
CDEBUG(D_INODE, "lsm %p addref %d/%d by %p.\n",
if (lov->lo_lsm != NULL) {
lsm = lsm_addref(lov->lo_lsm);
CDEBUG(D_INODE, "lsm %p addref %d/%d by %p.\n",
-void lov_lsm_decref(struct lov_object *lov, struct lov_stripe_md *lsm)
-{
- if (lsm == NULL)
- return;
-
- CDEBUG(D_INODE, "lsm %p decref %d by %p.\n",
- lsm, cfs_atomic_read(&lsm->lsm_refc), current);
-
- lov_free_memmd(&lsm);
-}
-