From e99f38594d2bf9ec379342e5fd42d52e018d5b47 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Wed, 13 Feb 2013 15:17:39 +0400 Subject: [PATCH] LU-2803 osd: osd-zfs to handle echo sequence (2) properly 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 Change-Id: I63e50789df502d11863c69658c9524fbb3cd9f22 Reviewed-on: http://review.whamcloud.com/5414 Tested-by: Hudson Tested-by: Maloo Reviewed-by: wangdi Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/osd-zfs/osd_internal.h | 1 - lustre/osd-zfs/osd_oi.c | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lustre/osd-zfs/osd_internal.h b/lustre/osd-zfs/osd_internal.h index ab89fa4..3801296 100644 --- a/lustre/osd-zfs/osd_internal.h +++ b/lustre/osd-zfs/osd_internal.h @@ -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_ost_compat_grp0; struct osd_seq_list od_seq_list; unsigned int od_rdonly:1, diff --git a/lustre/osd-zfs/osd_oi.c b/lustre/osd-zfs/osd_oi.c index 427bde0..01e6067 100644 --- a/lustre/osd-zfs/osd_oi.c +++ b/lustre/osd-zfs/osd_oi.c @@ -348,9 +348,6 @@ static struct osd_seq *osd_find_or_add_seq(const struct lu_env *env, 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); @@ -437,10 +434,8 @@ uint64_t osd_get_name_n_idx(const struct lu_env *env, struct osd_device *osd, 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); - } 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)); -- 1.8.3.1