summaryrefslogtreecommitdiff
path: root/debian/patches/0027-ext2fs-annotate-objects-managed-by-libports.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0027-ext2fs-annotate-objects-managed-by-libports.patch')
-rw-r--r--debian/patches/0027-ext2fs-annotate-objects-managed-by-libports.patch101
1 files changed, 0 insertions, 101 deletions
diff --git a/debian/patches/0027-ext2fs-annotate-objects-managed-by-libports.patch b/debian/patches/0027-ext2fs-annotate-objects-managed-by-libports.patch
deleted file mode 100644
index c650dddc..00000000
--- a/debian/patches/0027-ext2fs-annotate-objects-managed-by-libports.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From f1d5a4bb6ab41f576487d3d3acbf7f192e946a1d Mon Sep 17 00:00:00 2001
-From: Justus Winter <4winter@informatik.uni-hamburg.de>
-Date: Wed, 21 May 2014 18:39:38 +0200
-Subject: [PATCH 27/27] ext2fs: annotate objects managed by libports
-
-Install a specialized version of libpagers format_debug_info which
-prints more detailed information, like the nodes inode number for file
-pager objects. Also label both pager buckets.
-
-* ext2fs/pager-create.c (format_debug_info): New function.
-(create_disk_pager): Install our own format_debug_info function.
-Label both pager buckets.
----
- ext2fs/pager.c | 40 ++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 40 insertions(+)
-
-diff --git a/ext2fs/pager.c b/ext2fs/pager.c
-index 017efcc..aba7f27 100644
---- a/ext2fs/pager.c
-+++ b/ext2fs/pager.c
-@@ -19,10 +19,12 @@
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
- #include <unistd.h>
-+#include <stdio.h>
- #include <string.h>
- #include <errno.h>
- #include <error.h>
- #include <hurd/store.h>
-+#include <inttypes.h>
- #include "ext2fs.h"
-
- /* XXX */
-@@ -1207,6 +1209,40 @@ service_paging_requests (void *arg)
- return NULL;
- }
-
-+/* Provide a human-readable description of the given pager object. */
-+static error_t
-+format_debug_info (const void *port, char *buffer, size_t size)
-+{
-+ const struct pager *pager = port;
-+ const struct port_info *pi = port;
-+
-+ if (pager->upi->type == FILE_DATA)
-+ {
-+ struct references result;
-+
-+ refcounts_references (&pager->upi->node->refcounts, &result);
-+
-+ snprintf (buffer, size,
-+ "bucket: %s, class: %s"
-+ ", node{inode: %"PRIu64", hard: %u, weak: %u}",
-+ pi->bucket->label,
-+ pi->class->label,
-+ pager->upi->node->cache_id,
-+ result.hard,
-+ result.weak);
-+ }
-+ else
-+ snprintf (buffer, size,
-+ "bucket: %s, class: %s, may_cache: %d",
-+ pi->bucket->label,
-+ pi->class->label,
-+ /* XXX I have no idea what might be interesting to print
-+ here, but it is straight forward to add stuff. */
-+ pager->may_cache);
-+
-+ return 0;
-+}
-+
- /* Create the disk pager, and the file pager. */
- void
- create_disk_pager (void)
-@@ -1215,12 +1251,15 @@ create_disk_pager (void)
- pthread_attr_t attr;
- error_t err;
-
-+ ports_set_debug_info (_pager_class, "_pager_class", format_debug_info);
-+
- /* The disk pager. */
- struct user_pager_info *upi = malloc (sizeof (struct user_pager_info));
- if (!upi)
- ext2_panic ("can't create disk pager: %s", strerror (errno));
- upi->type = DISK;
- disk_pager_bucket = ports_create_bucket ();
-+ ports_label_bucket (disk_pager_bucket, "disk_pager_bucket");
- get_hypermetadata ();
- disk_cache_blocks = DISK_CACHE_BLOCKS;
- disk_cache_size = disk_cache_blocks << log2_block_size;
-@@ -1230,6 +1269,7 @@ create_disk_pager (void)
-
- /* The file pager. */
- file_pager_bucket = ports_create_bucket ();
-+ ports_label_bucket (file_pager_bucket, "file_pager_bucket");
-
- #define STACK_SIZE (64 * 1024)
- pthread_attr_init (&attr);
---
-2.0.0.rc2
-