| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: ebh.h,v 1.3 2012/10/19 12:44:39 ttoth Exp $ */ | | 1 | /* $NetBSD: ebh.h,v 1.4 2016/08/06 20:42:29 dholland Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2010 Department of Software Engineering, | | 4 | * Copyright (c) 2010 Department of Software Engineering, |
5 | * University of Szeged, Hungary | | 5 | * University of Szeged, Hungary |
6 | * Copyright (c) 2010 David Tengeri <dtengeri@inf.u-szeged.hu> | | 6 | * Copyright (c) 2010 David Tengeri <dtengeri@inf.u-szeged.hu> |
7 | * Copyright (c) 2010 Adam Hoka <ahoka@NetBSD.org> | | 7 | * Copyright (c) 2010 Adam Hoka <ahoka@NetBSD.org> |
8 | * All rights reserved. | | 8 | * All rights reserved. |
9 | * | | 9 | * |
10 | * This code is derived from software contributed to The NetBSD Foundation | | 10 | * This code is derived from software contributed to The NetBSD Foundation |
11 | * by the Department of Software Engineering, University of Szeged, Hungary | | 11 | * by the Department of Software Engineering, University of Szeged, Hungary |
12 | * | | 12 | * |
13 | * Redistribution and use in source and binary forms, with or without | | 13 | * Redistribution and use in source and binary forms, with or without |
14 | * modification, are permitted provided that the following conditions | | 14 | * modification, are permitted provided that the following conditions |
| @@ -95,27 +95,27 @@ enum { | | | @@ -95,27 +95,27 @@ enum { |
95 | enum { | | 95 | enum { |
96 | EBHDR_LEB_OK = 0, | | 96 | EBHDR_LEB_OK = 0, |
97 | EBHDR_LEB_DIRTY, | | 97 | EBHDR_LEB_DIRTY, |
98 | EBHDR_LEB_INVALIDATED, | | 98 | EBHDR_LEB_INVALIDATED, |
99 | EBHDR_LEB_BADMAGIC, | | 99 | EBHDR_LEB_BADMAGIC, |
100 | EBHDR_LEB_BADCRC, | | 100 | EBHDR_LEB_BADCRC, |
101 | EBHDR_LEB_FREE, | | 101 | EBHDR_LEB_FREE, |
102 | EBHDR_LEB_NO_HDR, | | 102 | EBHDR_LEB_NO_HDR, |
103 | }; | | 103 | }; |
104 | | | 104 | |
105 | struct chfs_ebh; | | 105 | struct chfs_ebh; |
106 | | | 106 | |
107 | /** | | 107 | /** |
108 | * struct chfs_ltree_entry - an netry in the lock tree | | 108 | * struct chfs_ltree_entry - an entry in the lock tree |
109 | * @rb: RB-node of the tree | | 109 | * @rb: RB-node of the tree |
110 | * @lnr: logical eraseblock number | | 110 | * @lnr: logical eraseblock number |
111 | * @users: counts the tasks that are using or want to use the eraseblock | | 111 | * @users: counts the tasks that are using or want to use the eraseblock |
112 | * @mutex: read/write mutex to lock the eraseblock | | 112 | * @mutex: read/write mutex to lock the eraseblock |
113 | */ | | 113 | */ |
114 | struct chfs_ltree_entry { | | 114 | struct chfs_ltree_entry { |
115 | RB_ENTRY(chfs_ltree_entry) rb; | | 115 | RB_ENTRY(chfs_ltree_entry) rb; |
116 | int lnr; | | 116 | int lnr; |
117 | int users; | | 117 | int users; |
118 | krwlock_t mutex; | | 118 | krwlock_t mutex; |
119 | }; | | 119 | }; |
120 | | | 120 | |
121 | /* Generate structure for Lock tree's red-black tree */ | | 121 | /* Generate structure for Lock tree's red-black tree */ |