From: Alex Zhuravlev Date: Wed, 23 Mar 2016 12:37:57 +0000 (+0300) Subject: LU-7904 osd: honor LOC_F_NEW X-Git-Tag: 2.8.53~10 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3cbdb896b6b380ff7c843f9a7104456e7e80b347;ds=sidebyside LU-7904 osd: honor LOC_F_NEW the caller passes this flag to ensure OSD that the object being initialized is new so OSD can skip save on lookup in OI. Change-Id: Iaebc23071420f812571c7652a9f29a7e9fc7b67e Signed-off-by: Alex Zhuravlev Reviewed-on: http://review.whamcloud.com/19089 Tested-by: Jenkins Reviewed-by: Fan Yong Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin --- diff --git a/lustre/osd-zfs/osd_object.c b/lustre/osd-zfs/osd_object.c index f00d454..fa9ec894 100644 --- a/lustre/osd-zfs/osd_object.c +++ b/lustre/osd-zfs/osd_object.c @@ -417,6 +417,9 @@ static int osd_object_init(const struct lu_env *env, struct lu_object *l, RETURN(0); } + if (conf != NULL && conf->loc_flags & LOC_F_NEW) + GOTO(out, rc = 0); + rc = osd_fid_lookup(env, osd, lu_object_fid(l), &oid); if (rc == 0) { LASSERT(obj->oo_db == NULL);