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.
5 * Author: Peter Braam <braam@clusterfs.com>
6 * Author: Phil Schwan <phil@clusterfs.com>
8 * This file is part of Lustre, http://www.lustre.org.
10 * Lustre is free software; you can redistribute it and/or
11 * modify it under the terms of version 2 of the GNU General Public
12 * License as published by the Free Software Foundation.
14 * Lustre is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with Lustre; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #define DEBUG_SUBSYSTEM S_LDLM
26 #include <linux/slab.h>
27 #include <linux/module.h>
28 #include <linux/random.h>
29 #include <linux/lustre_dlm.h>
30 #include <linux/lustre_mds.h>
31 #include <linux/obd_class.h>
34 char *ldlm_lockname[] = {
43 char *ldlm_typename[] = {
46 [LDLM_MDSINTENT] "INT"
49 char *ldlm_it2str(int it)
56 case (IT_OPEN | IT_CREAT):
85 CERROR("Unknown intent %d\n", it);
90 extern kmem_cache_t *ldlm_lock_slab;
92 static int ldlm_plain_compat(struct ldlm_lock *a, struct ldlm_lock *b);
94 ldlm_res_compat ldlm_res_compat_table[] = {
95 [LDLM_PLAIN] ldlm_plain_compat,
96 [LDLM_EXTENT] ldlm_extent_compat,
97 [LDLM_MDSINTENT] ldlm_plain_compat
100 ldlm_res_policy ldlm_res_policy_table[] = {
102 [LDLM_EXTENT] ldlm_extent_policy,
103 [LDLM_MDSINTENT] NULL
106 void ldlm_register_intent(int (*arg) (struct ldlm_lock * lock, void *req_cookie,
107 ldlm_mode_t mode, void *data))
109 ldlm_res_policy_table[LDLM_MDSINTENT] = arg;
112 void ldlm_unregister_intent(void)
114 ldlm_res_policy_table[LDLM_MDSINTENT] = NULL;
118 * REFCOUNTED LOCK OBJECTS
123 * Lock refcounts, during creation:
124 * - one special one for allocation, dec'd only once in destroy
125 * - one for being a lock that's in-use
126 * - one for the addref associated with a new lock
128 struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock)
130 l_lock(&lock->l_resource->lr_namespace->ns_lock);
132 ldlm_resource_getref(lock->l_resource);
133 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
137 void ldlm_lock_put(struct ldlm_lock *lock)
139 struct lustre_lock *nslock = &lock->l_resource->lr_namespace->ns_lock;
144 //LDLM_DEBUG(lock, "after refc--");
145 if (lock->l_refc < 0)
148 ldlm_resource_put(lock->l_resource);
150 LDLM_LOCK_PUT(lock->l_parent);
152 if (lock->l_refc == 0 && (lock->l_flags & LDLM_FL_DESTROYED)) {
153 lock->l_resource = NULL;
154 LDLM_DEBUG(lock, "final lock_put on destroyed lock, freeing");
155 if (lock->l_export && lock->l_export->exp_connection)
156 ptlrpc_put_connection(lock->l_export->exp_connection);
157 CDEBUG(D_MALLOC, "kfreed 'lock': %d at %p (tot 1).\n",
158 sizeof(*lock), lock);
159 kmem_cache_free(ldlm_lock_slab, lock);
165 void ldlm_lock_destroy(struct ldlm_lock *lock)
168 l_lock(&lock->l_resource->lr_namespace->ns_lock);
170 if (!list_empty(&lock->l_children)) {
171 LDLM_DEBUG(lock, "still has children (%p)!",
172 lock->l_children.next);
173 ldlm_lock_dump(lock);
176 if (lock->l_readers || lock->l_writers) {
177 LDLM_DEBUG(lock, "lock still has references");
178 ldlm_lock_dump(lock);
182 if (!list_empty(&lock->l_res_link)) {
183 ldlm_lock_dump(lock);
187 if (lock->l_flags & LDLM_FL_DESTROYED) {
188 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
193 list_del(&lock->l_export_chain);
194 lock->l_export = NULL;
195 lock->l_flags = LDLM_FL_DESTROYED;
197 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
203 usage: pass in a resource on which you have done get
204 pass in a parent lock on which you have done a get
205 do not put the resource or the parent
206 returns: lock with refcount 1
208 static struct ldlm_lock *ldlm_lock_new(struct ldlm_lock *parent,
209 struct ldlm_resource *resource)
211 struct ldlm_lock *lock;
214 if (resource == NULL)
217 lock = kmem_cache_alloc(ldlm_lock_slab, SLAB_KERNEL);
220 CDEBUG(D_MALLOC, "kmalloced 'lock': %d at "
221 "%p (tot %d).\n", sizeof(*lock), lock, 1);
223 memset(lock, 0, sizeof(*lock));
224 get_random_bytes(&lock->l_random, sizeof(__u64));
226 lock->l_resource = resource;
227 /* this refcount matches the one of the resource passed
228 in which is not being put away */
230 INIT_LIST_HEAD(&lock->l_children);
231 INIT_LIST_HEAD(&lock->l_res_link);
232 INIT_LIST_HEAD(&lock->l_inode_link);
233 INIT_LIST_HEAD(&lock->l_export_chain);
234 INIT_LIST_HEAD(&lock->l_pending_chain);
235 init_waitqueue_head(&lock->l_waitq);
237 if (parent != NULL) {
238 l_lock(&parent->l_resource->lr_namespace->ns_lock);
239 lock->l_parent = parent;
240 list_add(&lock->l_childof, &parent->l_children);
241 l_unlock(&parent->l_resource->lr_namespace->ns_lock);
243 /* this is the extra refcount, to prevent the lock
249 int ldlm_lock_change_resource(struct ldlm_lock *lock, __u64 new_resid[3])
251 struct ldlm_namespace *ns = lock->l_resource->lr_namespace;
252 struct ldlm_resource *oldres = lock->l_resource;
256 l_lock(&ns->ns_lock);
257 if (memcmp(new_resid, lock->l_resource->lr_name,
258 sizeof(lock->l_resource->lr_name)) == 0) {
260 l_unlock(&ns->ns_lock);
264 type = lock->l_resource->lr_type;
265 if (new_resid[0] == 0)
267 lock->l_resource = ldlm_resource_get(ns, NULL, new_resid, type, 1);
268 if (lock->l_resource == NULL) {
273 /* move references over */
274 for (i = 0; i < lock->l_refc; i++) {
276 ldlm_resource_getref(lock->l_resource);
277 rc = ldlm_resource_put(oldres);
278 if (rc == 1 && i != lock->l_refc - 1)
281 /* compensate for the initial get above.. */
282 ldlm_resource_put(lock->l_resource);
284 l_unlock(&ns->ns_lock);
292 void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh)
294 lockh->addr = (__u64) (unsigned long)lock;
295 lockh->cookie = lock->l_random;
298 struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *handle)
300 struct ldlm_lock *lock = NULL, *retval = NULL;
303 if (!handle || !handle->addr)
306 lock = (struct ldlm_lock *)(unsigned long)(handle->addr);
307 if (!kmem_cache_validate(ldlm_lock_slab, (void *)lock))
310 l_lock(&lock->l_resource->lr_namespace->ns_lock);
311 if (lock->l_random != handle->cookie)
314 if (lock->l_flags & LDLM_FL_DESTROYED)
317 retval = LDLM_LOCK_GET(lock);
320 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
324 static int ldlm_plain_compat(struct ldlm_lock *a, struct ldlm_lock *b)
326 return lockmode_compat(a->l_req_mode, b->l_req_mode);
329 void ldlm_lock2desc(struct ldlm_lock *lock, struct ldlm_lock_desc *desc)
331 ldlm_res2desc(lock->l_resource, &desc->l_resource);
332 desc->l_req_mode = lock->l_req_mode;
333 desc->l_granted_mode = lock->l_granted_mode;
334 memcpy(&desc->l_extent, &lock->l_extent, sizeof(desc->l_extent));
335 memcpy(desc->l_version, lock->l_version, sizeof(desc->l_version));
338 static void ldlm_add_ast_work_item(struct ldlm_lock *lock,
339 struct ldlm_lock *new)
341 struct ldlm_ast_work *w;
344 l_lock(&lock->l_resource->lr_namespace->ns_lock);
345 if (new && (lock->l_flags & LDLM_FL_AST_SENT))
348 OBD_ALLOC(w, sizeof(*w));
355 lock->l_flags |= LDLM_FL_AST_SENT;
357 ldlm_lock2desc(new, &w->w_desc);
360 w->w_lock = LDLM_LOCK_GET(lock);
361 list_add(&w->w_list, lock->l_resource->lr_tmp);
363 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
367 void ldlm_lock_addref(struct lustre_handle *lockh, __u32 mode)
369 struct ldlm_lock *lock;
371 lock = ldlm_handle2lock(lockh);
372 ldlm_lock_addref_internal(lock, mode);
376 /* only called for local locks */
377 void ldlm_lock_addref_internal(struct ldlm_lock *lock, __u32 mode)
379 l_lock(&lock->l_resource->lr_namespace->ns_lock);
380 if (mode == LCK_NL || mode == LCK_CR || mode == LCK_PR)
384 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
386 LDLM_DEBUG(lock, "ldlm_lock_addref(%s)", ldlm_lockname[mode]);
389 /* Args: unlocked lock */
390 void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode)
392 struct ldlm_lock *lock = ldlm_handle2lock(lockh);
398 LDLM_DEBUG(lock, "ldlm_lock_decref(%s)", ldlm_lockname[mode]);
399 l_lock(&lock->l_resource->lr_namespace->ns_lock);
400 if (mode == LCK_NL || mode == LCK_CR || mode == LCK_PR)
405 /* If we received a blocked AST and this was the last reference,
406 * run the callback. */
407 if (!lock->l_readers && !lock->l_writers &&
408 (lock->l_flags & LDLM_FL_CBPENDING)) {
409 if (!lock->l_resource->lr_namespace->ns_client) {
410 CERROR("LDLM_FL_CBPENDING set on non-local lock!\n");
414 LDLM_DEBUG(lock, "final decref done on cbpending lock");
415 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
417 /* FIXME: need a real 'desc' here */
418 lock->l_blocking_ast(lock, NULL, lock->l_data,
421 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
423 LDLM_LOCK_PUT(lock); /* matches the ldlm_lock_get in addref */
424 LDLM_LOCK_PUT(lock); /* matches the handle2lock above */
429 static int ldlm_lock_compat_list(struct ldlm_lock *lock, int send_cbs,
430 struct list_head *queue)
432 struct list_head *tmp, *pos;
435 list_for_each_safe(tmp, pos, queue) {
436 struct ldlm_lock *child;
437 ldlm_res_compat compat;
439 child = list_entry(tmp, struct ldlm_lock, l_res_link);
443 compat = ldlm_res_compat_table[child->l_resource->lr_type];
444 if (compat && compat(child, lock)) {
445 CDEBUG(D_OTHER, "compat function succeded, next.\n");
448 if (lockmode_compat(child->l_granted_mode, lock->l_req_mode)) {
449 CDEBUG(D_OTHER, "lock modes are compatible, next.\n");
455 if (send_cbs && child->l_blocking_ast != NULL) {
456 CDEBUG(D_OTHER, "lock %p incompatible; sending "
457 "blocking AST.\n", child);
458 ldlm_add_ast_work_item(child, lock);
465 static int ldlm_lock_compat(struct ldlm_lock *lock, int send_cbs)
470 l_lock(&lock->l_resource->lr_namespace->ns_lock);
471 rc = ldlm_lock_compat_list(lock, send_cbs,
472 &lock->l_resource->lr_granted);
473 /* FIXME: should we be sending ASTs to converting? */
475 rc = ldlm_lock_compat_list
476 (lock, send_cbs, &lock->l_resource->lr_converting);
478 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
483 - ldlm_handle_enqueuque - resource
485 void ldlm_grant_lock(struct ldlm_lock *lock)
487 struct ldlm_resource *res = lock->l_resource;
490 l_lock(&lock->l_resource->lr_namespace->ns_lock);
491 ldlm_resource_add_lock(res, &res->lr_granted, lock);
492 lock->l_granted_mode = lock->l_req_mode;
494 if (lock->l_granted_mode < res->lr_most_restr)
495 res->lr_most_restr = lock->l_granted_mode;
497 if (lock->l_completion_ast) {
498 ldlm_add_ast_work_item(lock, NULL);
500 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
504 /* returns a referenced lock or NULL */
505 static struct ldlm_lock *search_queue(struct list_head *queue, ldlm_mode_t mode,
506 struct ldlm_extent *extent)
508 struct ldlm_lock *lock;
509 struct list_head *tmp;
511 list_for_each(tmp, queue) {
512 lock = list_entry(tmp, struct ldlm_lock, l_res_link);
514 if (lock->l_flags & LDLM_FL_CBPENDING)
517 /* lock_convert() takes the resource lock, so we're sure that
518 * req_mode, lr_type, and l_cookie won't change beneath us */
519 if (lock->l_req_mode != mode)
522 if (lock->l_resource->lr_type == LDLM_EXTENT &&
523 (lock->l_extent.start > extent->start ||
524 lock->l_extent.end < extent->end))
527 ldlm_lock_addref_internal(lock, mode);
534 /* Must be called with no resource or lock locks held.
536 * Returns 1 if it finds an already-existing lock that is compatible; in this
537 * case, lockh is filled in with a addref()ed lock
539 int ldlm_lock_match(struct ldlm_namespace *ns, __u64 * res_id, __u32 type,
540 void *cookie, int cookielen, ldlm_mode_t mode,
541 struct lustre_handle *lockh)
543 struct ldlm_resource *res;
544 struct ldlm_lock *lock;
548 res = ldlm_resource_get(ns, NULL, res_id, type, 0);
552 ns = res->lr_namespace;
553 l_lock(&ns->ns_lock);
555 if ((lock = search_queue(&res->lr_granted, mode, cookie)))
557 if ((lock = search_queue(&res->lr_converting, mode, cookie)))
559 if ((lock = search_queue(&res->lr_waiting, mode, cookie)))
564 ldlm_resource_put(res);
565 l_unlock(&ns->ns_lock);
568 ldlm_lock2handle(lock, lockh);
569 if (lock->l_completion_ast)
570 lock->l_completion_ast(lock, LDLM_FL_WAIT_NOREPROC);
573 LDLM_DEBUG(lock, "matched");
575 LDLM_DEBUG_NOLOCK("not matched");
579 /* Returns a referenced lock */
580 struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns,
581 struct lustre_handle *parent_lock_handle,
582 __u64 * res_id, __u32 type,
583 ldlm_mode_t mode, void *data, __u32 data_len)
585 struct ldlm_resource *res, *parent_res = NULL;
586 struct ldlm_lock *lock, *parent_lock;
588 parent_lock = ldlm_handle2lock(parent_lock_handle);
590 parent_res = parent_lock->l_resource;
592 res = ldlm_resource_get(ns, parent_res, res_id, type, 1);
596 lock = ldlm_lock_new(parent_lock, res);
598 ldlm_resource_put(res);
602 lock->l_req_mode = mode;
604 lock->l_data_len = data_len;
609 /* Must be called with lock->l_lock and lock->l_resource->lr_lock not held */
610 ldlm_error_t ldlm_lock_enqueue(struct ldlm_lock * lock,
611 void *cookie, int cookie_len,
613 ldlm_completion_callback completion,
614 ldlm_blocking_callback blocking)
616 struct ldlm_resource *res;
618 ldlm_res_policy policy;
621 res = lock->l_resource;
622 lock->l_blocking_ast = blocking;
624 if (res->lr_type == LDLM_EXTENT)
625 memcpy(&lock->l_extent, cookie, sizeof(lock->l_extent));
627 /* policies are not executed on the client */
628 local = res->lr_namespace->ns_client;
629 if (!local && (policy = ldlm_res_policy_table[res->lr_type])) {
631 rc = policy(lock, cookie, lock->l_req_mode, NULL);
633 if (rc == ELDLM_LOCK_CHANGED) {
634 res = lock->l_resource;
635 *flags |= LDLM_FL_LOCK_CHANGED;
636 } else if (rc == ELDLM_LOCK_ABORTED) {
637 ldlm_lock_destroy(lock);
642 lock->l_cookie = cookie;
643 lock->l_cookie_len = cookie_len;
645 if (local && lock->l_req_mode == lock->l_granted_mode) {
646 /* The server returned a blocked lock, but it was granted before
647 * we got a chance to actually enqueue it. We don't need to do
652 /* This distinction between local lock trees is very important; a client
653 * namespace only has information about locks taken by that client, and
654 * thus doesn't have enough information to decide for itself if it can
655 * be granted (below). In this case, we do exactly what the server
656 * tells us to do, as dictated by the 'flags' */
657 ldlm_resource_unlink_lock(lock);
659 if (*flags & LDLM_FL_BLOCK_CONV)
660 ldlm_resource_add_lock(res, res->lr_converting.prev,
662 else if (*flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED))
663 ldlm_resource_add_lock(res, res->lr_waiting.prev, lock);
665 ldlm_grant_lock(lock);
669 /* FIXME: We may want to optimize by checking lr_most_restr */
670 if (!list_empty(&res->lr_converting)) {
671 ldlm_resource_add_lock(res, res->lr_waiting.prev, lock);
672 *flags |= LDLM_FL_BLOCK_CONV;
675 if (!list_empty(&res->lr_waiting)) {
676 ldlm_resource_add_lock(res, res->lr_waiting.prev, lock);
677 *flags |= LDLM_FL_BLOCK_WAIT;
680 if (!ldlm_lock_compat(lock, 0)) {
681 ldlm_resource_add_lock(res, res->lr_waiting.prev, lock);
682 *flags |= LDLM_FL_BLOCK_GRANTED;
686 ldlm_grant_lock(lock);
689 /* Don't set 'completion_ast' until here so that if the lock is granted
690 * immediately we don't do an unnecessary completion call. */
691 lock->l_completion_ast = completion;
695 /* Must be called with namespace taken: queue is waiting or converting. */
696 static int ldlm_reprocess_queue(struct ldlm_resource *res,
697 struct list_head *queue)
699 struct list_head *tmp, *pos;
702 list_for_each_safe(tmp, pos, queue) {
703 struct ldlm_lock *pending;
704 pending = list_entry(tmp, struct ldlm_lock, l_res_link);
706 CDEBUG(D_INFO, "Reprocessing lock %p\n", pending);
708 if (!ldlm_lock_compat(pending, 1))
711 list_del_init(&pending->l_res_link);
712 ldlm_grant_lock(pending);
718 void ldlm_run_ast_work(struct list_head *rpc_list)
720 struct list_head *tmp, *pos;
724 list_for_each_safe(tmp, pos, rpc_list) {
725 struct ldlm_ast_work *w =
726 list_entry(tmp, struct ldlm_ast_work, w_list);
729 rc = w->w_lock->l_blocking_ast
730 (w->w_lock, &w->w_desc, w->w_data,
733 rc = w->w_lock->l_completion_ast(w->w_lock, w->w_flags);
735 CERROR("Failed AST - should clean & disconnect "
737 LDLM_LOCK_PUT(w->w_lock);
738 list_del(&w->w_list);
739 OBD_FREE(w, sizeof(*w));
744 /* Must be called with resource->lr_lock not taken. */
745 void ldlm_reprocess_all(struct ldlm_resource *res)
747 struct list_head rpc_list = LIST_HEAD_INIT(rpc_list);
750 /* Local lock trees don't get reprocessed. */
751 if (res->lr_namespace->ns_client) {
756 l_lock(&res->lr_namespace->ns_lock);
757 res->lr_tmp = &rpc_list;
759 ldlm_reprocess_queue(res, &res->lr_converting);
760 if (list_empty(&res->lr_converting))
761 ldlm_reprocess_queue(res, &res->lr_waiting);
764 l_unlock(&res->lr_namespace->ns_lock);
766 ldlm_run_ast_work(&rpc_list);
770 void ldlm_lock_cancel(struct ldlm_lock *lock)
772 struct ldlm_resource *res;
773 struct ldlm_namespace *ns;
776 res = lock->l_resource;
777 ns = res->lr_namespace;
779 l_lock(&ns->ns_lock);
780 if (lock->l_readers || lock->l_writers)
781 CDEBUG(D_INFO, "lock still has references (%d readers, %d "
782 "writers)\n", lock->l_readers, lock->l_writers);
784 ldlm_resource_unlink_lock(lock);
785 ldlm_lock_destroy(lock);
786 l_unlock(&ns->ns_lock);
790 struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode,
793 struct list_head rpc_list = LIST_HEAD_INIT(rpc_list);
794 struct ldlm_resource *res;
795 struct ldlm_namespace *ns;
799 res = lock->l_resource;
800 ns = res->lr_namespace;
802 l_lock(&ns->ns_lock);
804 lock->l_req_mode = new_mode;
805 ldlm_resource_unlink_lock(lock);
807 /* If this is a local resource, put it on the appropriate list. */
808 if (res->lr_namespace->ns_client) {
809 if (*flags & (LDLM_FL_BLOCK_CONV | LDLM_FL_BLOCK_GRANTED))
810 ldlm_resource_add_lock(res, res->lr_converting.prev,
813 res->lr_tmp = &rpc_list;
814 ldlm_grant_lock(lock);
817 /* FIXME: completion handling not with ns_lock held ! */
818 if (lock->l_completion_ast)
819 lock->l_completion_ast(lock, 0);
822 list_add_tail(&lock->l_res_link, &res->lr_converting);
824 l_unlock(&ns->ns_lock);
827 ldlm_run_ast_work(&rpc_list);
831 void ldlm_lock_dump(struct ldlm_lock *lock)
835 if (!(portal_debug & D_OTHER))
838 if (RES_VERSION_SIZE != 4)
842 CDEBUG(D_OTHER, " NULL LDLM lock\n");
846 snprintf(ver, sizeof(ver), "%x %x %x %x",
847 lock->l_version[0], lock->l_version[1],
848 lock->l_version[2], lock->l_version[3]);
850 CDEBUG(D_OTHER, " -- Lock dump: %p (%s)\n", lock, ver);
851 if (lock->l_export && lock->l_export->exp_connection)
852 CDEBUG(D_OTHER, " Node: NID %x (rhandle: %Lx)\n",
853 lock->l_export->exp_connection->c_peer.peer_nid,
854 lock->l_remote_handle.addr);
856 CDEBUG(D_OTHER, " Node: local\n");
857 CDEBUG(D_OTHER, " Parent: %p\n", lock->l_parent);
858 CDEBUG(D_OTHER, " Resource: %p (%Ld)\n", lock->l_resource,
859 lock->l_resource->lr_name[0]);
860 CDEBUG(D_OTHER, " Requested mode: %d, granted mode: %d\n",
861 (int)lock->l_req_mode, (int)lock->l_granted_mode);
862 CDEBUG(D_OTHER, " Readers: %u ; Writers; %u\n",
863 lock->l_readers, lock->l_writers);
864 if (lock->l_resource->lr_type == LDLM_EXTENT)
865 CDEBUG(D_OTHER, " Extent: %Lu -> %Lu\n",
866 (unsigned long long)lock->l_extent.start,
867 (unsigned long long)lock->l_extent.end);