[PATCH v2 0/4] make open/unlink failures user friendly on windows using retry/abort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

here is a new iteration of my original patch series. This series
replaces the newest patches currently present in 4msysgit.git's master
and does not cleanly apply to git.git's master. Once everybody is happy
with the outcome I will port it to git.git so msysgit can fetch it from
upstream.

On Tue, Sep 28, 2010 at 10:52:25PM +0200, Johannes Sixt wrote:
> > Heiko Voigt (4):
> >       mingw: work around irregular failures of unlink on windows
> 
> The workaround is to retry the unlink() after a delay when it failed with 
> EACCES. What happens if the EACCES is for a good reason? Doesn't this delay 
> the process by 71ms per unlink() invocation? Can't this become a problem if 
> many unlink()s are tried by git code?

I have changed the triggering error code to be ERROR_SHARING_VIOLATION
which seems to be the appropriate code for files that are in use by
another process.

http://msdn.microsoft.com/en-us/library/ms681382%28v=VS.85%29.aspx

Thus we do not need to worry about whether we are retrying on a valid
access error. I have tested this on my windows box and it works here.

j6t: I have not changed your error code in mingw_rename since you
explicitely compare with the windows error code ERROR_ACCESS_DENIED and
do not use the err_win_to_posix() function. Did you do this on purpose or
should I also refer to ERROR_SHARING_VIOLATION ?

> >       mingw: make failures to unlink or move raise a question
> 
> Gaah! But people seem to like it. Since the question is only triggered after 
> all retries fail, I can live with this.
> 
> But isn't the implementation a bit sloppy? Can strlen(answer)-2 be negative? 
> What happens if the user typed more than 4 characters? Wouldn't it leave data 
> in the buffer for the next question?

I have extracted reading of the answer into its own function and made
the reading more robust which should now take care of the above issues.

> >       mingw: add fallback for rmdir in case directory is in use
> 
> Depends on the previous patch. OK.

No changes.

During pick up of the series I had to gather my testing script which can
only be used manually for testing. Is there any place in git.git where
we can store such "manual testing tools" ?

Cheers Heiko

Heiko Voigt (4):
  mingw: move unlink wrapper to mingw.c
  mingw: work around irregular failures of unlink on windows
  mingw: make failures to unlink or move raise a question
  mingw: add fallback for rmdir in case directory is in use

 compat/mingw.c |  139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 compat/mingw.h |   14 ++---
 2 files changed, 144 insertions(+), 9 deletions(-)

-- 
1.7.2.2.177.geec0d

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]