From: Junio C Hamano <gitster@pobox•com>
To: Brodie Rao <brodie@sf•io>
Cc: git@vger•kernel.org, Bryan Turner <bturner@atlassian•com>
Subject: Re: [PATCH] gc: support temporarily preserving garbage
Date: Fri, 14 Nov 2014 15:01:05 -0800 [thread overview]
Message-ID: <xmqqlhnd1j66.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1415927805-53644-1-git-send-email-brodie@sf.io> (Brodie Rao's message of "Thu, 13 Nov 2014 17:16:45 -0800")
Brodie Rao <brodie@sf•io> writes:
> This patch adds a gc.garbageexpire setting that, when not set to "now",
> makes gc (and prune, prune-packed, and repack) move garbage into a
> temporary garbage directory instead of deleting it immediately. The
> garbage directory is then cleared out based on gc.garbageexpire.
>
> The motivation for this setting is to work around various NFS servers
> not supporting delete-on-last-close semantics between NFS clients.
> Without proper support for that, gc could potentially delete objects
> and packs that are in use by git processes on other NFS clients. If
> another git process has a deleted pack file mmap()ed, it could crash
> with a SIGBUS error on Linux.
>
> Signed-off-by: Brodie Rao <brodie@sf•io>
> ---
> .gitignore | 1 +
> Documentation/config.txt | 20 +++++++++
> Documentation/git-gc.txt | 7 ++++
> Documentation/git-prune-garbage.txt | 55 ++++++++++++++++++++++++
> Documentation/git-prune-packed.txt | 9 ++++
> Documentation/git-prune.txt | 9 ++++
> Documentation/git-repack.txt | 6 +++
> Documentation/git.txt | 6 +++
> Makefile | 2 +
> builtin.h | 1 +
> builtin/gc.c | 20 +++++++++
> builtin/prune-garbage.c | 77 ++++++++++++++++++++++++++++++++++
> builtin/prune-packed.c | 3 +-
> builtin/prune.c | 5 ++-
> builtin/repack.c | 7 ++--
> cache.h | 2 +
> command-list.txt | 1 +
> contrib/completion/git-completion.bash | 2 +
> environment.c | 12 +++++-
> gc.c | 60 ++++++++++++++++++++++++++
> gc.h | 16 +++++++
> git.c | 1 +
> t/t6502-gc-garbage-expire.sh | 60 ++++++++++++++++++++++++++
> 23 files changed, 375 insertions(+), 7 deletions(-)
> create mode 100644 Documentation/git-prune-garbage.txt
> create mode 100644 builtin/prune-garbage.c
> create mode 100644 gc.c
> create mode 100644 gc.h
> create mode 100755 t/t6502-gc-garbage-expire.sh
I am not sure if this much of code churn is warranted to work around
issues that only happen on repositories on NFS servers that do not
keep open-but-deleted files available. Is it an option to instead
have a copy of repository locally off NFS?
next prev parent reply other threads:[~2014-11-14 23:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 1:16 [PATCH] gc: support temporarily preserving garbage Brodie Rao
2014-11-14 23:01 ` Junio C Hamano [this message]
2014-11-15 1:49 ` Stefan Saasen
2014-11-17 21:34 ` Jeff King
2014-11-17 23:59 ` Stefan Saasen
2014-11-18 0:21 ` Jeff King
2014-12-03 21:21 ` Brodie Rao
2014-12-04 9:10 ` Jeff King
2014-12-04 18:04 ` Junio C Hamano
2014-12-05 9:30 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqlhnd1j66.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=brodie@sf$(echo .)io \
--cc=bturner@atlassian$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox