Whamcloud - gitweb
LU-3536 lod: Separate thandle to different layers.
[fs/lustre-release.git] / lustre / lod / lod_qos.c
index 6be2281..7ee3d33 100644 (file)
@@ -6,13 +6,13 @@
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 only,
  * as published by the Free Software Foundation.
-
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License version 2 for more details.  A copy is
  * included in the COPYING file that accompanied this code.
-
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -23,7 +23,7 @@
  * Copyright  2009 Sun Microsystems, Inc. All rights reserved
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -696,8 +696,8 @@ static struct dt_object *lod_qos_declare_object_on(const struct lu_env *env,
 
        dt = container_of(n, struct dt_object, do_lu);
 
-       rc = dt_declare_create(env, dt, NULL, NULL, NULL, th);
-       if (rc) {
+       rc = lod_sub_object_declare_create(env, dt, NULL, NULL, NULL, th);
+       if (rc < 0) {
                CDEBUG(D_OTHER, "can't declare creation on #%u: %d\n",
                       ost_idx, rc);
                lu_object_put(env, o);
@@ -1900,8 +1900,9 @@ int lod_qos_prep_create(const struct lu_env *env, struct lod_object *lo,
                        o = lo->ldo_stripe[i];
                        LASSERT(o);
 
-                       rc = dt_declare_create(env, o, attr, NULL, NULL, th);
-                       if (rc) {
+                       rc = lod_sub_object_declare_create(env, o, attr, NULL,
+                                                          NULL, th);
+                       if (rc < 0) {
                                CERROR("can't declare create: %d\n", rc);
                                break;
                        }