X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=bfile%2Fmfile.c;h=674687afb0ad8f2bede38ae3728b56a933ab4c54;hp=2295d111f1ded310d8a7072515a93c7226c4478b;hb=a5c8c78e8671af863fc61b2ad8b24f92f827f7b2;hpb=89d3a004b7c651fd5673abfc192e1472dc4d4197 diff --git a/bfile/mfile.c b/bfile/mfile.c index 2295d11..674687a 100644 --- a/bfile/mfile.c +++ b/bfile/mfile.c @@ -1,8 +1,5 @@ -/* $Id: mfile.c,v 1.74 2007-01-15 15:10:14 adam Exp $ - Copyright (C) 1995-2007 - Index Data ApS - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + Copyright (C) 1994-2011 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -20,6 +17,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif #include #include #ifdef WIN32 @@ -366,6 +366,7 @@ MFile mf_open(MFile_area ma, const char *name, int block_size, int wflag) yaz_log(YLOG_WARN, "metafile %s already open", name); return 0; } + break; } if (!mnew) { @@ -542,6 +543,13 @@ int mf_write(MFile mf, zint no, int offset, int nbytes, const void *buf) { yaz_log(YLOG_FATAL, "mf_write: %s error (4) no more space", mf->name); + for (dp = mf->ma->dirs; dp ; dp = dp->next) { + yaz_log(YLOG_FATAL,"%s: max=" ZINT_FORMAT + " used=" ZINT_FORMAT " available=" ZINT_FORMAT, + dp->name, (zint)dp->max_bytes, + (zint)(dp->max_bytes - dp->avail_bytes), (zint)dp->avail_bytes ); + } + yaz_log(YLOG_FATAL,"Adjust the limits in your zebra.cfg"); ret = -1; goto out; } @@ -624,6 +632,7 @@ int mf_area_directory_stat(MFile_area ma, int no, const char **directory, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab