Re: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects

2019-01-22 Thread Junio C Hamano
Patrick Hogg writes: > @@ -3319,6 +3327,8 @@ int cmd_pack_objects(int argc, const char **argv, const > char *prefix) > OPT_END(), > }; > > + init_read_mutex(); > + > if (DFS_NUM_STATES > (1 << OE_DFS_STATE_BITS)) > BUG("too many dfs states, increase

Re: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects

2019-01-18 Thread Patrick Hogg
On Fri, Jan 18, 2019 at 8:10 AM Duy Nguyen wrote: > > On Fri, Jan 18, 2019 at 8:04 PM Patrick Hogg wrote: > > > > On Fri, Jan 18, 2019 at 4:21 AM Duy Nguyen wrote: > >> > >> On Fri, Jan 18, 2019 at 9:28 AM Patrick Hogg wrote: > >> > > >> > ac77d0c37 ("pack-objects: shrink size field in struct o

Re: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects

2019-01-18 Thread Duy Nguyen
On Fri, Jan 18, 2019 at 8:04 PM Patrick Hogg wrote: > > On Fri, Jan 18, 2019 at 4:21 AM Duy Nguyen wrote: >> >> On Fri, Jan 18, 2019 at 9:28 AM Patrick Hogg wrote: >> > >> > ac77d0c37 ("pack-objects: shrink size field in struct object_entry", >> > 2018-04-14) added an extra usage of read_lock/re

Fwd: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects

2019-01-18 Thread Patrick Hogg
On Fri, Jan 18, 2019 at 4:21 AM Duy Nguyen wrote: > > On Fri, Jan 18, 2019 at 9:28 AM Patrick Hogg wrote: > > > > ac77d0c37 ("pack-objects: shrink size field in struct object_entry", > > 2018-04-14) added an extra usage of read_lock/read_unlock in the newly > > introduced oe_get_size_slow for thr

Re: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects

2019-01-18 Thread Johannes Schindelin
Hi Patrick, On Thu, 17 Jan 2019, Patrick Hogg wrote: > ac77d0c37 ("pack-objects: shrink size field in struct object_entry", > 2018-04-14) added an extra usage of read_lock/read_unlock in the newly > introduced oe_get_size_slow for thread safety in parallel calls to > try_delta(). Unfortunately oe

Re: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects

2019-01-18 Thread Duy Nguyen
On Fri, Jan 18, 2019 at 9:28 AM Patrick Hogg wrote: > > ac77d0c37 ("pack-objects: shrink size field in struct object_entry", > 2018-04-14) added an extra usage of read_lock/read_unlock in the newly > introduced oe_get_size_slow for thread safety in parallel calls to > try_delta(). Unfortunately oe

[PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects

2019-01-17 Thread Patrick Hogg
ac77d0c37 ("pack-objects: shrink size field in struct object_entry", 2018-04-14) added an extra usage of read_lock/read_unlock in the newly introduced oe_get_size_slow for thread safety in parallel calls to try_delta(). Unfortunately oe_get_size_slow is also used in serial code, some of which is ca