-/* -*- 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.
{
struct lu_fid *oi_fid = &info->oti_fid;
const struct dt_key *key;
- int rc = 0;
+ int rc = 0;
- if (osd_fid_is_igif(fid)) {
+ if (fid_is_idif(fid) || fid_seq(fid) == FID_SEQ_LLOG) {
+ /* old OSD obj id */
+ rc = osd_compat_objid_lookup(info, osd, fid, id);
+ } else if (fid_is_igif(fid)) {
lu_igif_to_id(fid, id);
rc = 0;
+ } else if (fid_is_fs_root(fid)) {
+ struct inode *inode = osd_sb(osd)->s_root->d_inode;
+
+ id->oii_ino = inode->i_ino;
+ id->oii_gen = inode->i_generation;
} else {
- if (!fid_is_norm(fid))
- return -ENOENT;
+ if (unlikely(fid_seq(fid) == FID_SEQ_LOCAL_FILE))
+ return osd_compat_spec_lookup(info, osd, fid, id);
fid_cpu_to_be(oi_fid, fid);
- key = (struct dt_key *) oi_fid;
+ key = (struct dt_key *)oi_fid;
rc = osd_oi_iam_lookup(info, osd_fid2oi(osd, fid),
(struct dt_rec *)id, key);
struct osd_inode_id *id;
const struct dt_key *key;
- if (!fid_is_norm(fid))
- return 0;
+ if (fid_is_igif(fid) || unlikely(fid_seq(fid) == FID_SEQ_DOT_LUSTRE))
+ return 0;
+
+ if (fid_is_idif(fid) || fid_seq(fid) == FID_SEQ_LLOG)
+ return osd_compat_objid_insert(info, osd, fid, id0, th);
+
+ /* Server mount should not depends on OI files */
+ if (unlikely(fid_seq(fid) == FID_SEQ_LOCAL_FILE))
+ return osd_compat_spec_insert(info, osd, fid, id0, th);
fid_cpu_to_be(oi_fid, fid);
key = (struct dt_key *)oi_fid;
struct lu_fid *oi_fid = &info->oti_fid;
const struct dt_key *key;
- if (!fid_is_norm(fid))
- return 0;
+ LASSERT(fid_seq(fid) != FID_SEQ_LOCAL_FILE);
+
+ if (fid_is_idif(fid) || fid_seq(fid) == FID_SEQ_LLOG)
+ return osd_compat_objid_delete(info, osd, fid, th);
fid_cpu_to_be(oi_fid, fid);
key = (struct dt_key *)oi_fid;