* Copyright (c) 2007, 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/
continue;
}
- CERROR("%.16s: can't open %s: rc = %d\n",
- LDISKFS_SB(osd_sb(osd))->s_es->s_volume_name, name, rc);
+ CERROR("%s: can't open %s: rc = %d\n",
+ osd_dev2name(osd), name, rc);
if (oi_count > 0)
- CERROR("%.16s: expect to open total %d OI files.\n",
- LDISKFS_SB(osd_sb(osd))->s_es->s_volume_name,
- oi_count);
+ CERROR("%s: expect to open total %d OI files.\n",
+ osd_dev2name(osd), oi_count);
break;
}
OSD_OI_NAME_BASE, i);
rc = osd_remove_oi_one(osd_sb(osd)->s_root, name, namelen);
if (rc != 0) {
- CERROR("%.16s: fail to remove the stale OI file %s: "
- "rc = %d\n",
- LDISKFS_SB(osd_sb(osd))->s_es->s_volume_name,
- name, rc);
+ CERROR("%s: fail to remove the stale OI file %s: "
+ "rc = %d\n", osd_dev2name(osd), name, rc);
return rc;
}
}
namelen = snprintf(name, sizeof(name), "%s", OSD_OI_NAME_BASE);
rc = osd_remove_oi_one(osd_sb(osd)->s_root, name, namelen);
if (rc != 0)
- CERROR("%.16s: fail to remove the stale OI file %s: rc = %d\n",
- LDISKFS_SB(osd_sb(osd))->s_es->s_volume_name, name, rc);
+ CERROR("%s: fail to remove the stale OI file %s: rc = %d\n",
+ osd_dev2name(osd), name, rc);
return rc;
}
SF_UPGRADE);
GOTO(out, rc = 1);
} else if (rc != -ENOENT) {
- CERROR("%.16s: can't open %s: rc = %d\n",
- LDISKFS_SB(osd_sb(osd))->s_es->s_volume_name,
- OSD_OI_NAME_BASE, rc);
+ CERROR("%s: can't open %s: rc = %d\n",
+ osd_dev2name(osd), OSD_OI_NAME_BASE, rc);
GOTO(out, rc);
}
rc = osd_fld_lookup(info->oti_env, osd, fid_seq(fid), range);
if (rc != 0) {
+ /* During upgrade, OST FLDB might not be loaded because
+ * OST FLDB is not created until 2.6, so if some DNE
+ * filesystem upgrade from 2.5 to 2.7/2.8, they will
+ * not be able to find the sequence from local FLDB
+ * cache see fld_index_init(). */
+ if (rc == -ENOENT && osd->od_is_ost)
+ RETURN(1);
+
if (rc != -ENOENT)
CERROR("%s: lookup FLD "DFID": rc = %d\n",
osd_name(osd), PFID(fid), rc);
(const struct dt_key *)oi_fid, th, true);
if (rc != 0) {
struct inode *inode;
- struct lustre_mdt_attrs *lma = &info->oti_mdt_attrs;
+ struct lustre_mdt_attrs *lma = &info->oti_ost_attrs.loa_lma;
if (rc != -EEXIST)
return rc;
goto update;
}
- rc = osd_get_lma(info, inode, &info->oti_obj_dentry, lma);
+ rc = osd_get_lma(info, inode, &info->oti_obj_dentry,
+ &info->oti_ost_attrs);
iput(inode);
if (rc == -ENODATA)
goto update;
if (!(lma->lma_compat & LMAC_NOT_IN_OI) &&
lu_fid_eq(fid, &lma->lma_self_fid)) {
- CERROR("%.16s: the FID "DFID" is used by two objects: "
- "%u/%u %u/%u\n",
- LDISKFS_SB(osd_sb(osd))->s_es->s_volume_name,
+ CERROR("%s: the FID "DFID" is used by two objects: "
+ "%u/%u %u/%u\n", osd_dev2name(osd),
PFID(fid), oi_id->oii_ino, oi_id->oii_gen,
id->oii_ino, id->oii_gen);
return -EEXIST;