Deleted Added
full compact
zfs_rlock.c (225736) zfs_rlock.c (243674)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 8 unchanged lines hidden (view full) ---

17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 8 unchanged lines hidden (view full) ---

17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25/*
26 * Copyright (c) 2012 by Delphix. All rights reserved.
27 */
25
26/*
27 * This file contains the code to implement file range locking in
28 * ZFS, although there isn't much specific to ZFS (all that comes to mind
29 * support for growing the blocksize).
30 *
31 * Interface
32 * ---------

--- 443 unchanged lines hidden (view full) ---

476 cv_broadcast(&remove->r_wr_cv);
477 cv_destroy(&remove->r_wr_cv);
478 }
479 if (remove->r_read_wanted) {
480 cv_broadcast(&remove->r_rd_cv);
481 cv_destroy(&remove->r_rd_cv);
482 }
483 } else {
28
29/*
30 * This file contains the code to implement file range locking in
31 * ZFS, although there isn't much specific to ZFS (all that comes to mind
32 * support for growing the blocksize).
33 *
34 * Interface
35 * ---------

--- 443 unchanged lines hidden (view full) ---

479 cv_broadcast(&remove->r_wr_cv);
480 cv_destroy(&remove->r_wr_cv);
481 }
482 if (remove->r_read_wanted) {
483 cv_broadcast(&remove->r_rd_cv);
484 cv_destroy(&remove->r_rd_cv);
485 }
486 } else {
484 ASSERT3U(remove->r_cnt, ==, 0);
485 ASSERT3U(remove->r_write_wanted, ==, 0);
486 ASSERT3U(remove->r_read_wanted, ==, 0);
487 ASSERT0(remove->r_cnt);
488 ASSERT0(remove->r_write_wanted);
489 ASSERT0(remove->r_read_wanted);
487 /*
488 * Find start proxy representing this reader lock,
489 * then decrement ref count on all proxies
490 * that make up this range, freeing them as needed.
491 */
492 rl = avl_find(tree, remove, NULL);
493 ASSERT(rl);
494 ASSERT(rl->r_cnt);

--- 108 unchanged lines hidden ---
490 /*
491 * Find start proxy representing this reader lock,
492 * then decrement ref count on all proxies
493 * that make up this range, freeing them as needed.
494 */
495 rl = avl_find(tree, remove, NULL);
496 ASSERT(rl);
497 ASSERT(rl->r_cnt);

--- 108 unchanged lines hidden ---