mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-16 08:56:40 -05:00
gdbm: set default block size to 1K
This commit is contained in:
parent
279e0d678e
commit
dddb4b02b3
1 changed files with 5 additions and 2 deletions
|
|
@ -71,10 +71,13 @@ pa_database* pa_database_open(const char *fn, pa_bool_t for_write) {
|
||||||
/* We include the host identifier in the file name because gdbm
|
/* We include the host identifier in the file name because gdbm
|
||||||
* files are CPU dependant, and we don't want things to go wrong
|
* files are CPU dependant, and we don't want things to go wrong
|
||||||
* if we are on a multiarch system. */
|
* if we are on a multiarch system. */
|
||||||
|
|
||||||
path = pa_sprintf_malloc("%s."CANONICAL_HOST".gdbm", fn);
|
path = pa_sprintf_malloc("%s."CANONICAL_HOST".gdbm", fn);
|
||||||
errno = 0;
|
errno = 0;
|
||||||
f = gdbm_open((char*) path, 0, GDBM_NOLOCK | (for_write ? GDBM_WRCREAT : GDBM_READER), 0644, NULL);
|
|
||||||
|
/* We need to set the block size explicitly here, since otherwise
|
||||||
|
* gdbm takes the native block size of the underlying file system
|
||||||
|
* which might be incredibly large. */
|
||||||
|
f = gdbm_open((char*) path, 1024, GDBM_NOLOCK | (for_write ? GDBM_WRCREAT : GDBM_READER), 0644, NULL);
|
||||||
|
|
||||||
if (f)
|
if (f)
|
||||||
pa_log_debug("Opened GDBM database '%s'", path);
|
pa_log_debug("Opened GDBM database '%s'", path);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue