Whamcloud - gitweb
LU-2548 quota: don't apply migration on global index copy
authorNiu Yawei <niu@whamcloud.com>
Mon, 4 Feb 2013 06:56:04 +0000 (01:56 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 20 Feb 2013 02:49:52 +0000 (21:49 -0500)
Quota migration shouldn't be applied on the global index copy of
quota slave on mdt.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9f36b79e867ede20562223765dfc56358a4f3831
Reviewed-on: http://review.whamcloud.com/5259
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_quota.c

index 1b3c323..825ce4d 100644 (file)
@@ -2953,7 +2953,8 @@ static int osd_index_try(const struct lu_env *env, struct dt_object *dt,
         }
         LINVRNT(osd_invariant(obj));
 
-       if (is_quota_glb_feat(feat))
+       if (result == 0 && is_quota_glb_feat(feat) &&
+           fid_seq(lu_object_fid(&dt->do_lu)) == FID_SEQ_QUOTA_GLB)
                result = osd_quota_migration(env, dt, feat);
 
         return result;
index 9e16533..bfab83a 100644 (file)
@@ -857,6 +857,8 @@ static int truncate_quota_index(const struct lu_env *env, struct dt_object *dt,
        int                      rc;
        ENTRY;
 
+       LASSERT(fid_seq(lu_object_fid(&dt->do_lu)) == FID_SEQ_QUOTA_GLB);
+
        OBD_ALLOC_PTR(attr);
        if (attr == NULL)
                RETURN(-ENOMEM);