refactor
This commit is contained in:
parent
9355c82c15
commit
adc8e4e815
|
@ -13,7 +13,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "tdisk.h"
|
#include "tmount.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "taosdef.h"
|
#include "taosdef.h"
|
||||||
#include "taoserror.h"
|
#include "taoserror.h"
|
||||||
|
@ -26,18 +26,18 @@ typedef struct {
|
||||||
uint64_t nfiles;
|
uint64_t nfiles;
|
||||||
} SDiskMeta;
|
} SDiskMeta;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint64_t tsize;
|
|
||||||
uint64_t avail; // bytes
|
|
||||||
} STiersMeta;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int level;
|
int level;
|
||||||
int did;
|
int id;
|
||||||
char dir[TSDB_FILENAME_LEN];
|
char dir[TSDB_FILENAME_LEN];
|
||||||
SDiskMeta dmeta;
|
SDiskMeta dmeta;
|
||||||
} SDisk;
|
} SDisk;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint64_t tsize;
|
||||||
|
uint64_t avail; // bytes
|
||||||
|
} STiersMeta;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int level;
|
int level;
|
||||||
int nDisks;
|
int nDisks;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "dnodeShell.h"
|
#include "dnodeShell.h"
|
||||||
#include "dnodeTelemetry.h"
|
#include "dnodeTelemetry.h"
|
||||||
#include "tpath.h"
|
#include "tpath.h"
|
||||||
#include "tdisk.h"
|
#include "tmount.h"
|
||||||
|
|
||||||
static SRunStatus tsRunStatus = TSDB_RUN_STATUS_STOPPED;
|
static SRunStatus tsRunStatus = TSDB_RUN_STATUS_STOPPED;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "tconfig.h"
|
#include "tconfig.h"
|
||||||
#include "tdisk.h"
|
#include "tmount.h"
|
||||||
#include "tglobal.h"
|
#include "tglobal.h"
|
||||||
#include "tulog.h"
|
#include "tulog.h"
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "tlog.h"
|
#include "tlog.h"
|
||||||
#include "ttimer.h"
|
#include "ttimer.h"
|
||||||
#include "tutil.h"
|
#include "tutil.h"
|
||||||
#include "tdisk.h"
|
#include "tmount.h"
|
||||||
#include "tscUtil.h"
|
#include "tscUtil.h"
|
||||||
#include "tsclient.h"
|
#include "tsclient.h"
|
||||||
#include "dnode.h"
|
#include "dnode.h"
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "tsdb.h"
|
#include "tsdb.h"
|
||||||
#include "tskiplist.h"
|
#include "tskiplist.h"
|
||||||
#include "tutil.h"
|
#include "tutil.h"
|
||||||
#include "tdisk.h"
|
#include "tmount.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "tsdbMain.h"
|
#include "tsdbMain.h"
|
||||||
#include "tutil.h"
|
#include "tutil.h"
|
||||||
#include "tpath.h"
|
#include "tpath.h"
|
||||||
#include "tdisk.h"
|
#include "tmount.h"
|
||||||
|
|
||||||
const char * tsdbFileSuffix[] = {".head", ".data", ".last", ".stat", ".h", ".d", ".l", ".s"};
|
const char * tsdbFileSuffix[] = {".head", ".data", ".last", ".stat", ".h", ".d", ".l", ".s"};
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "dnodeVRead.h"
|
#include "dnodeVRead.h"
|
||||||
#include "query.h"
|
#include "query.h"
|
||||||
#include "tpath.h"
|
#include "tpath.h"
|
||||||
#include "tdisk.h"
|
#include "tmount.h"
|
||||||
|
|
||||||
static SHashObj*tsVnodesHash;
|
static SHashObj*tsVnodesHash;
|
||||||
static void vnodeCleanUp(SVnodeObj *pVnode);
|
static void vnodeCleanUp(SVnodeObj *pVnode);
|
||||||
|
|
Loading…
Reference in New Issue