X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fldlm%2Fldlm_extent.c;h=8232d6f1bf6b698e608729deb06b5f0ff6ae69d0;hb=999a8f1f0f9ab1a47843b4fa24ff88e5afd894b2;hp=780296d4e075810c93b94e7da01baf52b132714a;hpb=6e3ec5812ebd1b5ecf7cae584f429b013ffe7431;p=fs%2Flustre-release.git diff --git a/lustre/ldlm/ldlm_extent.c b/lustre/ldlm/ldlm_extent.c index 780296d..8232d6f 100644 --- a/lustre/ldlm/ldlm_extent.c +++ b/lustre/ldlm/ldlm_extent.c @@ -26,7 +26,7 @@ * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ /* @@ -289,10 +289,10 @@ static int ldlm_check_contention(struct ldlm_lock *lock, int contended_locks) return 1; CDEBUG(D_DLMTRACE, "contended locks = %d\n", contended_locks); - if (contended_locks > res->lr_namespace->ns_contended_locks) + if (contended_locks > ldlm_res_to_ns(res)->ns_contended_locks) res->lr_contention_time = now; return cfs_time_before(now, cfs_time_add(res->lr_contention_time, - cfs_time_seconds(res->lr_namespace->ns_contention_time))); + cfs_time_seconds(ldlm_res_to_ns(res)->ns_contention_time))); } struct ldlm_extent_compat_args { @@ -600,7 +600,7 @@ ldlm_extent_compat_queue(cfs_list_t *queue, struct ldlm_lock *req, (*flags & LDLM_FL_DENY_ON_CONTENTION) && req->l_req_mode != LCK_GROUP && req_end - req_start <= - req->l_resource->lr_namespace->ns_max_nolock_size) + ldlm_res_to_ns(req->l_resource)->ns_max_nolock_size) GOTO(destroylock, compat = -EUSERS); RETURN(compat); @@ -711,7 +711,7 @@ int ldlm_process_extent_lock(struct ldlm_lock *lock, int *flags, int first_enq, rc = ldlm_run_ast_work(&rpc_list, LDLM_WORK_BL_AST); if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_OST_FAIL_RACE) && - !ns_is_client(res->lr_namespace)) + !ns_is_client(ldlm_res_to_ns(res))) class_fail_export(lock->l_export); lock_res(res); @@ -760,7 +760,7 @@ out: /* When a lock is cancelled by a client, the KMS may undergo change if this * is the "highest lock". This function returns the new KMS value. - * Caller must hold ns_lock already. + * Caller must hold lr_lock already. * * NB: A lock on [x,y] protects a KMS of up to y + 1 bytes! */ __u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms)