From: Kurt Zeilenga Date: Fri, 18 Dec 1998 22:21:16 +0000 (+0000) Subject: Disable writing syncing when creating databases. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~918 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b5e50eff5ee495aa3efd5d7dde4e70f24f5fa066;p=openldap Disable writing syncing when creating databases. --- diff --git a/servers/slapd/tools/ldif2id2children.c b/servers/slapd/tools/ldif2id2children.c index cbe925f666..c985d83dae 100644 --- a/servers/slapd/tools/ldif2id2children.c +++ b/servers/slapd/tools/ldif2id2children.c @@ -61,6 +61,7 @@ main( int argc, char **argv ) ID id; struct dbcache *db, *db2; Backend *be = NULL; + struct ldbminfo *li; struct berval bv; struct berval *vals[2]; Avlnode *avltypes = NULL; @@ -127,6 +128,10 @@ main( int argc, char **argv ) } be = &backends[dbnum]; + /* disable write sync'ing */ + li = (struct ldbminfo *) be->be_private; + li->li_dbcachewsync = 0; + /* * first, make the dn2id index */ diff --git a/servers/slapd/tools/ldif2id2entry.c b/servers/slapd/tools/ldif2id2entry.c index 4ff3407d55..f91c50a799 100644 --- a/servers/slapd/tools/ldif2id2entry.c +++ b/servers/slapd/tools/ldif2id2entry.c @@ -57,6 +57,7 @@ main( int argc, char **argv ) ID id; struct dbcache *db; Backend *be = NULL; + struct ldbminfo *li; struct berval bv; struct berval *vals[2]; Avlnode *avltypes = NULL; @@ -124,6 +125,10 @@ main( int argc, char **argv ) } be = &backends[dbnum]; + /* disable write sync'ing */ + li = (struct ldbminfo *) be->be_private; + li->li_dbcachewsync = 0; + if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_NEWDB )) == NULL ) { perror( "id2entry file" ); diff --git a/servers/slapd/tools/ldif2index.c b/servers/slapd/tools/ldif2index.c index 918a054d99..15979b7e7d 100644 --- a/servers/slapd/tools/ldif2index.c +++ b/servers/slapd/tools/ldif2index.c @@ -58,6 +58,7 @@ main( int argc, char **argv ) int dbnum; unsigned long id; Backend *be = NULL; + struct ldbminfo *li; struct berval bv; struct berval *vals[2]; @@ -121,6 +122,10 @@ main( int argc, char **argv ) } be = &backends[dbnum]; + /* disable write sync'ing */ + li = (struct ldbminfo *) be->be_private; + li->li_dbcachewsync = 0; + attr_masks( be->be_private, attr, &indexmask, &syntaxmask ); if ( indexmask == 0 ) { exit( 0 ); diff --git a/servers/slapd/tools/ldif2ldbm.c b/servers/slapd/tools/ldif2ldbm.c index 8ab191d7e0..c6df73f4a3 100644 --- a/servers/slapd/tools/ldif2ldbm.c +++ b/servers/slapd/tools/ldif2ldbm.c @@ -70,6 +70,7 @@ main( int argc, char **argv ) int dbnum; ID id; Backend *be = NULL; + struct ldbminfo *li; struct berval bv; struct berval *vals[2]; Avlnode *avltypes = NULL; @@ -146,6 +147,10 @@ main( int argc, char **argv ) } be = &backends[dbnum]; + /* disable write sync'ing */ + li = (struct ldbminfo *) be->be_private; + li->li_dbcachewsync = 0; + /* * generate the id2entry index */