forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cstor#21] thread to update txg every 10 mins (#65)
[cstor#21] thread to update txg every 10 mins
- Loading branch information
1 parent
6ea0578
commit 3fef28e
Showing
12 changed files
with
360 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* CDDL HEADER START | ||
* | ||
* The contents of this file are subject to the terms of the | ||
* Common Development and Distribution License (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* | ||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | ||
* or http://www.opensolaris.org/os/licensing. | ||
* See the License for the specific language governing permissions | ||
* and limitations under the License. | ||
* | ||
* When distributing Covered Code, include this CDDL HEADER in each | ||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE. | ||
* If applicable, add the following below this CDDL HEADER, with the | ||
* fields enclosed by brackets "[]" replaced with your own identifying | ||
* information: Portions Copyright [yyyy] [name of copyright owner] | ||
* | ||
* CDDL HEADER END | ||
*/ | ||
|
||
#include <uzfs_task.h> | ||
#include <sys/spa_impl.h> | ||
|
||
#ifndef _UZFS_H | ||
|
||
#define _UZFS_H | ||
|
||
typedef int (*const uzfs_pool_task_func_t)(void *spa); | ||
|
||
typedef struct uzfs_pool_task_funcs { | ||
uzfs_pool_task_func_t open_func; | ||
uzfs_pool_task_func_t close_func; | ||
} uzfs_pool_task_funcs_t; | ||
|
||
#define UZFS_POOL_MAX_TASKS 3 | ||
|
||
typedef struct uzfs_spa { | ||
boolean_t tasks_initialized[UZFS_POOL_MAX_TASKS]; | ||
boolean_t close_pool; | ||
kmutex_t mtx; | ||
kcondvar_t cv; | ||
kthread_t *update_txg_tid; | ||
} uzfs_spa_t; | ||
|
||
extern uzfs_pool_task_funcs_t uzfs_pool_tasks[UZFS_POOL_MAX_TASKS]; | ||
|
||
#define uzfs_spa(s) ((uzfs_spa_t *)(s->spa_us)) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* CDDL HEADER START | ||
* | ||
* The contents of this file are subject to the terms of the | ||
* Common Development and Distribution License (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* | ||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | ||
* or http://www.opensolaris.org/os/licensing. | ||
* See the License for the specific language governing permissions | ||
* and limitations under the License. | ||
* | ||
* When distributing Covered Code, include this CDDL HEADER in each | ||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE. | ||
* If applicable, add the following below this CDDL HEADER, with the | ||
* fields enclosed by brackets "[]" replaced with your own identifying | ||
* information: Portions Copyright [yyyy] [name of copyright owner] | ||
* | ||
* CDDL HEADER END | ||
*/ | ||
|
||
#ifndef _UZFS_TASK_H | ||
|
||
#define _UZFS_TASK_H | ||
|
||
int dummy_pool_task(void *s); | ||
int post_open_pool(void *s); | ||
int pre_close_pool(void *s); | ||
int post_close_pool(void *s); | ||
int create_txg_update_thread(void *s); | ||
int close_txg_update_thread(void *s); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ USER_C = \ | |
taskq.c \ | ||
util.c \ | ||
uzfs_io.c \ | ||
uzfs_task.c \ | ||
uzfs_mgmt.c \ | ||
uzfs_zap.c \ | ||
vdev_disk_aio.c | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.