[ostree] core: Don't checkout symbolic links via hardlink
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] core: Don't checkout symbolic links via hardlink
- Date: Sat, 26 May 2012 16:12:11 +0000 (UTC)
commit 9582effb8d97e9885e2226205ab02437b51db230
Author: Colin Walters <walters verbum org>
Date: Sat May 26 11:55:12 2012 -0400
core: Don't checkout symbolic links via hardlink
Doing so can easily get us up to the maximum ext4 hardlink count.
src/libostree/ostree-repo.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 2274588..a3ff556 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -4179,6 +4179,17 @@ find_loose_for_checkout (OstreeRepo *self,
}
self = self->parent_repo;
}
+ else if (S_ISLNK (stbuf.st_mode))
+ {
+ /* Don't check out symbolic links via hardlink; it's very easy
+ * to hit the maximum number of hardlinks to an inode this way,
+ * especially since right now we have a lot of symbolic links to
+ * busybox.
+ *
+ * fs/ext4/ext4.h:#define EXT4_LINK_MAX 65000
+ */
+ self = self->parent_repo;
+ }
else
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]