X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosp%2Fosp_object.c;h=90ec8a18535ff400abfafffe2e83b759c9e37b5d;hb=08aa217ce49aba1ded52e0f7adb8a607035123fd;hp=d2bcde545eb67132c2057be8c434537b555e5bf9;hpb=03b988a9a30ead5b360caef88ef130284869c27c;p=fs%2Flustre-release.git diff --git a/lustre/osp/osp_object.c b/lustre/osp/osp_object.c index d2bcde5..90ec8a1 100644 --- a/lustre/osp/osp_object.c +++ b/lustre/osp/osp_object.c @@ -27,7 +27,7 @@ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel, Inc. + * Copyright (c) 2012, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -220,7 +220,7 @@ static int osp_declare_object_create(const struct lu_env *env, th); } else { /* not needed in the cache anymore */ - cfs_set_bit(LU_OBJECT_HEARD_BANSHEE, + set_bit(LU_OBJECT_HEARD_BANSHEE, &dt->do_lu.lo_header->loh_flags); } RETURN(rc); @@ -247,9 +247,9 @@ static int osp_object_create(const struct lu_env *env, struct dt_object *dt, rc = fid_ostid_pack(lu_object_fid(&dt->do_lu), &osi->osi_oi); LASSERT(rc == 0); osi->osi_id = ostid_id(&osi->osi_oi); - cfs_spin_lock(&d->opd_pre_lock); + spin_lock(&d->opd_pre_lock); osp_update_last_id(d, osi->osi_id); - cfs_spin_unlock(&d->opd_pre_lock); + spin_unlock(&d->opd_pre_lock); } LASSERT(osi->osi_id); @@ -263,20 +263,20 @@ static int osp_object_create(const struct lu_env *env, struct dt_object *dt, /* we might have lost precreated objects */ if (unlikely(d->opd_gap_count) > 0) { - cfs_spin_lock(&d->opd_pre_lock); + spin_lock(&d->opd_pre_lock); if (d->opd_gap_count > 0) { int count = d->opd_gap_count; osi->osi_oi.oi_id = d->opd_gap_start; d->opd_gap_count = 0; - cfs_spin_unlock(&d->opd_pre_lock); + spin_unlock(&d->opd_pre_lock); CDEBUG(D_HA, "Found gap "LPU64"+%d in objids\n", d->opd_gap_start, count); /* real gap handling is disabled intil ORI-692 will be * fixed, now we only report gaps */ } else { - cfs_spin_unlock(&d->opd_pre_lock); + spin_unlock(&d->opd_pre_lock); } } @@ -288,6 +288,9 @@ static int osp_object_create(const struct lu_env *env, struct dt_object *dt, rc = dt_record_write(env, d->opd_last_used_file, &osi->osi_lb, &osi->osi_off, th); + CDEBUG(D_HA, "%s: Wrote last used ID: "LPU64": %d\n", + d->opd_obd->obd_name, le64_to_cpu(d->opd_last_used_id), rc); + RETURN(rc); } @@ -322,7 +325,7 @@ static int osp_object_destroy(const struct lu_env *env, struct dt_object *dt, rc = osp_sync_add(env, o, MDS_UNLINK64_REC, th, NULL); /* not needed in cache any more */ - cfs_set_bit(LU_OBJECT_HEARD_BANSHEE, &dt->do_lu.lo_header->loh_flags); + set_bit(LU_OBJECT_HEARD_BANSHEE, &dt->do_lu.lo_header->loh_flags); RETURN(rc); } @@ -369,12 +372,12 @@ static void osp_object_release(const struct lu_env *env, struct lu_object *o) */ if (unlikely(po->opo_reserved)) { LASSERT(d->opd_pre_reserved > 0); - cfs_spin_lock(&d->opd_pre_lock); + spin_lock(&d->opd_pre_lock); d->opd_pre_reserved--; - cfs_spin_unlock(&d->opd_pre_lock); + spin_unlock(&d->opd_pre_lock); /* not needed in cache any more */ - cfs_set_bit(LU_OBJECT_HEARD_BANSHEE, &o->lo_header->loh_flags); + set_bit(LU_OBJECT_HEARD_BANSHEE, &o->lo_header->loh_flags); } EXIT; }