]> sourceware.org Git - glibc.git/commitdiff
(cache_add): Comment hash table and header to disk.
authorUlrich Drepper <drepper@redhat.com>
Mon, 8 Aug 2005 20:58:35 +0000 (20:58 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 8 Aug 2005 20:58:35 +0000 (20:58 +0000)
nscd/cache.c

index efac4b3bcca9305f117008aef88cb41d255e425d..800b7ecf276cd047378bc52a2fd709bf8e2bcab8 100644 (file)
@@ -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 <drepper@cygnus.com>, 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;
 }
 
This page took 0.043644 seconds and 5 git commands to generate.