|
From: Smart W. G. <in...@sm...> - 2008-04-07 23:17:23
|
Hi,
with this patch, fsck will only run if -ofsck=1 is set when mounting:
diff -Nuar ../mysqlfs/mysqlfs.c mysqlfs.c
--- ../mysqlfs/mysqlfs.c 2006-09-17 13:09:32.000000000 +0200
+++ mysqlfs.c 2008-04-08 01:10:50.000000000 +0200
@@ -625,6 +625,12 @@
return 0;
}
+ if(!strncmp(arg, "fsck=", strlen("fsck="))){
+ str = strchr(arg, '=') + 1;
+ opt->fsck = atoi(str);
+ return 0;
+ }
+
/* Read defaults from specified group in my.cnf
* Command line options still have precedence. */
if(!strncmp(arg, "mycnf_group=", strlen("mycnf_group="))){
@@ -650,8 +656,8 @@
{
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct mysqlfs_opt opt = {
- .init_conns = 1,
- .max_idling_conns = 5,
+ .init_conns = 3,
+ .max_idling_conns = 10,
.mycnf_group = "mysqlfs",
.logfile = "mysqlfs.log",
};
@@ -666,7 +672,7 @@
return EXIT_FAILURE;
}
- log_file = log_init(opt.logfile, 1);
+ log_file = log_init(opt.logfile, 8);
fuse_main(args.argc, args.argv, &mysqlfs_oper);
fuse_opt_free_args(&args);
diff -Nuar ../mysqlfs/pool.c pool.c
--- ../mysqlfs/pool.c 2006-09-23 11:29:44.000000000 +0200
+++ pool.c 2008-04-08 01:00:47.000000000 +0200
@@ -103,7 +103,9 @@
goto out;
/* Cleanup. */
- ret = query_fsck(mysql);
+ if (opt->fsck == 1) {
+ ret = query_fsck(mysql);
+ }
out:
return ret;
diff -Nuar ../mysqlfs/pool.h pool.h
--- ../mysqlfs/pool.h 2006-09-17 13:09:32.000000000 +0200
+++ pool.h 2008-04-08 01:03:04.000000000 +0200
@@ -14,6 +14,7 @@
char *db; /* MySQL database name */
unsigned int port; /* MySQL port */
char *socket; /* MySQL socket */
+ unsigned int fsck; /* fsck boolean 1 => do fsck, 0 => don't */
char *mycnf_group; /* Group in my.cnf to read defaults from */
unsigned int init_conns; /* Number of DB connections to init on
startup */
unsigned int max_idling_conns; /* Maximum number of idling DB
connections */
--
Mit freundlichen Grüßen,
Florian Wiessner
Smart Weblications GmbH
Martinsberger Str. 1
D-95119 Naila
fon.: +49 700 762 789 32 - 0,12 EUR/Min*
fax.: +49 700 762 789 32 - 0,12 EUR/Min*
24/7: +49 900 311 886 00 - 1,99 EUR/Min*
http://www.smart-weblications.de
--
Sitz der Gesellschaft: Naila
Geschäftsführer: Florian Wiessner
HRB-Nr.: HRB 3840 Amtsgericht Hof
*aus dem dt. Festnetz, ggf. abweichende Preise aus dem Mobilfunknetz
|