From: Ulrich Drepper Date: Mon, 8 Aug 2005 20:58:35 +0000 (+0000) Subject: (cache_add): Comment hash table and header to disk. X-Git-Tag: cvs/fedora-glibc-20050808T2126~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc46d02a4537b5132cb08ed97ae4e71a42c0d90b;p=thirdparty%2Fglibc.git (cache_add): Comment hash table and header to disk. --- diff --git a/nscd/cache.c b/nscd/cache.c index efac4b3bcca..800b7ecf276 100644 --- a/nscd/cache.c +++ b/nscd/cache.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (c) 1998, 1999, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -169,6 +169,12 @@ cache_add (int type, const void *key, size_t len, struct datahead *packet, if (nentries > table->head->maxnentries) table->head->maxnentries = nentries; + if (table->persistent) + // XXX async OK? + msync ((void *) table->head, + (char *) &table->head->array[hash] - (char *) table->head + + sizeof (ref_t), MS_ASYNC); + return 0; }