Rename stuff.
authorRobert Haas <rhaas@postgresql.org>
Thu, 16 Jan 2014 20:01:47 +0000 (15:01 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 6 Feb 2014 14:23:00 +0000 (09:23 -0500)
src/backend/utils/mmgr/mspan.c
src/include/utils/mspan.h

index f3bd1df3fc3bf9e09e68e1d42e76ac1d6e4e2e8c..d08b4acc5a34e7319da35349c2df8a0cd8760cf2 100644 (file)
@@ -499,33 +499,35 @@ mspan_allocate_context_descriptor(char *base, mspan_manager *mgr)
 static mspan *
 mspan_allocate_span_descriptor(char *base, mspan_manager *mgr)
 {
-       if (!relptr_is_null(mgr->spansuperblocks))
+       mspan *span_of_spans;
+
+       if (!relptr_is_null(mgr->span_of_spans))
        {
-               mspan *spansuperblock = relptr_access(base, mgr->spansuperblocks);
                char *result;
 
                /* Try to allocate from the first span-of-spans. */
-               Assert(spansuperblock->span_type == MSPAN_TYPE_SPAN_OF_SPANS);
-               result = mspan_allocate_from_superblock(base, spansuperblock);
+               span_of_spans = relptr_access(base, mgr->span_of_spans);
+               Assert(span_of_spans->span_type == MSPAN_TYPE_SPAN_OF_SPANS);
+               result = mspan_allocate_from_superblock(base, span_of_spans);
                if (result != NULL)
                        return (mspan *) result;
 
                /* Walk the list looking for a span-of-spans that isn't full. */
                for (;;)
                {
-                       spansuperblock = relptr_access(base, spansuperblock->nextspan);
-                       if (spansuperblock == NULL)
+                       span_of_spans = relptr_access(base, span_of_spans->nextspan);
+                       if (span_of_spans == NULL)
                                break;
-                       Assert(spansuperblock->span_type == MSPAN_TYPE_SPAN_OF_SPANS);
-                       result = mspan_allocate_from_superblock(base, spansuperblock);
+                       Assert(span_of_spans->span_type == MSPAN_TYPE_SPAN_OF_SPANS);
+                       result = mspan_allocate_from_superblock(base, span_of_spans);
                        if (result != NULL)
                        {
                                /*
                                 * Move the span from which we allocate to head of list in
                                 * the hope of speeding up future searches.
                                 */
-                               mspan_unlink_span(base, spansuperblock);
-                               mspan_link_span_to_manager(base, mgr, spansuperblock);
+                               mspan_unlink_span(base, span_of_spans);
+                               mspan_link_span_to_manager(base, mgr, span_of_spans);
 
                                /* Return a pointer to the space we allocated. */
                                return (mspan *) result;
@@ -796,7 +798,7 @@ mspan_link_span_to_manager(char *base, mspan_manager *mgr, mspan *span)
 #endif
 
        if (span->span_type == MSPAN_TYPE_SPAN_OF_SPANS)
-               ptr = &mgr->spansuperblocks.relptr_off;
+               ptr = &mgr->span_of_spans.relptr_off;
        else
        {
                Size    fidx;
@@ -944,8 +946,8 @@ mspan_unlink_span(char *base, mspan *span)
                {
                        mspan_manager *mgr = parent;
 
-                       if (mgr->spansuperblocks.relptr_off == s.relptr_off)
-                               mgr->spansuperblocks.relptr_off = newhead;
+                       if (mgr->span_of_spans.relptr_off == s.relptr_off)
+                               mgr->span_of_spans.relptr_off = newhead;
                }
                default:
                {
index 56a37733663a69facbe9d71c479447715e971d4b..67a8e5191115df4ec54205f49d76c3b5f113eb60 100644 (file)
@@ -78,7 +78,7 @@ struct mspan_manager
        Size            ncontexts;      /* # of outstanding contexts */
        Size            nspans;         /* # of outstanding spans */
        Size            nspansuperblocks;       /* # of superblocks for span objects */
-       relptr(mspan) spansuperblocks;  /* superblock of spans */
+       relptr(mspan) span_of_spans;    /* superblock for span descriptors */
        relptr(mspan_context) freecontext;      /* allocatable context object */
        aspace_map      page_map;       /* map pages to mspans */
        relptr(mspan) freelist[MSPAN_NUM_FREE_LISTS]; /* spans for freespace */