Whamcloud - gitweb
LU-2182 llapi: implementation of new llapi_layout API
[fs/lustre-release.git] / lustre / quota / lquota_disk.c
index eabbbc1..2280f06 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
  * - lquota_disk_update_ver:     update version of an index file
  */
 
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
 #define DEBUG_SUBSYSTEM S_LQUOTA
 
 #include "lquota_internal.h"
@@ -184,7 +180,7 @@ struct dt_object *lquota_disk_dir_find_create(const struct lu_env *env,
                        GOTO(out, rc);
 
                parent = dt_locate_at(env, dev, &qti->qti_fid,
-                                     dev->dd_lu_dev.ld_site->ls_top_dev);
+                                     dev->dd_lu_dev.ld_site->ls_top_dev, NULL);
                if (IS_ERR(parent))
                        GOTO(out, rc = PTR_ERR(parent));
        } else {
@@ -482,7 +478,7 @@ int lquota_disk_for_each_slv(const struct lu_env *env, struct dt_object *parent,
        int                              rc;
        ENTRY;
 
-       OBD_ALLOC(name, sizeof("0x00000000-"));
+       OBD_ALLOC(name, LQUOTA_NAME_MAX);
        if (name == NULL)
                RETURN(-ENOMEM);
 
@@ -493,7 +489,7 @@ int lquota_disk_for_each_slv(const struct lu_env *env, struct dt_object *parent,
        iops = &parent->do_index_ops->dio_it;
        it = iops->init(env, parent, 0, BYPASS_CAPA);
        if (IS_ERR(it)) {
-               OBD_FREE(name, sizeof("0x00000000-"));
+               OBD_FREE(name, LQUOTA_NAME_MAX);
                RETURN(PTR_ERR(it));
        }
 
@@ -556,7 +552,7 @@ next:
 
        iops->put(env, it);
        iops->fini(env, it);
-       OBD_FREE(name, sizeof("0x00000000-"));
+       OBD_FREE(name, LQUOTA_NAME_MAX);
        if (rc > 0)
                rc = 0;
        RETURN(rc);
@@ -682,7 +678,7 @@ int lquota_disk_write(const struct lu_env *env, struct thandle *th,
                        rc = dt_insert(env, obj, (struct dt_rec *)&qti->qti_rec,
                                       key, th, BYPASS_CAPA, 1);
                        LASSERTF(rc == 0, "failed to insert record in quota "
-                                "index "DFID,
+                                "index "DFID"\n",
                                 PFID(lu_object_fid(&obj->do_lu)));
                        GOTO(out, rc);
                }