INN commit: trunk/storage/tradindexed (tdx-data.c tdx-group.c)
INN Commit
Russ_Allbery at isc.org
Mon May 18 03:59:10 UTC 2009
Date: Sunday, May 17, 2009 @ 20:59:10
Author: eagle
Revision: 8476
Minor coding style fixes in the tradindexed code.
Modified:
trunk/storage/tradindexed/tdx-data.c
trunk/storage/tradindexed/tdx-group.c
-------------+
tdx-data.c | 16 ++++++++--------
tdx-group.c | 10 ++++++----
2 files changed, 14 insertions(+), 12 deletions(-)
Modified: tdx-data.c
===================================================================
--- tdx-data.c 2009-05-17 20:30:23 UTC (rev 8475)
+++ tdx-data.c 2009-05-18 03:59:10 UTC (rev 8476)
@@ -421,8 +421,7 @@
struct index_entry *entry;
ARTNUM offset;
- if ((article > data->high && high > data->high)
- || data->remapoutoforder){
+ if ((article > data->high && high > data->high) || data->remapoutoforder) {
unmap_index(data);
map_index(data);
data->high = high;
@@ -461,8 +460,7 @@
if (end < start)
return NULL;
- if ((end > data->high && high > data->high)
- || data->remapoutoforder) {
+ if ((end > data->high && high > data->high) || data->remapoutoforder) {
unmap_index(data);
map_index(data);
unmap_data(data);
@@ -521,11 +519,13 @@
/* There is a small chance that remapping the data file could make this
offset accessible, but changing the memory location in the middle of
- a search conflicts with our OVSTATICSEARCH. And it seems not to
- be an issue in limited testing, although write caching that leads to
- on-disk IDX and DAT being out of sync could trigger a problem here. */
+ a search conflicts with what we return for OVSTATICSEARCH. And it
+ seems not to be an issue in limited testing, although write caching
+ that leads to on-disk IDX and DAT being out of sync could trigger a
+ problem here. */
if (entry->offset + entry->length > search->data->datalen) {
- warn("Invalid or inaccessible entry for article %lu in %s.IDX: offset %lu length %lu datalength %lu",
+ warn("Invalid or inaccessible entry for article %lu in %s.IDX:"
+ " offset %lu length %lu datalength %lu",
search->current + search->data->base, search->data->path,
(unsigned long) entry->offset, (unsigned long) entry->length,
(unsigned long) search->data->datalen);
Modified: tdx-group.c
===================================================================
--- tdx-group.c 2009-05-17 20:30:23 UTC (rev 8475)
+++ tdx-group.c 2009-05-18 03:59:10 UTC (rev 8476)
@@ -838,12 +838,14 @@
entry->low = article->number;
if (entry->high < article->number)
entry->high = article->number;
- /* Used to know that we have to remap the data file owing to
- * our OVSTATICSEARCH (an article whose number is lower than
- * the highest has been added at the end of the file). */
+ entry->count++;
+
+ /* Used to know that we have to remap the data file owing to our
+ OVSTATICSEARCH (an article whose number is lower than the highest has
+ been added at the end of the file). */
if (data->high > article->number)
data->remapoutoforder = true;
- entry->count++;
+
inn_msync_page(entry, sizeof(*entry), MS_ASYNC);
index_lock_group(index->fd, offset, INN_LOCK_UNLOCK);
return true;
More information about the inn-committers
mailing list