Whamcloud - gitweb
LU-3345 llapi: add user space method for lov_user_md
[fs/lustre-release.git] / lustre / tests / ll_dirstripe_verify.c
index af7d20e..d5269b4 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- 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.
@@ -28,9 +26,8 @@
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
- */
-/*
- * Copyright (c) 2011 Whamcloud, Inc.
+ *
+ * Copyright (c) 2011, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -57,7 +54,7 @@
 #include <liblustre.h>
 #include <obd.h>
 #include <lustre_lib.h>
-#include <lustre/liblustreapi.h>
+#include <lustre/lustreapi.h>
 #include <obd_lov.h>
 
 #include <lnet/lnetctl.h>
@@ -248,14 +245,15 @@ int main(int argc, char **argv)
                 return rc;
         }
 
-        lum_size = lov_mds_md_size(MAX_LOV_UUID_COUNT, LOV_MAGIC);
-        if ((lum_dir = (struct lov_user_md *)malloc(lum_size)) == NULL) {
-                rc = -ENOMEM;
-                llapi_error(LLAPI_MSG_ERROR, rc,
-                            "error: can't allocate %d bytes "
-                            "for dir EA", lum_size);
-                goto cleanup;
-        }
+       lum_size = lov_user_md_size(MAX_LOV_UUID_COUNT, LOV_USER_MAGIC);
+       lum_dir = (struct lov_user_md *)malloc(lum_size);
+       if (lum_dir == NULL) {
+               rc = -ENOMEM;
+               llapi_error(LLAPI_MSG_ERROR, rc,
+                           "error: can't allocate %d bytes "
+                           "for dir EA", lum_size);
+               goto cleanup;
+       }
 
         rc = llapi_file_get_stripe(argv[1], lum_dir);
         if (rc) {