Skip to content

Commit

Permalink
(cache_add): Comment hash table and header to disk.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrich Drepper committed Aug 8, 2005
1 parent ba4ee8d commit cc46d02
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nscd/cache.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit cc46d02

Please sign in to comment.