| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: vfs_wapbl.c,v 1.103 2018/12/10 21:19:33 jdolecek Exp $ */ | | 1 | /* $NetBSD: vfs_wapbl.c,v 1.104 2020/03/08 18:26:59 ad Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Wasabi Systems, Inc. | | 8 | * by Wasabi Systems, Inc. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -26,27 +26,27 @@ | | | @@ -26,27 +26,27 @@ |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | * POSSIBILITY OF SUCH DAMAGE. | | 29 | * POSSIBILITY OF SUCH DAMAGE. |
30 | */ | | 30 | */ |
31 | | | 31 | |
32 | /* | | 32 | /* |
33 | * This implements file system independent write ahead filesystem logging. | | 33 | * This implements file system independent write ahead filesystem logging. |
34 | */ | | 34 | */ |
35 | | | 35 | |
36 | #define WAPBL_INTERNAL | | 36 | #define WAPBL_INTERNAL |
37 | | | 37 | |
38 | #include <sys/cdefs.h> | | 38 | #include <sys/cdefs.h> |
39 | __KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.103 2018/12/10 21:19:33 jdolecek Exp $"); | | 39 | __KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.104 2020/03/08 18:26:59 ad Exp $"); |
40 | | | 40 | |
41 | #include <sys/param.h> | | 41 | #include <sys/param.h> |
42 | #include <sys/bitops.h> | | 42 | #include <sys/bitops.h> |
43 | #include <sys/time.h> | | 43 | #include <sys/time.h> |
44 | #include <sys/wapbl.h> | | 44 | #include <sys/wapbl.h> |
45 | #include <sys/wapbl_replay.h> | | 45 | #include <sys/wapbl_replay.h> |
46 | | | 46 | |
47 | #ifdef _KERNEL | | 47 | #ifdef _KERNEL |
48 | | | 48 | |
49 | #include <sys/atomic.h> | | 49 | #include <sys/atomic.h> |
50 | #include <sys/conf.h> | | 50 | #include <sys/conf.h> |
51 | #include <sys/evcnt.h> | | 51 | #include <sys/evcnt.h> |
52 | #include <sys/file.h> | | 52 | #include <sys/file.h> |
| @@ -346,27 +346,27 @@ wapbl_sysctl_init(void) | | | @@ -346,27 +346,27 @@ wapbl_sysctl_init(void) |
346 | | | 346 | |
347 | rv = sysctl_createv(&wapbl_sysctl, 0, &rnode, &cnode, | | 347 | rv = sysctl_createv(&wapbl_sysctl, 0, &rnode, &cnode, |
348 | CTLFLAG_PERMANENT|CTLFLAG_READWRITE, | | 348 | CTLFLAG_PERMANENT|CTLFLAG_READWRITE, |
349 | CTLTYPE_INT, "verbose_commit", | | 349 | CTLTYPE_INT, "verbose_commit", |
350 | SYSCTL_DESCR("show time and size of wapbl log commits"), | | 350 | SYSCTL_DESCR("show time and size of wapbl log commits"), |
351 | NULL, 0, &wapbl_verbose_commit, 0, | | 351 | NULL, 0, &wapbl_verbose_commit, 0, |
352 | CTL_CREATE, CTL_EOL); | | 352 | CTL_CREATE, CTL_EOL); |
353 | if (rv) | | 353 | if (rv) |
354 | return rv; | | 354 | return rv; |
355 | | | 355 | |
356 | rv = sysctl_createv(&wapbl_sysctl, 0, &rnode, &cnode, | | 356 | rv = sysctl_createv(&wapbl_sysctl, 0, &rnode, &cnode, |
357 | CTLFLAG_PERMANENT|CTLFLAG_READWRITE, | | 357 | CTLFLAG_PERMANENT|CTLFLAG_READWRITE, |
358 | CTLTYPE_INT, "allow_dpofua", | | 358 | CTLTYPE_INT, "allow_dpofua", |
359 | SYSCTL_DESCR("allow use of FUA/DPO instead of cash flush if available"), | | 359 | SYSCTL_DESCR("allow use of FUA/DPO instead of cache flush if available"), |
360 | NULL, 0, &wapbl_allow_dpofua, 0, | | 360 | NULL, 0, &wapbl_allow_dpofua, 0, |
361 | CTL_CREATE, CTL_EOL); | | 361 | CTL_CREATE, CTL_EOL); |
362 | if (rv) | | 362 | if (rv) |
363 | return rv; | | 363 | return rv; |
364 | | | 364 | |
365 | rv = sysctl_createv(&wapbl_sysctl, 0, &rnode, &cnode, | | 365 | rv = sysctl_createv(&wapbl_sysctl, 0, &rnode, &cnode, |
366 | CTLFLAG_PERMANENT|CTLFLAG_READWRITE, | | 366 | CTLFLAG_PERMANENT|CTLFLAG_READWRITE, |
367 | CTLTYPE_INT, "journal_iobufs", | | 367 | CTLTYPE_INT, "journal_iobufs", |
368 | SYSCTL_DESCR("count of bufs used for journal I/O (max async count)"), | | 368 | SYSCTL_DESCR("count of bufs used for journal I/O (max async count)"), |
369 | NULL, 0, &wapbl_journal_iobufs, 0, | | 369 | NULL, 0, &wapbl_journal_iobufs, 0, |
370 | CTL_CREATE, CTL_EOL); | | 370 | CTL_CREATE, CTL_EOL); |
371 | if (rv) | | 371 | if (rv) |
372 | return rv; | | 372 | return rv; |