You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(3) |
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(3) |
Dec
(2) |
2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
(13) |
Jul
(5) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: SourceForge.net <no...@so...> - 2009-03-03 01:09:22
|
Bugs item #1849644, was opened at 2007-12-12 21:35 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=1849644&group_id=129981 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: configure pthread test failing Initial Comment: Trying to compile of fc7 or fc7 I get this output: checking for pthread_create in -lpthread... no configure: error: Please install pthreads library first. But it is installed with glibc-headers-2.6-4 and glibc-devel. I am unable to compile this on a modern Fedora distro! respond to: da...@ge... ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-03-03 00:12 Message: I have the same problem, "configure: error: Please install pthreads library first." if i do a locate pthread i get "/lib/libpthread-2.7.so /lib/libpthread.so.0 /lib/tls/i686/cmov/libpthread-2.7.so /lib/tls/i686/cmov/libpthread.so.0 /usr/NX/lib/perl/include/bits/pthreadtypes.ph /usr/include/pthread.h /usr/include/bits/pthreadtypes.h /usr/lib/libgpgme-pthread.so.11 /usr/lib/libgpgme-pthread.so.11.6.4 /usr/lib/libpthread.a /usr/lib/libpthread.so /usr/lib/libpthread_nonshared.a /usr/lib/perl/5.8.8/bits/pthreadtypes.ph /usr/lib/xen/libpthread.a /usr/lib/xen/libpthread_nonshared.a /usr/share/man/man7/pthreads.7.gz " Am I doing something wrong? I'm using ubuntu 8.10 and i have installed allmost anything with "thread" as package name.. any help? ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-12-12 22:01 Message: Logged In: NO I meant fc6 or fc7, 32bit or 64bit ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=1849644&group_id=129981 |
From: SourceForge.net <no...@so...> - 2009-03-03 00:53:26
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=6601819 By: fraujansen1 all right! i know how thank u ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441304 |
From: SourceForge.net <no...@so...> - 2009-03-03 00:38:59
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=6601681 By: fraujansen1 compilation and installation and import of schema.sql ok but how to use it? thank u ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441304 |
From: SourceForge.net <no...@so...> - 2008-09-18 19:33:48
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5291607 By: ludvigm What mysqlfs version are you trying to compile? I can't see any reference to readline in 0.4.0-rc1 which is the latest one...? ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441303 |
From: SourceForge.net <no...@so...> - 2008-09-18 06:41:28
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5289212 By: nobody Hi, I can't get through configure, still mising readline in dependecies. Bellow is the summary: checking readline/readline.h usability... yes checking readline/readline.h presence... yes checking for readline/readline.h... yes checking for readline in -lreadline... no checking for readline in -lreadline (/install/seznamfs-0.2.3)... no checking for readline in -lreadline (/root/libs/lib)... no checking for readline in -lreadline (/root/cvs/libs/lib)... no checking for readline in -lreadline (/root/CVS/libs/lib)... no checking for readline in -lreadline (/usr/local/lib)... no configure: error: *** Cannot find readline library!!! *** [root@banshee ~]# locate readline /etc/php.d/readline.ini /usr/include/readline /usr/include/readline/chardefs.h /usr/include/readline/history.h /usr/include/readline/keymaps.h /usr/include/readline/readline.h /usr/include/readline/rlconf.h /usr/include/readline/rlstdc.h /usr/include/readline/rltypedefs.h /usr/include/readline/tilde.h /usr/lib64/libreadline.a /usr/lib64/libreadline.so /usr/lib64/libreadline.so.5 /usr/lib64/libreadline.so.5.1 /usr/lib64/php/modules/readline.so /usr/lib64/python2.4/lib-dynload/readline.so /usr/local/include/readline.h /usr/local/lib/libreadline.a /usr/local/lib/libreadline.so [root@banshee ~]# rpm -qa | grep readline php-readline-5.1.6-12.el5.centos readline-devel-5.1-1.1 readline-5.1-1.1 [root@banshee ~]# uname -a Linux banshee.miton.cz 2.6.18-53.1.14.el5xen #1 SMP Wed Mar 5 12:08:17 EST 2008 x86_64 x86_64 x86_64 GNU/Linux [root@banshee ~]# cat /etc/issue CentOS release 5 (Final) Kernel \r on an \m Am I missing someting? Would you give me some hint please? Thank you, Vit Bartunek ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441303 |
From: SourceForge.net <no...@so...> - 2008-09-06 09:24:28
|
Bugs item #2096705, was opened at 2008-09-06 09:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=2096705&group_id=129981 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: syntax error or argument missing in query.c Initial Comment: on compiling query.c, the compiler crashes because is waiting for the string "%lld" in a sprintf command, and after the string only 2 arguments are given (a long-typed one and an integer), so the format string is mistyped or an argument is missing. lines 235, 593 and 597 in file query.c ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=2096705&group_id=129981 |
From: Smart W. G. F. W. <f.w...@sm...> - 2008-04-07 23:17:39
|
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 |
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 |
From: Smart W. G. F. W. <f.w...@sm...> - 2008-04-05 21:40:45
|
-- MySQL dump 10.10 -- -- Host: localhost Database: mysqlfs -- ------------------------------------------------------ -- Server version 5.0.22-Debian_0ubuntu6.06.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `data` -- DROP TABLE IF EXISTS `data_blocks`; CREATE TABLE `data_blocks` ( `inode` bigint(20) NOT NULL, `seq` int unsigned not null, `data` blob , PRIMARY KEY (`inode`, `seq`) ) ENGINE=NDBCLUSTER DEFAULT CHARSET=binary; -- -- Table structure for table `inodes` -- DROP TABLE IF EXISTS `inodes`; CREATE TABLE `inodes` ( `inode` bigint(20) NOT NULL, `inuse` int(11) NOT NULL default '0', `deleted` tinyint(4) NOT NULL default '0', `mode` int(11) NOT NULL default '0', `uid` int(10) unsigned NOT NULL default '0', `gid` int(10) unsigned NOT NULL default '0', `atime` int(10) unsigned NOT NULL default '0', `mtime` int(10) unsigned NOT NULL default '0', `ctime` int(10) unsigned NOT NULL default '0', `size` bigint(20) NOT NULL default '0', PRIMARY KEY (`inode`), KEY `inode` (`inode`,`inuse`,`deleted`) ) ENGINE=NDBCLUSTER DEFAULT CHARSET=binary; /*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/; DELIMITER ;; /*!50003 SET SESSION SQL_MODE="" */;; /*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `drop_data` AFTER DELETE ON `inodes` FOR EACH ROW BEGIN DELETE FROM data_blocks WHERE inode=OLD.inode; END */;; DELIMITER ; /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */; -- -- Table structure for table `tree` -- SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS `tree`; CREATE TABLE `tree` ( `inode` int(10) unsigned NOT NULL auto_increment, `parent` int(10) unsigned, `name` varchar(255) NOT NULL, PRIMARY KEY `name` (`name`, `inode`), KEY `inode` (`inode`), KEY `parent` (`parent`) ) ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- 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 |
From: Smart W. G. F. W. <f.w...@sm...> - 2008-04-05 21:29:54
|
Hi list, now this code works well: diff -Nuar ../mysqlfs/query.c query.c --- ../mysqlfs/query.c 2008-04-04 20:33:32.000000000 +0200 +++ query.c 2008-04-05 18:24:17.000000000 +0200 @@ -27,6 +27,7 @@ #include "log.h" #define SQL_MAX 10240 +#define INODE_CACHE_MAX 4096 static inline int lock_inode(MYSQL *mysql, long inode) { @@ -64,11 +65,10 @@ char sql[SQL_MAX]; MYSQL_RES* result; MYSQL_ROW row; - -/* ret = query_inode_full(mysql, path, NULL, 0, &inode, NULL, &nlinks); + ret = query_inode_full(mysql, path, NULL, 0, &inode, NULL, &nlinks); if (ret < 0) return ret; -*/ + snprintf(sql, SQL_MAX, "SELECT inode, mode, uid, gid, atime, mtime " "FROM inodes WHERE inode=%ld", @@ -296,7 +296,7 @@ long new_inode_number = 0; char *name, esc_name[PATH_MAX * 2]; - if (path[0] == '/' && path[1] == '\0') { + if (path[0] == '/' && path[1] == '\0') { snprintf(sql, SQL_MAX, "INSERT INTO tree (name, parent) VALUES ('/', NULL)"); @@ -306,9 +306,9 @@ goto err_out; } else { name = strrchr(path, '/'); - if (!name || *++name == '\0') + if (!name || *++name == '\0') return -ENOENT; - + mysql_real_escape_string(mysql, esc_name, name, strlen(name)); snprintf(sql, SQL_MAX, "INSERT INTO tree (name, parent) VALUES ('%s', %ld)", @@ -919,6 +919,127 @@ int query_fsck(MYSQL *mysql) { - // See TODO file for what should be here... - return 0; + + /* + query_fsck by florian wiessner (f.w...@sm...) + */ + printf("Starting fsck\n"); + + // 1. delete inodes with deleted==1 + int ret; +// int ret2; + int result; + char sql[SQL_MAX]; + printf("Stage 1...\n"); + snprintf(sql, SQL_MAX, + "DELETE from inodes WHERE inodes.deleted = 1"); + + log_printf(LOG_D_SQL, "sql=%s\n", sql); + + ret = mysql_query(mysql, sql); + if(ret){ + log_printf(LOG_ERROR, "Error: mysql_query()\n"); + log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); + return -EIO; + } + // 2. - delete direntries without corresponding inode + printf("Stage 2...\n"); + snprintf(sql, SQL_MAX, "delete from tree where tree.inode not in (select inode from inodes);"); + + log_printf(LOG_D_SQL, "sql=%s\n", sql); + ret = mysql_query(mysql, sql); + + if(ret){ + log_printf(LOG_ERROR, "Error: mysql_query()\n"); + log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); + return -EIO; + } + + + + // 3. set inuse=0 for all inodes + printf("Stage 3...\n"); + snprintf(sql, SQL_MAX, "UPDATE inodes SET inuse=0;"); + + log_printf(LOG_D_SQL, "sql=%s\n", sql); + + ret = mysql_query(mysql, sql); + if(ret){ + log_printf(LOG_ERROR, "Error: mysql_query()\n"); + log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); + return -EIO; + } + + + // 4. delete data without existing inode + printf("Stage 4...\n"); + snprintf(sql, SQL_MAX, "delete from data_blocks where inode not in (select inode from inodes);"); + + log_printf(LOG_D_SQL, "sql=%s\n", sql); + + ret = mysql_query(mysql, sql); + if(ret){ + log_printf(LOG_ERROR, "Error: mysql_query()\n"); + log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); + return -EIO; + } + + + // 5. synchronize inodes.size=data.LENGTH(data) + printf("Stage 5...\n"); + long int inode; + long int size; + + snprintf(sql, SQL_MAX, "select inode, sum(OCTET_LENGTH(data)) as size from data_blocks group by inode"); + + log_printf(LOG_D_SQL, "sql=%s\n", sql); + + ret = mysql_query(mysql, sql); + + MYSQL_RES* myresult; + MYSQL_ROW row; + + myresult = mysql_store_result(mysql); + while ((row = mysql_fetch_row(myresult)) != NULL) { + inode = atol(row[0]); + size = atol(row[1]); + + snprintf(sql, SQL_MAX, "update inodes set size=%ld where inode=%ld;", size, inode); + log_printf(LOG_D_SQL, "sql=%s\n", sql); + result = mysql_query(mysql, sql); + +/* if (myresult) { // something has gone wrong.. delete datablocks... + + snprintf(sql, SQL_MAX, "delete from inodes where inode=%ld;", inode); + log_printf(LOG_D_SQL, "sql=%s\n", sql); + ret2 = mysql_query(mysql, sql); + + } +*/ // skip this for now! + + } + + if(ret){ + log_printf(LOG_ERROR, "Error: mysql_query()\n"); + log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); + return -EIO; + } + mysql_free_result(myresult); + +/* printf("optimizing tables\n"); + snprintf(sql, SQL_MAX, + "OPTIMIZE TABLE inodes;"); + + log_printf(LOG_D_SQL, "sql=%s\n", sql); + + ret = mysql_query(mysql, sql); + if(ret){ + log_printf(LOG_ERROR, "Error: mysql_query()\n"); + log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); + return -EIO; + } +*/ + printf("fsck done!\n"); + return ret; + } How can i submit this code to the cvs? -- 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 |
From: SourceForge.net <no...@so...> - 2008-01-19 09:37:31
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4730509 By: nobody Hello. Configure pass but make fails: $ LC_ALL=c make make all-am make[1]: Entering directory `/home/users/Arvenil/rpm/mysqlfs-0.4.0-rc1' if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -I/usr/include -Wall -Werror -I/usr/include/mysql -Wall -Werror -MT query.o -MD -MP -MF ".deps/query.Tpo" -c -o query.o query.c; \ then mv -f ".deps/query.Tpo" ".deps/query.Po"; else rm -f ".deps/query.Tpo"; exit 1; fi cc1: warnings being treated as errors query.c: In function 'query_truncate': query.c:235: warning: format '%lld' expects type 'long long int', but argument 4 has type 'off_t' query.c:235: warning: format '%lld' expects type 'long long int', but argument 4 has type 'off_t' query.c: In function 'write_one_block': query.c:593: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type 'off_t' query.c:593: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type 'off_t' query.c:597: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type 'long unsigned int' query.c:597: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type 'long unsigned int' make[1]: *** [query.o] Error 1 make[1]: Leaving directory `/home/users/Arvenil/rpm/mysqlfs-0.4.0-rc1' make: *** [all] Error 2 ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441304 |
From: SourceForge.net <no...@so...> - 2007-12-12 22:01:55
|
Bugs item #1849644, was opened at 2007-12-12 13:35 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=1849644&group_id=129981 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: configure pthread test failing Initial Comment: Trying to compile of fc7 or fc7 I get this output: checking for pthread_create in -lpthread... no configure: error: Please install pthreads library first. But it is installed with glibc-headers-2.6-4 and glibc-devel. I am unable to compile this on a modern Fedora distro! respond to: da...@ge... ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-12-12 14:01 Message: Logged In: NO I meant fc6 or fc7, 32bit or 64bit ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=1849644&group_id=129981 |
From: SourceForge.net <no...@so...> - 2007-12-12 21:35:21
|
Bugs item #1849644, was opened at 2007-12-12 13:35 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=1849644&group_id=129981 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: configure pthread test failing Initial Comment: Trying to compile of fc7 or fc7 I get this output: checking for pthread_create in -lpthread... no configure: error: Please install pthreads library first. But it is installed with glibc-headers-2.6-4 and glibc-devel. I am unable to compile this on a modern Fedora distro! respond to: da...@ge... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=1849644&group_id=129981 |
From: SourceForge.net <no...@so...> - 2007-11-30 11:25:04
|
Feature Requests item #1841631, was opened at 2007-11-30 03:25 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716428&aid=1841631&group_id=129981 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Compression Initial Comment: MySQL 5 supports compression of text and blob data. It would be nice to add transparent compression to the file system using this feature... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716428&aid=1841631&group_id=129981 |
From: SourceForge.net <no...@so...> - 2007-11-29 22:10:27
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4650665 By: ludvigm IIRC configure script is wrong in this test and what is actually missing is libmysql-dev (or what's the name of mysql headers and dev libs on debian). Make sure you have that installed as well as libfuse-dev and rerun configure. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441304 |
From: SourceForge.net <no...@so...> - 2007-11-29 12:52:17
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4649711 By: nobody actually, its configure that is complaining about pthread missing. build-essential is installed, still > ./configure ...snip... checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate appending configuration tag "F77" to libtool checking for pthread_create in -lpthread... no configure: error: Please install pthreads library first. thanks ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441304 |
From: SourceForge.net <no...@so...> - 2007-08-30 16:59:08
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4493121 By: nobody Hi all, Thanks for your work. It's a good idea. I've find a problem on using FUSE option such as "-oallow_other" etc. It seems that in function mysqlfs_opt_proc, the arg passed in when handling "-oallow_other" is just the string "allow_other". So when adding the option back to arg list, an "-o" prefix must be added. Otherwise fuse main will only get the argv[x]="allow_other" not "-oallow_other". And it the option will not be handled correctly by FUSE. Best regards, Richard ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441304 |
From: SourceForge.net <no...@so...> - 2007-08-13 18:29:26
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4462952 By: mores I can make folders in mysqlfs-0.4.0-rc1. Data fails: cp /home/smore/mysqlfs-0.4.0-rc1/README . cp: writing `./README': Input/output error 2007-08-13 14:25:54 7204 mysql_stmt_bind_param() failed: Using unsupported buffer type: 0 (parameter: 1) 2007-08-13 14:25:54 7204 Using unsupported buffer type: 0 (parameter: 1) vi also fails. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441304 |
From: SourceForge.net <no...@so...> - 2007-08-13 18:23:18
|
Feature Requests item #1773343, was opened at 2007-08-13 14:23 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716428&aid=1773343&group_id=129981 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stephen More (mores) Assigned to: Nobody/Anonymous (nobody) Summary: Improve usage Initial Comment: Usage should also contain: mysqlfs -osocket=/tmp/mysql5.sock -ouser=mysqlfs -opassword=password -odatabase=mysqlfs /var/mysqlfs ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716428&aid=1773343&group_id=129981 |
From: SourceForge.net <no...@so...> - 2007-08-13 18:14:34
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4462932 By: mores I am trying to install the schema from mysqlfs-0.4.0-rc1: $ mysql5 mysqlfs < schema.sql ERROR at line 51: DELIMITER must be followed by a 'delimiter' character or string ERROR 1064 (42000) at line 53: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441304 |
From: Michal L. <lu...@us...> - 2007-03-28 13:05:54
|
Update of /cvsroot/mysqlfs/mysqlfs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv452 Modified Files: ChangeLog configure.in mysqlfs.h query.c query.h schema.sql Log Message: 2007-03-29 Michal Ludvig <mi...@lo...> * Reworked data storage. Instead of one huge record for each file in table "data" we now store the data in 4kB chunks (a.k.a. "sectors" or "blocks"). That speeds up especially updates to files a _lot_ :-) As a side effect it allows for storing "sparse" files. CAUTION: database schema has changed in this version! Index: query.h =================================================================== RCS file: /cvsroot/mysqlfs/mysqlfs/query.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** query.h 23 Sep 2006 09:29:44 -0000 1.8 --- query.h 28 Mar 2007 13:05:48 -0000 1.9 *************** *** 8,11 **** --- 8,19 ---- */ + struct data_blocks_info { + unsigned long seq_first, /* Sequence ID of 1st and last block. */ + seq_last; + size_t length_first, /* Length of data for reading / writing. */ + length_last; + off_t offset_first; /* Offset in 1st block. */ + }; + long query_inode(MYSQL *mysql, const char* path); int query_inode_full(MYSQL *mysql, const char* path, char *name, size_t name_len, *************** *** 30,34 **** int query_chown(MYSQL *mysql, long inode, uid_t uid, gid_t gid); int query_utime(MYSQL *mysql, long inode, struct utimbuf *time); ! size_t query_size(MYSQL *mysql, long inode); int query_inuse_inc(MYSQL *mysql, long inode, int increment); --- 38,44 ---- int query_chown(MYSQL *mysql, long inode, uid_t uid, gid_t gid); int query_utime(MYSQL *mysql, long inode, struct utimbuf *time); ! ! ssize_t query_size(MYSQL *mysql, long inode); ! ssize_t query_size_block(MYSQL *mysql, long inode, unsigned long seq); int query_inuse_inc(MYSQL *mysql, long inode, int increment); Index: configure.in =================================================================== RCS file: /cvsroot/mysqlfs/mysqlfs/configure.in,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** configure.in 2 Oct 2006 22:34:03 -0000 1.8 --- configure.in 28 Mar 2007 13:05:48 -0000 1.9 *************** *** 34,43 **** FUSE_CFLAGS="-I${FUSE_INC_DIR}" LDFLAGS="$LDFLAGS $FUSE_LDFLAGS" ! CFLAGS="$LDFLAGS $FUSE_CFLAGS" MYSQL_CONFIG=$(which mysql_config) if test "$MYSQL_CONFIG"; then MYSQL_LDFLAGS=$(${MYSQL_CONFIG} --libs_r) ! MYSQL_CFLAGS=$(${MYSQL_CONFIG} --cflags) else for i in /usr/local/mysql /usr/local /usr; do --- 34,43 ---- FUSE_CFLAGS="-I${FUSE_INC_DIR}" LDFLAGS="$LDFLAGS $FUSE_LDFLAGS" ! CFLAGS="$CFLAGS $FUSE_CFLAGS" MYSQL_CONFIG=$(which mysql_config) if test "$MYSQL_CONFIG"; then MYSQL_LDFLAGS=$(${MYSQL_CONFIG} --libs_r) ! MYSQL_CFLAGS=$(${MYSQL_CONFIG} --include) else for i in /usr/local/mysql /usr/local /usr; do Index: schema.sql =================================================================== RCS file: /cvsroot/mysqlfs/mysqlfs/schema.sql,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** schema.sql 23 Sep 2006 09:29:44 -0000 1.5 --- schema.sql 28 Mar 2007 13:05:48 -0000 1.6 *************** *** 20,28 **** -- ! DROP TABLE IF EXISTS `data`; ! CREATE TABLE `data` ( `inode` bigint(20) NOT NULL, ! `data` longblob NOT NULL, ! PRIMARY KEY (`inode`) ) ENGINE=MyISAM DEFAULT CHARSET=binary; --- 20,29 ---- -- ! DROP TABLE IF EXISTS `data_blocks`; ! CREATE TABLE `data_blocks` ( `inode` bigint(20) NOT NULL, ! `seq` int unsigned not null, ! `data` blob , ! PRIMARY KEY (`inode`, `seq`) ) ENGINE=MyISAM DEFAULT CHARSET=binary; *************** *** 50,54 **** DELIMITER ;; /*!50003 SET SESSION SQL_MODE="" */;; ! /*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `drop_data` AFTER DELETE ON `inodes` FOR EACH ROW BEGIN DELETE FROM data WHERE inode=OLD.inode; END */;; DELIMITER ; --- 51,55 ---- DELIMITER ;; /*!50003 SET SESSION SQL_MODE="" */;; ! /*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `drop_data` AFTER DELETE ON `inodes` FOR EACH ROW BEGIN DELETE FROM data_blocks WHERE inode=OLD.inode; END */;; DELIMITER ; Index: query.c =================================================================== RCS file: /cvsroot/mysqlfs/mysqlfs/query.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** query.c 23 Sep 2006 09:29:44 -0000 1.15 --- query.c 28 Mar 2007 13:05:48 -0000 1.16 *************** *** 2,5 **** --- 2,6 ---- mysqlfs - MySQL Filesystem Copyright (C) 2006 Tsukasa Hamano <co...@cu...> + Copyright (C) 2006,2007 Michal Ludvig <mi...@lo...> $Id$ *************** *** 28,31 **** --- 29,61 ---- #define SQL_MAX 10240 + static inline int lock_inode(MYSQL *mysql, long inode) + { + // TODO + return 0; + } + + static inline int unlock_inode(MYSQL *mysql, long inode) + { + // TODO + return 0; + } + + static struct data_blocks_info * + fill_data_blocks_info(struct data_blocks_info *info, size_t size, off_t offset) + { + info->seq_first = offset / DATA_BLOCK_SIZE; + info->offset_first = offset % DATA_BLOCK_SIZE; + + unsigned long nr_following_blocks = ((info->offset_first + size) / DATA_BLOCK_SIZE); + info->length_first = nr_following_blocks > 0 ? DATA_BLOCK_SIZE - info->offset_first : size; + + info->seq_last = info->seq_first + nr_following_blocks; + info->length_last = (info->offset_first + size) % DATA_BLOCK_SIZE; + /* offset in last block (if it's a different one from the first block) + * is always 0 */ + + return info; + } + int query_getattr(MYSQL *mysql, const char *path, struct stat *stbuf) { *************** *** 122,126 **** depth+1, depth+1, depth, sql_from, sql_where); ! log_printf(LOG_D_OTHER, "SQL=%s\n", sql); ret = mysql_query(mysql, sql); if(ret){ --- 152,156 ---- depth+1, depth+1, depth, sql_from, sql_where); ! log_printf(LOG_D_SQL, "sql=%s\n", sql); ret = mysql_query(mysql, sql); if(ret){ *************** *** 178,181 **** --- 208,214 ---- int ret; char sql[SQL_MAX]; + struct data_blocks_info info; + + fill_data_blocks_info(&info, length, 0); long inode = query_inode(mysql, path); *************** *** 183,198 **** return inode; snprintf(sql, SQL_MAX, ! "UPDATE inodes LEFT JOIN data ON inodes.inode = data.inode SET data=RPAD(data, %lld, '\\0'), size=%lld WHERE inodes.inode=%ld", ! length, length, inode); log_printf(LOG_D_SQL, "sql=%s\n", sql); ! ret = mysql_query(mysql, sql); ! if(ret) ! goto err_out; return 0; err_out: log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); return ret; --- 216,246 ---- return inode; + lock_inode(mysql, inode); + snprintf(sql, SQL_MAX, ! "DELETE FROM data_blocks WHERE inode=%ld AND seq > %ld", ! inode, info.seq_last); log_printf(LOG_D_SQL, "sql=%s\n", sql); + if ((ret = mysql_query(mysql, sql))) goto err_out; ! snprintf(sql, SQL_MAX, ! "UPDATE data_blocks SET data=RPAD(data, %zu, '\\0') " ! "WHERE inode=%ld AND seq=%ld", ! info.length_last, inode, info.seq_last); ! log_printf(LOG_D_SQL, "sql=%s\n", sql); ! if ((ret = mysql_query(mysql, sql))) goto err_out; ! ! snprintf(sql, SQL_MAX, ! "UPDATE inodes SET size=%lld WHERE inode=%ld", ! length, inode); ! log_printf(LOG_D_SQL, "sql=%s\n", sql); ! if ((ret = mysql_query(mysql, sql))) goto err_out; ! ! unlock_inode(mysql, inode); return 0; err_out: + unlock_inode(mysql, inode); log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); return ret; *************** *** 287,299 **** goto err_out; - if (alloc_data) { - snprintf(sql, SQL_MAX, - "INSERT INTO data SET inode=%ld", new_inode_number); - - log_printf(LOG_D_SQL, "sql=%s\n", sql); - ret = mysql_query(mysql, sql); - if (ret) - goto err_out; - } return new_inode_number; --- 335,338 ---- *************** *** 419,427 **** MYSQL_RES* result; MYSQL_ROW row; ! unsigned long length; snprintf(sql, SQL_MAX, ! "SELECT SUBSTRING(data, %lld, %d) FROM data WHERE inode=%ld", ! offset + 1, size, inode); log_printf(LOG_D_SQL, "sql=%s\n", sql); --- 458,472 ---- MYSQL_RES* result; MYSQL_ROW row; ! unsigned long length = 0L, copy_len, seq; ! struct data_blocks_info info; ! char *dst = (char *)buf; ! char *src, *zeroes = alloca(DATA_BLOCK_SIZE); ! ! fill_data_blocks_info(&info, size, offset); + /* Read all required blocks */ snprintf(sql, SQL_MAX, ! "SELECT seq, data, LENGTH(data) FROM data_blocks WHERE inode=%ld AND seq>=%lu AND seq <=%lu ORDER BY seq ASC", ! inode, info.seq_first, info.seq_last); log_printf(LOG_D_SQL, "sql=%s\n", sql); *************** *** 441,458 **** } ! if(mysql_num_rows(result) != 1 && mysql_num_fields(result) != 1){ ! mysql_free_result(result); ! return -EIO; ! } ! row = mysql_fetch_row(result); ! if(!row){ ! mysql_free_result(result); ! return -EIO; } - - length = mysql_fetch_lengths(result)[0]; - memcpy((void*)buf, row[0], length); mysql_free_result(result); --- 486,530 ---- } ! /* This is a bit tricky as we support 'sparse' files now. ! * It means not all requested blocks must exist in the ! * database. For those that don't exist we'll return ! * a block of \0 instead. */ row = mysql_fetch_row(result); ! memset(zeroes, 0L, DATA_BLOCK_SIZE); ! for (seq = info.seq_first; seq<=info.seq_last; seq++) { ! off_t row_seq = -1; ! size_t row_len = DATA_BLOCK_SIZE; ! char *data = zeroes; ! ! if (row && (row_seq = atoll(row[0])) == seq) { ! data = row[1]; ! row_len = atoll(row[2]); ! } ! ! if (seq == info.seq_first) { ! if (row_len < info.offset_first) ! goto go_away; ! ! copy_len = MIN(row_len - info.offset_first, info.length_first); ! src = data + info.offset_first; ! } else if (seq == info.seq_last) { ! copy_len = MIN(info.length_last, row_len); ! src = data; ! } else { ! copy_len = MIN(DATA_BLOCK_SIZE, row_len); ! src = data; ! } ! ! memcpy(dst, src, copy_len); ! dst += copy_len; ! length += copy_len; ! ! if (row && row_seq == seq) ! row = mysql_fetch_row(result); } + go_away: + /* Read all remaining rows */ + while (mysql_fetch_row(result)); mysql_free_result(result); *************** *** 460,470 **** } ! int query_write(MYSQL *mysql, long inode, const char *data, size_t size, ! off_t offset) { MYSQL_STMT *stmt; MYSQL_BIND bind[1]; char sql[SQL_MAX]; ! size_t current_size = query_size(mysql, inode); stmt = mysql_stmt_init(mysql); --- 532,568 ---- } ! static int write_one_block(MYSQL *mysql, long inode, ! unsigned long seq, ! const char *data, size_t size, ! off_t offset) { MYSQL_STMT *stmt; MYSQL_BIND bind[1]; char sql[SQL_MAX]; ! size_t current_block_size = query_size_block(mysql, inode, seq); ! ! /* Shortcut */ ! if (size == 0) return 0; ! ! if (offset + size > DATA_BLOCK_SIZE) { ! log_printf(LOG_ERROR, "%s(): offset(%zu)+size(%zu)>max_block(%d)\n", ! __func__, offset, size, DATA_BLOCK_SIZE); ! return -EIO; ! } ! ! /* We expect the inode is already locked for this thread by caller! */ ! ! if (current_block_size == -ENXIO) { ! /* This data block has not yet been allocated */ ! snprintf(sql, SQL_MAX, ! "INSERT INTO data_blocks SET inode=%ld, seq=%lu, data=''", inode, seq); ! log_printf(LOG_D_SQL, "sql=%s\n", sql); ! if(mysql_query(mysql, sql)){ ! log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); ! return -EIO; ! } ! ! current_block_size = query_size_block(mysql, inode, seq); ! } stmt = mysql_stmt_init(mysql); *************** *** 476,500 **** memset(bind, 0, sizeof(bind)); ! if (offset == 0 && current_size == 0) { snprintf(sql, SQL_MAX, ! "UPDATE inodes LEFT JOIN data ON inodes.inode = data.inode SET data=?, size=%zu WHERE inodes.inode=%ld", size, inode); ! } else if (offset == current_size) { snprintf(sql, sizeof(sql), ! "UPDATE inodes LEFT JOIN data ON inodes.inode = data.inode SET data=CONCAT(data, ?), size=size+%zu WHERE inodes.inode=%ld", size, inode); } else { size_t pos, new_size; pos = snprintf(sql, sizeof(sql), ! "UPDATE inodes LEFT JOIN data ON inodes.inode = data.inode SET data=CONCAT("); if (offset > 0) pos += snprintf(sql + pos, sizeof(sql) - pos, "RPAD(IF(ISNULL(data),'', data), %llu, '\\0'),", offset); pos += snprintf(sql + pos, sizeof(sql) - pos, "?,"); new_size = offset + size; ! if (offset + size < current_size) { pos += snprintf(sql + pos, sizeof(sql) - pos, "SUBSTRING(data FROM %llu),", offset + size + 1); ! new_size = current_size; } sql[--pos] = '\0'; /* Remove the trailing comma. */ ! pos += snprintf(sql + pos, sizeof(sql) - pos, "), size=%zu WHERE inodes.inode=%ld", ! new_size, inode); } log_printf(LOG_D_SQL, "sql=%s\n", sql); --- 574,604 ---- memset(bind, 0, sizeof(bind)); ! if (offset == 0 && current_block_size == 0) { snprintf(sql, SQL_MAX, ! "UPDATE data_blocks " ! "SET data=? " ! "WHERE inode=%ld AND seq=%lu", ! inode, seq); ! } else if (offset == current_block_size) { snprintf(sql, sizeof(sql), ! "UPDATE data_blocks " ! "SET data=CONCAT(data, ?) " ! "WHERE inode=%ld AND seq=%lu", ! inode, seq); } else { size_t pos, new_size; pos = snprintf(sql, sizeof(sql), ! "UPDATE data_blocks SET data=CONCAT("); if (offset > 0) pos += snprintf(sql + pos, sizeof(sql) - pos, "RPAD(IF(ISNULL(data),'', data), %llu, '\\0'),", offset); pos += snprintf(sql + pos, sizeof(sql) - pos, "?,"); new_size = offset + size; ! if (offset + size < current_block_size) { pos += snprintf(sql + pos, sizeof(sql) - pos, "SUBSTRING(data FROM %llu),", offset + size + 1); ! new_size = current_block_size; } sql[--pos] = '\0'; /* Remove the trailing comma. */ ! pos += snprintf(sql + pos, sizeof(sql) - pos, ") WHERE inode=%ld AND seq=%lu", ! inode, seq); } log_printf(LOG_D_SQL, "sql=%s\n", sql); *************** *** 512,516 **** bind[0].buffer= (char *)data; bind[0].is_null= 0; ! bind[0].length= (unsigned long *)&size; if (mysql_stmt_bind_param(stmt, bind)) { --- 616,620 ---- bind[0].buffer= (char *)data; bind[0].is_null= 0; ! bind[0].length= (unsigned long *)(void *)&size; if (mysql_stmt_bind_param(stmt, bind)) { *************** *** 534,537 **** --- 638,656 ---- log_printf(LOG_ERROR, "failed closing the statement: %s\n", mysql_stmt_error(stmt)); + /* Update file size */ + snprintf(sql, SQL_MAX, + "UPDATE inodes SET size=(" + "SELECT seq*%d + LENGTH(data) FROM data_blocks WHERE inode=%ld AND seq=(" + "SELECT MAX(seq) FROM data_blocks WHERE inode=%ld" + ")" + ") " + "WHERE inode=%ld", + DATA_BLOCK_SIZE, inode, inode, inode); + log_printf(LOG_D_SQL, "sql=%s\n", sql); + if(mysql_query(mysql, sql)) { + log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); + return -EIO; + } + return size; *************** *** 543,547 **** } ! size_t query_size(MYSQL *mysql, long inode) { size_t ret; --- 662,715 ---- } ! int query_write(MYSQL *mysql, long inode, const char *data, size_t size, ! off_t offset) ! { ! struct data_blocks_info info; ! unsigned long seq; ! const char *ptr; ! int ret, ret_size = 0; ! ! fill_data_blocks_info(&info, size, offset); ! ! /* Handle first block */ ! lock_inode(mysql, inode); ! ret = write_one_block(mysql, inode, info.seq_first, data, ! info.length_first, info.offset_first); ! unlock_inode(mysql, inode); ! if (ret < 0) ! return ret; ! ret_size = ret; ! ! /* Shortcut - if last block seq is the same as first block ! * seq simply go away as it's the same block */ ! if (info.seq_first == info.seq_last) ! return ret_size; ! ! ptr = data + info.length_first; ! ! /* Handle all full-sized intermediate blocks */ ! for (seq = info.seq_first + 1; seq < info.seq_last; seq++) { ! lock_inode(mysql, inode); ! ret = write_one_block(mysql, inode, seq, ptr, DATA_BLOCK_SIZE, 0); ! unlock_inode(mysql, inode); ! if (ret < 0) ! return ret; ! ptr += DATA_BLOCK_SIZE; ! ret_size += ret; ! } ! ! /* Handle last block */ ! lock_inode(mysql, inode); ! ret = write_one_block(mysql, inode, info.seq_last, ptr, ! info.length_last, 0); ! unlock_inode(mysql, inode); ! if (ret < 0) ! return ret; ! ret_size += ret; ! ! return ret_size; ! } ! ! ssize_t query_size(MYSQL *mysql, long inode) { size_t ret; *************** *** 556,560 **** if(ret){ log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); ! return -1; } log_printf(LOG_D_SQL, "sql=%s\n", sql); --- 724,728 ---- if(ret){ log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); ! return -EIO; } log_printf(LOG_D_SQL, "sql=%s\n", sql); *************** *** 564,578 **** log_printf(LOG_ERROR, "ERROR: mysql_store_result()\n"); log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); ! return -1; } ! if(mysql_num_rows(result) != 1 && mysql_num_fields(result) != 1){ mysql_free_result(result); ! return -1; } row = mysql_fetch_row(result); if(!row){ ! return -1; } --- 732,790 ---- log_printf(LOG_ERROR, "ERROR: mysql_store_result()\n"); log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); ! return -EIO; } ! if(mysql_num_rows(result) != 1 || mysql_num_fields(result) != 1){ mysql_free_result(result); ! return -EIO; } row = mysql_fetch_row(result); if(!row){ ! return -EIO; ! } ! ! if(row[0]){ ! ret = atoll(row[0]); ! }else{ ! ret = 0; ! } ! mysql_free_result(result); ! ! return ret; ! } ! ! ssize_t query_size_block(MYSQL *mysql, long inode, unsigned long seq) ! { ! size_t ret; ! char sql[SQL_MAX]; ! MYSQL_RES *result; ! MYSQL_ROW row; ! ! snprintf(sql, SQL_MAX, "SELECT LENGTH(data) FROM data_blocks WHERE inode=%ld AND seq=%lu", ! inode, seq); ! ! ret = mysql_query(mysql, sql); ! if(ret){ ! log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); ! return -EIO; ! } ! log_printf(LOG_D_SQL, "sql=%s\n", sql); ! ! result = mysql_store_result(mysql); ! if(!result){ ! log_printf(LOG_ERROR, "ERROR: mysql_store_result()\n"); ! log_printf(LOG_ERROR, "mysql_error: %s\n", mysql_error(mysql)); ! return -EIO; ! } ! ! if(mysql_num_rows(result) == 0) { ! mysql_free_result(result); ! return -ENXIO; ! } ! ! row = mysql_fetch_row(result); ! if(!row){ ! return -EIO; } Index: ChangeLog =================================================================== RCS file: /cvsroot/mysqlfs/mysqlfs/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ChangeLog 2 Oct 2006 22:34:03 -0000 1.15 --- ChangeLog 28 Mar 2007 13:05:48 -0000 1.16 *************** *** 1,2 **** --- 1,11 ---- + 2007-03-29 Michal Ludvig <mi...@lo...> + + * Reworked data storage. Instead of one huge record + for each file in table "data" we now store the data + in 4kB chunks (a.k.a. "sectors" or "blocks"). That + speeds up especially updates to files a _lot_ :-) + As a side effect it allows for storing "sparse" files. + CAUTION: database schema has changed in this version! + 2006-10-03 Michal Ludvig <mi...@lo...> Index: mysqlfs.h =================================================================== RCS file: /cvsroot/mysqlfs/mysqlfs/mysqlfs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mysqlfs.h 4 Sep 2006 11:43:29 -0000 1.2 --- mysqlfs.h 28 Mar 2007 13:05:48 -0000 1.3 *************** *** 10,13 **** --- 10,15 ---- #define PATH_MAX 1024 + #define DATA_BLOCK_SIZE 4096 + #define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MAX(a,b) ((a) > (b) ? (a) : (b)) |
From: SourceForge.net <no...@so...> - 2007-03-15 16:23:34
|
Bugs item #1681567, was opened at 2007-03-15 09:23 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=1681567&group_id=129981 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: After copy the file is changed. Initial Comment: Hello, I'm working with mysqlfs, and very interested. It could be a backup-back-end. But now I run into some problems: after I mount it (with root privileges!) I've got a mountpoint: mysqlfs on /tmp/mysqlfs type fuse (rw,nosuid,nodev) Now I copy a file to it: cp ~/download/linux-2.6.20.2.tar.bz2 /tmp/mysqlfs this goes fine. But now I want to unpack it: cd /tmp tar -xvf mysqlfs/linux-2.6.20.2.tar.bz2 I get the error: tar: This does not look like a tar archive tar: Skipping to the next header tar: Archive contains obsolescent base-64 headers tar: Error exit delayed from previous error Now this is not ok. Then I do: diff ~/download/linux-2.6.20.2.tar.bz2 \ mysqlfs/linux-2.6.20.2.tar.bz2 Binary files differ. How is this possible? Is this a new error or....? Stef Bon ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=1681567&group_id=129981 |
From: SourceForge.net <no...@so...> - 2006-12-10 23:56:31
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4052691 By: ludvigm Do you have glibc-dev installed? Easiest way should be "apt-get install build-essential". ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441304 |
From: SourceForge.net <no...@so...> - 2006-12-09 19:18:22
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4051685 By: nobody In Debian Sarge, Configure stops with the following message --------------------------------------------------------- appending configuration tag "F77" to libtool checking for pthread_create in -lpthread... no configure: error: Please install pthreads library first. ----------------------------------------------------------- I could not figure out how to install pthreads library for Debian. apt-cache search - did not yield anything. but there is a man page document for pthread_create. seems to be part of standard libc library - valli ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=441304 |
From: SourceForge.net <no...@so...> - 2006-10-02 22:50:55
|
Support Requests item #1569375, was opened at 2006-10-03 04:49 Message generated for change (Comment added) made by ludvigm You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716426&aid=1569375&group_id=129981 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Install Problem (example) Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Furio Azzolini (amuro) Assigned to: Nobody/Anonymous (nobody) Summary: Missing Schema Initial Comment: Release 0.3 lacks schema.sql from archive. After succesfully compiling the source, I was not able to follow the installation instructions. The schema changed from 0.2, so the old schema.sql included in the previous release is useless. ---------------------------------------------------------------------- >Comment By: Michal Ludvig (ludvigm) Date: 2006-10-03 11:50 Message: Logged In: YES user_id=344740 Released mysqlfs-0.3.1 with the schema.sql file included. Thanks for the report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716426&aid=1569375&group_id=129981 |