Re: [PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes

2016-09-08 Thread Junio C Hamano
Lars Schneider writes: >>> We probably should be using O_NOATIME for all O_RDONLY cases >>> to get the last bit of performance out (especially since >>> non-modern-Linux systems probably still lack relatime). >> >> No, please do not go there. >> >> The user can read from a file in a working tre

Re: [PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes

2016-09-07 Thread Lars Schneider
> On 07 Sep 2016, at 20:23, Junio C Hamano wrote: > > Eric Wong writes: > >> We probably should be using O_NOATIME for all O_RDONLY cases >> to get the last bit of performance out (especially since >> non-modern-Linux systems probably still lack relatime). > > No, please do not go there. > >

Re: [PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes

2016-09-07 Thread Junio C Hamano
Eric Wong writes: > We probably should be using O_NOATIME for all O_RDONLY cases > to get the last bit of performance out (especially since > non-modern-Linux systems probably still lack relatime). No, please do not go there. The user can read from a file in a working tree using "less", "grep",

Re: [PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes

2016-09-07 Thread Eric Wong
Lars Schneider wrote: > > On 06 Sep 2016, at 23:06, Eric Wong wrote: > > larsxschnei...@gmail.com wrote: > >> static int ce_compare_data(const struct cache_entry *ce, struct stat *st) > >> { > >>int match = -1; > >> - int fd = open(ce->name, O_RDONLY); > >> + int fd = open(ce->name, O_RDONL

Re: [PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes

2016-09-07 Thread Lars Schneider
> On 06 Sep 2016, at 23:06, Eric Wong wrote: > > larsxschnei...@gmail.com wrote: >> static int ce_compare_data(const struct cache_entry *ce, struct stat *st) >> { >> int match = -1; >> -int fd = open(ce->name, O_RDONLY); >> +int fd = open(ce->name, O_RDONLY | O_CLOEXEC); >> >>

Re: [PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes

2016-09-06 Thread Eric Wong
larsxschnei...@gmail.com wrote: > static int ce_compare_data(const struct cache_entry *ce, struct stat *st) > { > int match = -1; > - int fd = open(ce->name, O_RDONLY); > + int fd = open(ce->name, O_RDONLY | O_CLOEXEC); > > if (fd >= 0) { > unsigned char sha1[2

Re: [PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes

2016-09-06 Thread Johannes Schindelin
Hi Lars, On Mon, 5 Sep 2016, larsxschnei...@gmail.com wrote: > [... commit message ...] Makes sense. > diff --git a/read-cache.c b/read-cache.c > index 491e52d..02f74d3 100644 > --- a/read-cache.c > +++ b/read-cache.c > @@ -156,7 +156,7 @@ void fill_stat_cache_info(struct cache_entry *ce, struc

[PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes

2016-09-05 Thread larsxschneider
From: Lars Schneider This fix prepares a series with the goal to avoid launching a new clean/smudge filter process for each file that is filtered. A new long running filter process is introduced that is used to filter all files in a single Git invocation. Consider the case of a file that require