Revision: 14321 Author: adrian.chadd Date: Sun Oct 18 10:06:06 2009 Log: Begin building a generic logfile writer helper.
Part of the COSS logging work requires some asynchronous writing process to handle generating the COSS swaplog, asynchronous fsync, asynchronous close, asynchronous rotate and asynchronous object deletion. I thought about implementing this by extending the async disk IO mechanism in Lusca but I'd have to implement some new async calls (directory reading, fsync, rename, unlink, etc) and also delay calling aioClose() on a file descriptor until all the pending blocks were written. This is .. quite horrible. Instead, the plan is to implement a generic logfile writer helper, based loosely around the logfile daemon stuff I wrote a while ago, which will handle all of the above via the Lusca IPC mechanisms. The COSS store code can then simply open the helper and write a sequence of changes (logfile entries, commands such as close, sync, rotate, etc) to the helper. The main difference between this helper and the logfile-daemon code that currently exists is that the logfile daemon code doesn't handle binary data. This will have to. I'd like to eventually shuffle the logfile daemon code to use this library. http://code.google.com/p/lusca-cache/source/detail?r=14321 Added: /branches/LUSCA_HEAD/libloghelper /branches/LUSCA_HEAD/libloghelper/Makefile.am /branches/LUSCA_HEAD/libloghelper/loghelper.c /branches/LUSCA_HEAD/libloghelper/writelog-daemon.c Modified: /branches/LUSCA_HEAD/Makefile.am /branches/LUSCA_HEAD/configure.in /branches/LUSCA_HEAD/src/Makefile.am ======================================= --- /dev/null +++ /branches/LUSCA_HEAD/libloghelper/Makefile.am Sun Oct 18 10:06:06 2009 @@ -0,0 +1,4 @@ + +libexec_PROGRAMS = writelog-daemon +libloghelper_a_SOURCES = loghelper.c +noinst_LIBRARIES = libloghelper.a ======================================= --- /dev/null +++ /branches/LUSCA_HEAD/libloghelper/writelog-daemon.c Sun Oct 18 10:06:06 2009 @@ -0,0 +1,8 @@ +#include <stdio.h> +#include <stdlib.h> + +int +main(int argc, const char *argv[]) +{ + exit(0); +} ======================================= --- /branches/LUSCA_HEAD/Makefile.am Tue Apr 21 01:55:28 2009 +++ /branches/LUSCA_HEAD/Makefile.am Sun Oct 18 10:06:06 2009 @@ -4,8 +4,8 @@ # AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 -DIST_SUBDIRS = lib libcore libmem libsqname libcb libiapp libstat libhttp libsqdns libsqident libsqinet libhelper libmime libsqdebug libstmem libasyncio libsqtlv libsqstore snmplib scripts src icons errors contrib doc helpers tools app -SUBDIRS = lib libcore libmem libsqname libcb libiapp libstat libhttp libsqdns libsqident libsqinet libhelper libmime libsqdebug libstmem libasyncio libsqtlv libsqstore @makesnmplib@ scripts src icons errors doc helpers tools app +DIST_SUBDIRS = lib libcore libmem libsqname libcb libiapp libstat libhttp libsqdns libsqident libsqinet libhelper libmime libsqdebug libstmem libasyncio libsqtlv libsqstore libloghelper snmplib scripts src icons errors contrib doc helpers tools app +SUBDIRS = lib libcore libmem libsqname libcb libiapp libstat libhttp libsqdns libsqident libsqinet libhelper libmime libsqdebug libstmem libasyncio libsqtlv libsqstore libloghelper @makesnmplib@ scripts src icons errors doc helpers tools app DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]* DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'` ======================================= --- /branches/LUSCA_HEAD/configure.in Thu Oct 15 16:08:35 2009 +++ /branches/LUSCA_HEAD/configure.in Sun Oct 18 10:06:06 2009 @@ -3278,6 +3278,7 @@ app/ufs_rebuild/Makefile \ app/ufs_newfs/Makefile \ app/tcptest/Makefile \ + libloghelper/Makefile \ libsqstore/Makefile \ libsqtlv/Makefile \ libmime/Makefile \ ======================================= --- /branches/LUSCA_HEAD/src/Makefile.am Thu Oct 15 16:08:35 2009 +++ /branches/LUSCA_HEAD/src/Makefile.am Sun Oct 18 10:06:06 2009 @@ -236,6 +236,7 @@ -L../libasyncio \ -L../libsqtlv \ -L../libsqstore \ + -L../libloghelper \ @XTRA_OBJS@ \ @REPL_OBJS@ \ @STORE_OBJS@ \ @@ -246,6 +247,7 @@ @LIB_MALLOC@ \ @SSLLIB@ \ @LIB_EPOLL@ \ + -lloghelper \ -lsqstore \ -lsqtlv \ -lasyncio \ @@ -301,7 +303,7 @@ data_DATA = \ mib.txt -LDADD = -L../lib -L../libcore -L../libsqdebug -L../libmem -L../libsqname -L../libcb -L../libhelper -L../libmime -L../libstmem -L../libiapp -L../libhttp -L../libstat -L../libsqdns -L../libsqident -L../libsqinet -L../libasyncio -L../libsqtlv -L../libsqstore -lsqstore -lsqtlv -lasyncio -lsqinet -lsqdns -lsqdebug -lcore -lmem -lsqname -lcb -lsqident -lhelper -lmime -lstmem -liapp -lhttp -lstat -lmiscutil @XTRA_LIBS@ +LDADD = -L../lib -L../libcore -L../libsqdebug -L../libmem -L../libsqname -L../libcb -L../libhelper -L../libmime -L../libstmem -L../libiapp -L../libhttp -L../libstat -L../libsqdns -L../libsqident -L../libsqinet -L../libasyncio -L../libsqtlv -L../libsqstore -L../libloghelper -lloghelper -lsqstore -lsqtlv -lasyncio -lsqinet -lsqdns -lsqdebug -lcore -lmem -lsqname -lcb -lsqident -lhelper -lmime -lstmem -liapp -lhttp -lstat -lmiscutil @XTRA_LIBS@ EXTRA_DIST = \ cf_gen_defines \ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "lusca-commit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/lusca-commit?hl=en -~----------~----~----~----~------~----~------~--~---
