]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
erasure-code: thread-safe initialization of gf-complete 1621/head
authorLoic Dachary <loic@dachary.org>
Mon, 7 Apr 2014 22:20:29 +0000 (00:20 +0200)
committerLoic Dachary <loic@dachary.org>
Tue, 8 Apr 2014 07:47:33 +0000 (09:47 +0200)
commit2ba00bd2e8d9919cefb069cfd9dd7bdd3117e8b1
treed86da5ef0a1e0d7765a8547fb1c2dd65fc3d84a5
parent2a6d962f476efaa586f64b68b7f62a9deae22c44
erasure-code: thread-safe initialization of gf-complete

Instead of relying on an implicit initialization happening during
encoding/decoding with galois.c:galois_init_default_field, call
gf.c:gf_init_easy for each w values when the plugin is loaded.

Loading the plugin is protected against race conditions by a lock.

It does not cover all possible uses of gf-complete but it is enough for
the ceph jerasure plugin.

http://tracker.ceph.com/issues/7914 fixes #7914

Signed-off-by: Loic Dachary <loic@dachary.org>
src/erasure-code/jerasure/ErasureCodePluginJerasure.cc