Re: [PATCHv2] refs.c: enable large transactions

2015-04-22 Thread Michael Haggerty
On 04/22/2015 09:09 PM, Stefan Beller wrote: > On Wed, Apr 22, 2015 at 7:11 AM, Michael Haggerty > wrote: >>> + if (lock->lk->fd == -1) >>> + reopen_lock_file(lock->lk); >> >> You should check that reopen_lock_file() was successful. > > ok > > >>> @@ -3762,6 +3779,10 @@ int ref

Re: [PATCHv2] refs.c: enable large transactions

2015-04-22 Thread Stefan Beller
On Wed, Apr 22, 2015 at 7:11 AM, Michael Haggerty wrote: >> + if (lock->lk->fd == -1) >> + reopen_lock_file(lock->lk); > > You should check that reopen_lock_file() was successful. ok >> @@ -3762,6 +3779,10 @@ int ref_transaction_commit(struct ref_transaction >> *transaction, >>

Re: [PATCHv2] refs.c: enable large transactions

2015-04-22 Thread Michael Haggerty
On 04/21/2015 09:06 PM, Stefan Beller wrote: > This is another attempt on enabling large transactions > (large in terms of open file descriptors). We keep track of how many > lock files are opened by the ref_transaction_commit function. > When more than a reasonable amount of files is open, we clos

Re: [PATCHv2] refs.c: enable large transactions

2015-04-21 Thread Stefan Beller
> > * Removed unneeded braces in the condition to check if we want to close > the lock file. > * made the counter for the remaining fds an unsigned int. That is what > get_max_fd_limit() returns, so there are no concerns for an overflow. > Also it cannot go below 0 any more. > * moved the ini

[PATCHv2] refs.c: enable large transactions

2015-04-21 Thread Stefan Beller
This is another attempt on enabling large transactions (large in terms of open file descriptors). We keep track of how many lock files are opened by the ref_transaction_commit function. When more than a reasonable amount of files is open, we close the file descriptors to make sure the transaction c