From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Linus Torvalds <torvalds@linuxfoundation.org>,
Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: [PATCH 2/2] Remove now unnecessary 'sync()' calls
Date: Fri, 30 May 2008 09:11:55 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0805300908200.3141@woody.linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0805300905080.3141@woody.linux-foundation.org>
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Fri, 30 May 2008 08:54:46 -0700
Since the pack-files are now always created stably on disk, there is no
need to sync() before pruning lose objects or old stale pack-files.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
This literally just removes the syncs. The only thing they wanted to
protect were the pack-files, that are now created stably.
Yes, you can screw this up by doing direct filesystem operations on the
pack-files (ie rsync/http walkers etc), but let's face it - those
operations are pretty much fundamentally more problematic than anything we
can do anyway, so I canno bring myself to care.
Also, maybe I missed some case where we should fsync. I think this is all
good, but having other people look at and think about this would be better
still.
builtin-prune-packed.c | 1 -
builtin-prune.c | 1 -
git-repack.sh | 1 -
3 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c
index 23faf31..241afbb 100644
--- a/builtin-prune-packed.c
+++ b/builtin-prune-packed.c
@@ -85,7 +85,6 @@ int cmd_prune_packed(int argc, const char **argv, const char *prefix)
/* Handle arguments here .. */
usage(prune_packed_usage);
}
- sync();
prune_packed_objects(opts);
return 0;
}
diff --git a/builtin-prune.c b/builtin-prune.c
index 25f9304..bd3d2f6 100644
--- a/builtin-prune.c
+++ b/builtin-prune.c
@@ -156,7 +156,6 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
mark_reachable_objects(&revs, 1);
prune_object_dir(get_object_directory());
- sync();
prune_packed_objects(show_only);
remove_temporary_files();
return 0;
diff --git a/git-repack.sh b/git-repack.sh
index 10f735c..072d1b4 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -125,7 +125,6 @@ then
# We know $existing are all redundant.
if [ -n "$existing" ]
then
- sync
( cd "$PACKDIR" &&
for e in $existing
do
--
1.5.6.rc0.48.g5eea
next prev parent reply other threads:[~2008-05-30 16:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 20:57 reducing prune sync()s Frank Ch. Eigler
2008-05-30 0:27 ` Linus Torvalds
2008-05-30 0:32 ` Linus Torvalds
2008-05-30 1:50 ` Frank Ch. Eigler
2008-05-30 20:07 ` Florian Weimer
2008-05-30 1:51 ` David Dillow
2008-05-30 2:17 ` Linus Torvalds
2008-05-30 2:30 ` Linus Torvalds
2008-05-30 15:25 ` Frank Ch. Eigler
2008-05-30 15:57 ` Linus Torvalds
2008-05-30 16:08 ` [PATCH 1/2] Make pack creation always fsync() the result Linus Torvalds
2008-05-30 16:11 ` Linus Torvalds [this message]
2008-05-30 20:27 ` Nicolas Pitre
2008-05-31 14:19 ` Frank Ch. Eigler
2008-06-02 22:23 ` Linus Torvalds
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=alpine.LFD.1.10.0805300908200.3141@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=fche@redhat.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=torvalds@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).