Whamcloud - gitweb
LU-7525 mdd: mdd_migrate_create() should not set nlink 96/17496/5
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Mon, 7 Dec 2015 13:35:40 +0000 (16:35 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 12 Jan 2016 02:45:35 +0000 (02:45 +0000)
at object creation. the migration process itself takes
care of nlink incrementing it atomically with dt_insert().

Change-Id: Ia2c8f6cdd77e0808a8060d6e1c542c596612a3ce
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/17496
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdd/mdd_dir.c

index 864ff8a..4d7d117 100644 (file)
@@ -3547,6 +3547,9 @@ static int mdd_migrate_create(const struct lu_env *env,
        if (rc != 0)
                GOTO(stop_trans, rc);
 
+       /* don't set nlink from the original object */
+       la->la_valid &= ~LA_NLINK;
+
        /* create the target object */
        rc = mdd_object_create(env, mdd_pobj, mdd_tobj, la, spec, NULL, NULL,
                               hint, handle);