Whamcloud - gitweb
LU-2803 osd: osd-zfs to handle echo sequence (2) properly
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Wed, 13 Feb 2013 11:17:39 +0000 (15:17 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 18 Mar 2013 22:31:15 +0000 (18:31 -0400)
use visible OI (/O directory) to map object from this sequence
into dnodes. this let obdecho to work with zfs.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I63e50789df502d11863c69658c9524fbb3cd9f22
Reviewed-on: http://review.whamcloud.com/5414
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_oi.c

index ab89fa4..3801296 100644 (file)
@@ -236,7 +236,6 @@ struct osd_device {
        uint64_t                 od_root;
        struct osd_oi           **od_oi_table;
        unsigned int             od_oi_count;
        uint64_t                 od_root;
        struct osd_oi           **od_oi_table;
        unsigned int             od_oi_count;
-       uint64_t                od_ost_compat_grp0;
        struct osd_seq_list     od_seq_list;
 
        unsigned int             od_rdonly:1,
        struct osd_seq_list     od_seq_list;
 
        unsigned int             od_rdonly:1,
index 427bde0..01e6067 100644 (file)
@@ -348,9 +348,6 @@ static struct osd_seq *osd_find_or_add_seq(const struct lu_env *env,
                GOTO(out, rc);
        }
 
                GOTO(out, rc);
        }
 
-       if (seq == 0)
-               osd->od_ost_compat_grp0 = odb;
-
        for (i = 0; i < OSD_OST_MAP_SIZE; i++) {
                sprintf(key, "d%d", i);
                rc = osd_oi_find_or_create(env, osd, odb, key, &sdb);
        for (i = 0; i < OSD_OST_MAP_SIZE; i++) {
                sprintf(key, "d%d", i);
                rc = osd_oi_find_or_create(env, osd, odb, key, &sdb);
@@ -437,10 +434,8 @@ uint64_t osd_get_name_n_idx(const struct lu_env *env, struct osd_device *osd,
        LASSERT(fid);
        LASSERT(buf);
 
        LASSERT(fid);
        LASSERT(buf);
 
-       if (fid_is_on_ost(env, osd, fid) == 1) {
+       if (fid_is_on_ost(env, osd, fid) == 1 || fid_seq(fid) == FID_SEQ_ECHO) {
                zapid = osd_get_idx_for_ost_obj(env, osd, fid, buf);
                zapid = osd_get_idx_for_ost_obj(env, osd, fid, buf);
-       } else if (fid_is_last_id(fid)) {
-               zapid = osd->od_ost_compat_grp0;
        } else if (unlikely(fid_seq(fid) == FID_SEQ_LOCAL_FILE)) {
                /* special objects with fixed known fids get their name */
                char *name = oid2name(fid_oid(fid));
        } else if (unlikely(fid_seq(fid) == FID_SEQ_LOCAL_FILE)) {
                /* special objects with fixed known fids get their name */
                char *name = oid2name(fid_oid(fid));