Kouhei Sutou
null+****@clear*****
Thu Jun 25 14:22:23 JST 2015
Kouhei Sutou 2015-06-25 14:22:23 +0900 (Thu, 25 Jun 2015) New Revision: e0c89f4a81f7b338c25581ab5e816608a872e73f https://github.com/groonga/groonga/commit/e0c89f4a81f7b338c25581ab5e816608a872e73f Message: Flush header Modified files: lib/io.c Modified: lib/io.c (+10 -0) =================================================================== --- lib/io.c 2015-06-25 11:59:26 +0900 (530dbfd) +++ lib/io.c 2015-06-25 14:22:23 +0900 (7cd701f) @@ -1313,13 +1313,23 @@ grn_io_flush(grn_ctx *ctx, grn_io *io) grn_rc rc = GRN_SUCCESS; struct _grn_io_header *header; uint32_t i; + uint32_t aligned_header_size; uint32_t max_mapped_segment; uint32_t segment_size; + if (!io->path) { + return GRN_SUCCESS; + } + header = io->header; + aligned_header_size = grn_io_compute_base(header->header_size); max_mapped_segment = io->max_map_seg; segment_size = header->segment_size; + if (grn_msync(ctx, header, aligned_header_size) != 0) { + return ctx->rc; + } + for (i = 0; i < max_mapped_segment; i++) { grn_io_mapinfo *info = &(io->maps[i]); if (!info) { -------------- next part -------------- HTML����������������������������...Download