[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: My git repo is broken, how to fix it ?
From:       "Alex Riesen" <raa.lkml () gmail ! com>
Date:       2007-02-28 19:12:03
Message-ID: 81b0412b0702281112y714c3b0eread09ee9440d0537 () mail ! gmail ! com
[Download RAW message or body]

On 2/28/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>  - try to figure out why things got corrupted in the first place.
> ...
>    But I would not be shocked to hear that the "link + unlink" sequence
>    ends up being emulated under cygwin as a "copy + delete" due to lack of
>    hardlinks or something.

Well, cygwin has a whole rename implementation using wincalls (which
may or maybe not syscalls). It's hard to tell whether micros$#%^ used
link+unlink: windows traditionally had no link(2). It has it since W2K,
allowed only on ntfs, and even there it spent some time undocumented :)

>    Also, even if the link fails, and git then falls back to "rename()"
>    (since some filesystems don't do hardlinks at all, or limit them to one
>    particular directory), I would _still_ not be totally surprised if the
>    rename got emulated as a copy/delete for some strange Windows reason.
>
>    There are other possibilities for corruption, of course: just plain
>    disk corruption, or (again) some other subtle cygwin emulation or
>    Windows issue could bite us.

It is very hard to tell: the rename function in cygwin is over 200 lines long,
has multiple calls down to the kernel (or whatever it is), and there are two
different wincalls used. It is hard to predict what path will be taken or
whether there were actually any data copying happened.
Of course, windows known to corrupt data just so...

>  - It would probably be good to write up the "How to recover" thing,
>    regardless of why any corruption happens. It doesn't matter if you're
>    under UNIX and using native protocols, and just being careful as hell:
>    disks get corrupted, sh*t happens, alpha-particles in the wrong place
>    do bad things to memory cells. And bugs _are_ inevitable, even if
>    we've been pretty damn good about these things.

It'd be a good start to link the recent disaster recoveries from
git.or.cz wiki from the title page (unless it is already).
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic