1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2002 Cluster File Systems, Inc.
6 * This code is issued under the GNU General Public License.
7 * See the file COPYING in this distribution
9 * by Cluster File Systems, Inc.
10 * authors, Peter Braam <braam@clusterfs.com> &
11 * Phil Schwan <phil@clusterfs.com>
14 #define DEBUG_SUBSYSTEM S_LDLM
16 #include <linux/slab.h>
17 #include <linux/module.h>
18 #include <linux/random.h>
19 #include <linux/lustre_dlm.h>
20 #include <linux/lustre_mds.h>
22 extern kmem_cache_t *ldlm_lock_slab;
23 int (*mds_reint_p)(int offset, struct ptlrpc_request *req) = NULL;
24 int (*mds_getattr_name_p)(int offset, struct ptlrpc_request *req) = NULL;
26 static int ldlm_plain_compat(struct ldlm_lock *a, struct ldlm_lock *b);
27 static int ldlm_intent_policy(struct ldlm_lock *lock, void *req_cookie,
28 ldlm_mode_t mode, void *data);
30 ldlm_res_compat ldlm_res_compat_table [] = {
31 [LDLM_PLAIN] ldlm_plain_compat,
32 [LDLM_EXTENT] ldlm_extent_compat,
33 [LDLM_MDSINTENT] ldlm_plain_compat
36 ldlm_res_policy ldlm_res_policy_table [] = {
38 [LDLM_EXTENT] ldlm_extent_policy,
39 [LDLM_MDSINTENT] ldlm_intent_policy
42 void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh)
44 lockh->addr = (__u64)(unsigned long)lock;
45 lockh->cookie = lock->l_random;
48 struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *handle)
50 struct ldlm_lock *lock = NULL;
55 lock = (struct ldlm_lock *)(unsigned long)(handle->addr);
57 if (!kmem_cache_validate(ldlm_lock_slab, (void *)lock))
60 l_lock(&lock->l_resource->lr_namespace->ns_lock);
61 if (lock->l_random != handle->cookie)
62 GOTO(out, handle = NULL);
64 if (lock->l_flags & LDLM_FL_DESTROYED)
65 GOTO(out, handle = NULL);
70 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
74 struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock)
76 l_lock(&lock->l_resource->lr_namespace->ns_lock);
78 ldlm_resource_getref(lock->l_resource);
79 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
83 void ldlm_lock_put(struct ldlm_lock *lock)
85 struct lustre_lock *nslock = &lock->l_resource->lr_namespace->ns_lock;
93 ldlm_resource_put(lock->l_resource);
95 ldlm_lock_put(lock->l_parent);
97 if (lock->l_refc == 0 && (lock->l_flags & LDLM_FL_DESTROYED)) {
98 if (lock->l_connection)
99 ptlrpc_put_connection(lock->l_connection);
100 kmem_cache_free(ldlm_lock_slab, lock);
107 void ldlm_lock_destroy(struct ldlm_lock *lock)
110 l_lock(&lock->l_resource->lr_namespace->ns_lock);
112 if (!list_empty(&lock->l_children)) {
113 CERROR("lock %p still has children (%p)!\n", lock,
114 lock->l_children.next);
115 ldlm_lock_dump(lock);
118 if (lock->l_readers || lock->l_writers) {
119 CDEBUG(D_INFO, "lock still has references (%d readers, %d "
120 "writers)\n", lock->l_readers, lock->l_writers);
124 if (!list_empty(&lock->l_res_link))
127 lock->l_flags = LDLM_FL_DESTROYED;
128 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
134 usage: pass in a resource on which you have done get
135 pass in a parent lock on which you have done a get
136 do not put the resource or the parent
137 returns: lock with refcount 1
139 static struct ldlm_lock *ldlm_lock_new(struct ldlm_lock *parent,
140 struct ldlm_resource *resource)
142 struct ldlm_lock *lock;
145 if (resource == NULL)
148 lock = kmem_cache_alloc(ldlm_lock_slab, SLAB_KERNEL);
152 memset(lock, 0, sizeof(*lock));
153 get_random_bytes(&lock->l_cookie, sizeof(__u64));
155 lock->l_resource = resource;
157 INIT_LIST_HEAD(&lock->l_children);
158 INIT_LIST_HEAD(&lock->l_res_link);
159 init_waitqueue_head(&lock->l_waitq);
161 if (parent != NULL) {
162 l_lock(&parent->l_resource->lr_namespace->ns_lock);
163 lock->l_parent = parent;
164 list_add(&lock->l_childof, &parent->l_children);
165 l_unlock(&parent->l_resource->lr_namespace->ns_lock);
170 int ldlm_lock_change_resource(struct ldlm_lock *lock, __u64 new_resid[3])
172 struct ldlm_namespace *ns = lock->l_resource->lr_namespace;
176 l_lock(&ns->ns_lock);
177 type = lock->l_resource->lr_type;
179 lock->l_resource = ldlm_resource_get(ns, NULL, new_resid, type, 1);
180 if (lock->l_resource == NULL) {
185 /* move references over */
186 for (i = 0; i < lock->l_refc; i++) {
188 ldlm_resource_getref(lock->l_resource);
189 rc = ldlm_resource_put(lock->l_resource);
190 if (rc == 1 && i != lock->l_refc - 1)
194 l_unlock(&ns->ns_lock);
198 static int ldlm_intent_policy(struct ldlm_lock *lock, void *req_cookie,
199 ldlm_mode_t mode, void *data)
201 struct ptlrpc_request *req = req_cookie;
208 if (req->rq_reqmsg->bufcount > 1) {
209 /* an intent needs to be considered */
210 struct ldlm_intent *it = lustre_msg_buf(req->rq_reqmsg, 1);
211 struct mds_body *mds_rep;
212 struct ldlm_reply *rep;
213 __u64 new_resid[3] = {0, 0, 0}, old_res;
214 int bufcount = -1, rc, size[3] = {sizeof(struct ldlm_reply),
215 sizeof(struct mds_body),
216 sizeof(struct obdo)};
218 it->opc = NTOH__u64(it->opc);
220 LDLM_DEBUG(lock, "intent policy, opc: %Ld", it->opc);
225 /* Note that in the negative case you may be returning
226 * a file and its obdo */
228 case IT_CREAT|IT_OPEN:
239 size[1] = sizeof(struct obdo);
248 rc = lustre_pack_msg(bufcount, size, NULL, &req->rq_replen,
251 rc = req->rq_status = -ENOMEM;
255 rep = lustre_msg_buf(req->rq_repmsg, 0);
256 rep->lock_policy_res1 = 1;
261 case IT_CREAT|IT_OPEN:
270 if (mds_reint_p == NULL)
272 inter_module_get_request
273 ("mds_reint", "mds");
274 if (IS_ERR(mds_reint_p)) {
275 CERROR("MDSINTENT locks require the MDS "
280 rc = mds_reint_p(2, req);
288 if (mds_getattr_name_p == NULL)
290 inter_module_get_request
291 ("mds_getattr_name", "mds");
292 if (IS_ERR(mds_getattr_name_p)) {
293 CERROR("MDSINTENT locks require the MDS "
298 rc = mds_getattr_name_p(2, req);
304 case IT_READDIR|IT_OPEN:
308 CERROR("Unhandled intent\n");
312 if (it->opc == IT_UNLINK || it->opc == IT_RMDIR)
313 RETURN(ELDLM_LOCK_ABORTED);
315 mds_rep = lustre_msg_buf(req->rq_repmsg, 1);
316 rep->lock_policy_res2 = req->rq_status;
317 new_resid[0] = mds_rep->ino;
318 old_res = lock->l_resource->lr_name[0];
320 CDEBUG(D_INFO, "remote intent: locking %d instead of"
321 "%ld\n", mds_rep->ino, (long)old_res);
323 ldlm_lock_change_resource(lock, new_resid);
324 if (lock->l_resource == NULL) {
328 LDLM_DEBUG(lock, "intent policy, old res %ld",
330 RETURN(ELDLM_LOCK_CHANGED);
332 int size = sizeof(struct ldlm_reply);
333 rc = lustre_pack_msg(1, &size, NULL, &req->rq_replen,
336 CERROR("out of memory\n");
344 static int ldlm_plain_compat(struct ldlm_lock *a, struct ldlm_lock *b)
346 return lockmode_compat(a->l_req_mode, b->l_req_mode);
349 void ldlm_lock2desc(struct ldlm_lock *lock, struct ldlm_lock_desc *desc)
351 ldlm_res2desc(lock->l_resource, &desc->l_resource);
352 desc->l_req_mode = lock->l_req_mode;
353 desc->l_granted_mode = lock->l_granted_mode;
354 memcpy(&desc->l_extent, &lock->l_extent, sizeof(desc->l_extent));
355 memcpy(desc->l_version, lock->l_version, sizeof(desc->l_version));
358 static int ldlm_send_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock *new)
360 struct lustre_handle lockh;
361 struct ldlm_lock_desc desc;
362 struct ptlrpc_request *req = NULL;
366 l_lock(&lock->l_resource->lr_namespace->ns_lock);
367 if (lock->l_flags & LDLM_FL_AST_SENT) {
368 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
372 lock->l_flags |= LDLM_FL_AST_SENT;
373 /* FIXME: this should merely add the lock to the lr_tmp list */
374 ldlm_lock2handle(lock, &lockh);
375 ldlm_lock2desc(new, &desc);
376 lock->l_blocking_ast(&lockh, &desc, lock->l_data, lock->l_data_len,
378 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
381 struct list_head *list = lock->l_resource->lr_tmp;
382 list_add(&req->rq_multi, list);
387 /* Args: unlocked lock */
388 void ldlm_lock_addref(struct ldlm_lock *lock, __u32 mode)
390 l_lock(&lock->l_resource->lr_namespace->ns_lock);
391 if (mode == LCK_NL || mode == LCK_CR || mode == LCK_PR)
395 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
399 /* Args: unlocked lock */
400 void ldlm_lock_decref(struct ldlm_lock *lock, __u32 mode)
407 l_lock(&lock->l_resource->lr_namespace->ns_lock);
408 if (mode == LCK_NL || mode == LCK_CR || mode == LCK_PR)
413 /* If we received a blocked AST and this was the last reference,
414 * run the callback. */
415 if (!lock->l_readers && !lock->l_writers &&
416 (lock->l_flags & LDLM_FL_CBPENDING)) {
417 struct lustre_handle lockh;
419 if (!lock->l_resource->lr_namespace->ns_client) {
420 CERROR("LDLM_FL_CBPENDING set on non-local lock!\n");
424 CDEBUG(D_INFO, "final decref done on cbpending lock, "
425 "calling callback.\n");
426 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
428 ldlm_lock2handle(lock, &lockh);
429 lock->l_blocking_ast(&lockh, NULL, lock->l_data,
430 lock->l_data_len, NULL);
432 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
439 static int ldlm_lock_compat_list(struct ldlm_lock *lock, int send_cbs,
440 struct list_head *queue)
442 struct list_head *tmp, *pos;
445 list_for_each_safe(tmp, pos, queue) {
446 struct ldlm_lock *child;
447 ldlm_res_compat compat;
449 child = list_entry(tmp, struct ldlm_lock, l_res_link);
453 compat = ldlm_res_compat_table[child->l_resource->lr_type];
454 if (compat && compat(child, lock)) {
455 CDEBUG(D_OTHER, "compat function succeded, next.\n");
458 if (lockmode_compat(child->l_granted_mode, lock->l_req_mode)) {
459 CDEBUG(D_OTHER, "lock modes are compatible, next.\n");
465 CDEBUG(D_OTHER, "compat function failed and lock modes "
467 if (send_cbs && child->l_blocking_ast != NULL) {
468 CDEBUG(D_OTHER, "incompatible; sending blocking "
470 /* It's very difficult to actually send the AST from
471 * here, because we'd have to drop the lock before going
472 * to sleep to wait for the reply. Instead we build the
473 * packet and send it later. */
474 ldlm_send_blocking_ast(child, lock);
481 static int ldlm_lock_compat(struct ldlm_lock *lock, int send_cbs)
486 l_lock(&lock->l_resource->lr_namespace->ns_lock);
487 rc = ldlm_lock_compat_list(lock, send_cbs, &lock->l_resource->lr_granted);
488 /* FIXME: should we be sending ASTs to converting? */
490 rc = ldlm_lock_compat_list
491 (lock, send_cbs, &lock->l_resource->lr_converting);
493 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
498 - ldlm_handle_enqueuque - resource
500 void ldlm_grant_lock(struct ldlm_lock *lock)
502 struct ldlm_resource *res = lock->l_resource;
503 struct ptlrpc_request *req = NULL;
506 l_lock(&lock->l_resource->lr_namespace->ns_lock);
507 ldlm_resource_add_lock(res, &res->lr_granted, lock);
508 lock->l_granted_mode = lock->l_req_mode;
510 if (lock->l_granted_mode < res->lr_most_restr)
511 res->lr_most_restr = lock->l_granted_mode;
513 if (lock->l_completion_ast) {
514 struct lustre_handle lockh;
516 /* FIXME: this should merely add lock to lr_tmp list */
517 ldlm_lock2handle(lock, &lockh);
518 lock->l_completion_ast(&lockh, NULL, lock->l_data,
519 lock->l_data_len, &req);
521 struct list_head *list = res->lr_tmp;
526 list_add(&req->rq_multi, list);
529 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
533 static struct ldlm_lock *search_queue(struct list_head *queue, ldlm_mode_t mode,
534 struct ldlm_extent *extent)
536 struct ldlm_lock *lock;
537 struct list_head *tmp;
539 list_for_each(tmp, queue) {
540 lock = list_entry(tmp, struct ldlm_lock, l_res_link);
542 if (lock->l_flags & LDLM_FL_CBPENDING)
545 /* lock_convert() takes the resource lock, so we're sure that
546 * req_mode, lr_type, and l_cookie won't change beneath us */
547 if (lock->l_req_mode != mode)
550 if (lock->l_resource->lr_type == LDLM_EXTENT &&
551 (lock->l_extent.start > extent->start ||
552 lock->l_extent.end < extent->end))
555 ldlm_lock_addref(lock, mode);
562 /* Must be called with no resource or lock locks held.
564 * Returns 1 if it finds an already-existing lock that is compatible; in this
565 * case, lockh is filled in with a addref()ed lock */
566 int ldlm_lock_match(struct ldlm_namespace *ns, __u64 *res_id, __u32 type,
567 void *cookie, int cookielen, ldlm_mode_t mode,
568 struct lustre_handle *lockh)
570 struct ldlm_resource *res;
571 struct ldlm_lock *lock;
575 res = ldlm_resource_get(ns, NULL, res_id, type, 0);
579 ns = res->lr_namespace;
580 l_lock(&ns->ns_lock);
582 if ((lock = search_queue(&res->lr_granted, mode, cookie)))
584 if ((lock = search_queue(&res->lr_converting, mode, cookie)))
586 if ((lock = search_queue(&res->lr_waiting, mode, cookie)))
591 ldlm_resource_put(res);
592 l_unlock(&ns->ns_lock);
595 wait_event_interruptible(lock->l_waitq, lock->l_req_mode ==
596 lock->l_granted_mode);
601 /* Must be called without the resource lock held. Returns a referenced,
602 * unlocked ldlm_lock. */
603 struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns,
604 struct lustre_handle *parent_lock_handle,
605 __u64 *res_id, __u32 type,
610 struct ldlm_resource *res, *parent_res = NULL;
611 struct ldlm_lock *lock, *parent_lock;
613 parent_lock = lustre_handle2object(parent_lock_handle);
615 parent_res = parent_lock->l_resource;
617 res = ldlm_resource_get(ns, parent_res, res_id, type, 1);
621 lock = ldlm_lock_new(parent_lock, res);
623 ldlm_resource_put(res);
627 lock->l_req_mode = mode;
629 lock->l_data_len = data_len;
630 ldlm_lock_addref(lock, mode);
635 /* Must be called with lock->l_lock and lock->l_resource->lr_lock not held */
636 ldlm_error_t ldlm_lock_enqueue(struct ldlm_lock *lock,
637 void *cookie, int cookie_len,
639 ldlm_lock_callback completion,
640 ldlm_lock_callback blocking)
642 struct ldlm_resource *res;
644 ldlm_res_policy policy;
647 res = lock->l_resource;
648 local = res->lr_namespace->ns_client;
650 lock->l_blocking_ast = blocking;
652 if (res->lr_type == LDLM_EXTENT)
653 memcpy(&lock->l_extent, cookie, sizeof(lock->l_extent));
655 /* policies are not executed on the client */
656 if (!local && (policy = ldlm_res_policy_table[res->lr_type])) {
659 /* We do this dancing with refcounts and locks because the
660 * policy function could send an RPC */
661 ldlm_resource_getref(res);
663 rc = policy(lock, cookie, lock->l_req_mode, NULL);
665 if (ldlm_resource_put(res) && rc != ELDLM_LOCK_CHANGED)
666 /* ldlm_resource_put() should not destroy 'res' unless
667 * 'res' is no longer the resource for this lock. */
670 if (rc == ELDLM_LOCK_CHANGED) {
671 res = lock->l_resource;
672 *flags |= LDLM_FL_LOCK_CHANGED;
673 } else if (rc == ELDLM_LOCK_ABORTED) {
674 ldlm_lock_destroy(lock);
679 lock->l_cookie = cookie;
680 lock->l_cookie_len = cookie_len;
682 if (local && lock->l_req_mode == lock->l_granted_mode) {
683 /* The server returned a blocked lock, but it was granted before
684 * we got a chance to actually enqueue it. We don't need to do
689 /* If this is a local resource, put it on the appropriate list. */
690 list_del_init(&lock->l_res_link);
692 if (*flags & LDLM_FL_BLOCK_CONV)
693 ldlm_resource_add_lock(res, res->lr_converting.prev,
695 else if (*flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED))
696 ldlm_resource_add_lock(res, res->lr_waiting.prev, lock);
698 ldlm_grant_lock(lock);
702 /* FIXME: We may want to optimize by checking lr_most_restr */
703 if (!list_empty(&res->lr_converting)) {
704 ldlm_resource_add_lock(res, res->lr_waiting.prev, lock);
705 *flags |= LDLM_FL_BLOCK_CONV;
708 if (!list_empty(&res->lr_waiting)) {
709 ldlm_resource_add_lock(res, res->lr_waiting.prev, lock);
710 *flags |= LDLM_FL_BLOCK_WAIT;
713 if (!ldlm_lock_compat(lock,0)) {
714 ldlm_resource_add_lock(res, res->lr_waiting.prev, lock);
715 *flags |= LDLM_FL_BLOCK_GRANTED;
719 ldlm_grant_lock(lock);
722 /* Don't set 'completion_ast' until here so that if the lock is granted
723 * immediately we don't do an unnecessary completion call. */
724 lock->l_completion_ast = completion;
728 /* Must be called with namespace taken: queue is waiting or converting. */
729 static int ldlm_reprocess_queue(struct ldlm_resource *res,
730 struct list_head *queue)
732 struct list_head *tmp, *pos;
735 list_for_each_safe(tmp, pos, queue) {
736 struct ldlm_lock *pending;
737 pending = list_entry(tmp, struct ldlm_lock, l_res_link);
739 CDEBUG(D_INFO, "Reprocessing lock %p\n", pending);
741 if (!ldlm_lock_compat(pending, 1))
744 list_del_init(&pending->l_res_link);
745 ldlm_grant_lock(pending);
747 ldlm_lock_addref(pending, pending->l_req_mode);
748 ldlm_lock_decref(pending, pending->l_granted_mode);
754 static void ldlm_send_delayed_asts(struct list_head *rpc_list)
756 struct list_head *tmp, *pos;
759 list_for_each_safe(tmp, pos, rpc_list) {
761 struct ptlrpc_request *req =
762 list_entry(tmp, struct ptlrpc_request, rq_multi);
764 CDEBUG(D_INFO, "Sending callback.\n");
766 rc = ptlrpc_queue_wait(req);
767 rc = ptlrpc_check_status(req, rc);
768 ptlrpc_free_req(req);
770 CERROR("Callback send failed: %d\n", rc);
775 /* Must be called with resource->lr_lock not taken. */
776 void ldlm_reprocess_all(struct ldlm_resource *res)
778 struct list_head rpc_list = LIST_HEAD_INIT(rpc_list);
781 /* Local lock trees don't get reprocessed. */
782 if (res->lr_namespace->ns_client) {
787 l_lock(&res->lr_namespace->ns_lock);
788 res->lr_tmp = &rpc_list;
790 ldlm_reprocess_queue(res, &res->lr_converting);
791 if (list_empty(&res->lr_converting))
792 ldlm_reprocess_queue(res, &res->lr_waiting);
795 l_unlock(&res->lr_namespace->ns_lock);
797 ldlm_send_delayed_asts(&rpc_list);
801 /* Must be called with lock and lock->l_resource unlocked */
802 void ldlm_lock_cancel(struct ldlm_lock *lock)
804 struct ldlm_resource *res;
805 struct ldlm_namespace *ns;
808 res = lock->l_resource;
809 ns = res->lr_namespace;
811 l_lock(&ns->ns_lock);
812 if (lock->l_readers || lock->l_writers)
813 CDEBUG(D_INFO, "lock still has references (%d readers, %d "
814 "writers)\n", lock->l_readers, lock->l_writers);
816 ldlm_resource_unlink_lock(lock);
817 ldlm_lock_destroy(lock);
818 l_unlock(&ns->ns_lock);
821 /* Must be called with lock and lock->l_resource unlocked */
822 struct ldlm_resource *ldlm_convert(struct lustre_handle *lockh, int new_mode, int *flags)
824 struct ldlm_lock *lock;
825 struct ldlm_resource *res;
826 struct ldlm_namespace *ns;
829 lock = lustre_handle2object(lockh);
830 res = lock->l_resource;
831 ns = res->lr_namespace;
833 l_lock(&ns->ns_lock);
835 lock->l_req_mode = new_mode;
836 ldlm_resource_unlink_lock(lock);
838 /* If this is a local resource, put it on the appropriate list. */
839 if (res->lr_namespace->ns_client) {
840 if (*flags & (LDLM_FL_BLOCK_CONV | LDLM_FL_BLOCK_GRANTED))
841 ldlm_resource_add_lock(res, res->lr_converting.prev,
844 ldlm_grant_lock(lock);
845 /* FIXME: completion handling not with ns_lock held ! */
846 wake_up(&lock->l_waitq);
849 list_add(&lock->l_res_link, res->lr_converting.prev);
852 l_unlock(&ns->ns_lock);
857 void ldlm_lock_dump(struct ldlm_lock *lock)
861 if (!(portal_debug & D_OTHER))
864 if (RES_VERSION_SIZE != 4)
868 CDEBUG(D_OTHER, " NULL LDLM lock\n");
872 snprintf(ver, sizeof(ver), "%x %x %x %x",
873 lock->l_version[0], lock->l_version[1],
874 lock->l_version[2], lock->l_version[3]);
876 CDEBUG(D_OTHER, " -- Lock dump: %p (%s)\n", lock, ver);
877 CDEBUG(D_OTHER, " Parent: %p\n", lock->l_parent);
878 CDEBUG(D_OTHER, " Resource: %p (%Ld)\n", lock->l_resource,
879 lock->l_resource->lr_name[0]);
880 CDEBUG(D_OTHER, " Requested mode: %d, granted mode: %d\n",
881 (int)lock->l_req_mode, (int)lock->l_granted_mode);
882 CDEBUG(D_OTHER, " Readers: %u ; Writers; %u\n",
883 lock->l_readers, lock->l_writers);
884 if (lock->l_resource->lr_type == LDLM_EXTENT)
885 CDEBUG(D_OTHER, " Extent: %Lu -> %Lu\n",
886 (unsigned long long)lock->l_extent.start,
887 (unsigned long long)lock->l_extent.end);