From: Fan Yong Date: Sat, 12 Jan 2013 23:02:35 +0000 (+0800) Subject: LU-2733 osd: not return "-ENOENT" for zfs osd_object_init X-Git-Tag: 2.3.61~52 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=8fa27491bbc4440f1a09dc3c42919140e3146cae;ds=sidebyside LU-2733 osd: not return "-ENOENT" for zfs osd_object_init For zfs backend, the osd_object_init() should not return "-ENOENT" if osd_fid_lookup() cannot find the object, which is normal for new created cases. Signed-off-by: Fan Yong Change-Id: I76e5d802d0caf8ac3a9992278ec2f7c6c6e2cf07 Reviewed-on: http://review.whamcloud.com/5242 Reviewed-by: Alex Zhuravlev Tested-by: Hudson Reviewed-by: Andreas Dilger Tested-by: Maloo --- diff --git a/lustre/osd-zfs/osd_object.c b/lustre/osd-zfs/osd_object.c index b4fd1d3..ac6b52d 100644 --- a/lustre/osd-zfs/osd_object.c +++ b/lustre/osd-zfs/osd_object.c @@ -382,6 +382,8 @@ static int osd_object_init(const struct lu_env *env, struct lu_object *l, CERROR("%s: lookup "DFID"/"LPX64" failed: rc = %d\n", osd->od_svname, PFID(lu_object_fid(l)), oid, rc); } + } else if (rc == -ENOENT) { + rc = 0; } LASSERT(osd_invariant(obj)); RETURN(rc);