Whamcloud - gitweb
LU-6210 osd: Change positional struct initializers to C99
[fs/lustre-release.git] / lustre / osd-zfs / osd_oi.c
index 6d3df99..5383858 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -27,7 +23,7 @@
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2015, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -83,19 +79,19 @@ struct named_oid {
 };
 
 static const struct named_oid oids[] = {
-       { LAST_RECV_OID,                LAST_RCVD },
-       { OFD_LAST_GROUP_OID,           "LAST_GROUP" },
-       { LLOG_CATALOGS_OID,            "CATALOGS" },
-       { MGS_CONFIGS_OID,              NULL /*MOUNT_CONFIGS_DIR*/ },
-       { FID_SEQ_SRV_OID,              "seq_srv" },
-       { FID_SEQ_CTL_OID,              "seq_ctl" },
-       { FLD_INDEX_OID,                "fld" },
-       { MDD_LOV_OBJ_OID,              LOV_OBJID },
-       { OFD_HEALTH_CHECK_OID,         HEALTH_CHECK },
-       { ACCT_USER_OID,                "acct_usr_inode" },
-       { ACCT_GROUP_OID,               "acct_grp_inode" },
-       { REPLY_DATA_OID,               REPLY_DATA },
-       { 0,                            NULL }
+       { .oid = LAST_RECV_OID,        .name = LAST_RCVD },
+       { .oid = OFD_LAST_GROUP_OID,   .name = "LAST_GROUP" },
+       { .oid = LLOG_CATALOGS_OID,    .name = "CATALOGS" },
+       { .oid = MGS_CONFIGS_OID,      /*MOUNT_CONFIGS_DIR*/ },
+       { .oid = FID_SEQ_SRV_OID,      .name = "seq_srv" },
+       { .oid = FID_SEQ_CTL_OID,      .name = "seq_ctl" },
+       { .oid = FLD_INDEX_OID,        .name = "fld" },
+       { .oid = MDD_LOV_OBJ_OID,      .name = LOV_OBJID },
+       { .oid = OFD_HEALTH_CHECK_OID, .name = HEALTH_CHECK },
+       { .oid = ACCT_USER_OID,        .name = "acct_usr_inode" },
+       { .oid = ACCT_GROUP_OID,       .name = "acct_grp_inode" },
+       { .oid = REPLY_DATA_OID,       .name = REPLY_DATA },
+       { .oid = 0 }
 };
 
 static char *oid2name(const unsigned long oid)
@@ -341,7 +337,7 @@ static struct osd_seq *osd_find_or_add_seq(const struct lu_env *env,
 
        oi.oi_zapid = osd->od_O_id;
        sprintf(seq_name, (fid_seq_is_rsvd(seq) ||
-               fid_seq_is_mdt0(seq)) ?  LPU64 : LPX64i,
+               fid_seq_is_mdt0(seq)) ?  "%llu" : "%llx",
                fid_seq_is_idif(seq) ? 0 : seq);
 
        rc = osd_oi_find_or_create(env, osd, oi.oi_zapid, seq_name, &odb);
@@ -408,7 +404,7 @@ osd_get_idx_for_ost_obj(const struct lu_env *env, struct osd_device *osd,
        LASSERT(osd_seq->os_compat_dirs[b]);
 
        if (buf)
-               snprintf(buf, bufsize, LPU64, id);
+               snprintf(buf, bufsize, "%llu", id);
 
        return osd_seq->os_compat_dirs[b];
 }