Commit 674454b0 authored by John Esmet's avatar John Esmet

FT-583 Remove sub_block_map.h, dead code from old format verisons

parent 9b004763
...@@ -112,7 +112,6 @@ PATENT RIGHTS GRANT: ...@@ -112,7 +112,6 @@ PATENT RIGHTS GRANT:
#include "ft/serialize/ft-serialize.h" #include "ft/serialize/ft-serialize.h"
#include "ft/serialize/ft_node-serialize.h" #include "ft/serialize/ft_node-serialize.h"
#include "ft/serialize/sub_block.h" #include "ft/serialize/sub_block.h"
#include "ft/serialize/sub_block_map.h"
#include "util/x1764.h" #include "util/x1764.h"
......
...@@ -101,6 +101,7 @@ PATENT RIGHTS GRANT: ...@@ -101,6 +101,7 @@ PATENT RIGHTS GRANT:
#include "ft/serialize/block_table.h" #include "ft/serialize/block_table.h"
#include "ft/serialize/compress.h" #include "ft/serialize/compress.h"
#include "ft/serialize/ft_node-serialize.h" #include "ft/serialize/ft_node-serialize.h"
#include "ft/serialize/sub_block.h"
#include "util/sort.h" #include "util/sort.h"
#include "util/threadpool.h" #include "util/threadpool.h"
#include "util/status.h" #include "util/status.h"
...@@ -248,9 +249,6 @@ enum { ...@@ -248,9 +249,6 @@ enum {
4), // build_id 4), // build_id
}; };
#include "sub_block.h"
#include "sub_block_map.h"
// uncompressed header offsets // uncompressed header offsets
enum { enum {
uncompressed_magic_offset = 0, uncompressed_magic_offset = 0,
...@@ -1713,12 +1711,15 @@ deserialize_and_upgrade_internal_node(FTNODE node, ...@@ -1713,12 +1711,15 @@ deserialize_and_upgrade_internal_node(FTNODE node,
} }
// Read in the child buffer maps. // Read in the child buffer maps.
struct sub_block_map child_buffer_map[node->n_children];
for (int i = 0; i < node->n_children; ++i) { for (int i = 0; i < node->n_children; ++i) {
// The following fields are read in the // The following fields were previously used by the `sub_block_map'
// sub_block_map_deserialize() call: // They include:
// 19. index 20. offset 21. size // - 4 byte index
sub_block_map_deserialize(&child_buffer_map[i], rb); (void) rbuf_int(rb);
// - 4 byte offset
(void) rbuf_int(rb);
// - 4 byte size
(void) rbuf_int(rb);
} }
// We need to setup this node's partitions, but we can't call the // We need to setup this node's partitions, but we can't call the
...@@ -1838,9 +1839,15 @@ deserialize_and_upgrade_leaf_node(FTNODE node, ...@@ -1838,9 +1839,15 @@ deserialize_and_upgrade_leaf_node(FTNODE node,
// 11. Deserialize the partition maps, though they are not used in the // 11. Deserialize the partition maps, though they are not used in the
// newer versions of ftnodes. // newer versions of ftnodes.
struct sub_block_map part_map[npartitions]; for (int i = 0; i < node->n_children; ++i) {
for (int i = 0; i < npartitions; ++i) { // The following fields were previously used by the `sub_block_map'
sub_block_map_deserialize(&part_map[i], rb); // They include:
// - 4 byte index
(void) rbuf_int(rb);
// - 4 byte offset
(void) rbuf_int(rb);
// - 4 byte size
(void) rbuf_int(rb);
} }
// Copy all of the leaf entries into the single basement node. // Copy all of the leaf entries into the single basement node.
......
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
/*
COPYING CONDITIONS NOTICE:
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as
published by the Free Software Foundation, and provided that the
following conditions are met:
* Redistributions of source code must retain this COPYING
CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the
DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the
PATENT MARKING NOTICE (below), and the PATENT RIGHTS
GRANT (below).
* Redistributions in binary form must reproduce this COPYING
CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the
DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the
PATENT MARKING NOTICE (below), and the PATENT RIGHTS
GRANT (below) in the documentation and/or other materials
provided with the distribution.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
COPYRIGHT NOTICE:
TokuDB, Tokutek Fractal Tree Indexing Library.
Copyright (C) 2007-2013 Tokutek, Inc.
DISCLAIMER:
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
UNIVERSITY PATENT NOTICE:
The technology is licensed by the Massachusetts Institute of
Technology, Rutgers State University of New Jersey, and the Research
Foundation of State University of New York at Stony Brook under
United States of America Serial No. 11/760379 and to the patents
and/or patent applications resulting from it.
PATENT MARKING NOTICE:
This software is covered by US Patent No. 8,185,551.
This software is covered by US Patent No. 8,489,638.
PATENT RIGHTS GRANT:
"THIS IMPLEMENTATION" means the copyrightable works distributed by
Tokutek as part of the Fractal Tree project.
"PATENT CLAIMS" means the claims of patents that are owned or
licensable by Tokutek, both currently or in the future; and that in
the absence of this license would be infringed by THIS
IMPLEMENTATION or by using or running THIS IMPLEMENTATION.
"PATENT CHALLENGE" shall mean a challenge to the validity,
patentability, enforceability and/or non-infringement of any of the
PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS.
Tokutek hereby grants to you, for the term and geographical scope of
the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to
make, have made, use, offer to sell, sell, import, transfer, and
otherwise run, modify, and propagate the contents of THIS
IMPLEMENTATION, where such license applies only to the PATENT
CLAIMS. This grant does not include claims that would be infringed
only as a consequence of further modifications of THIS
IMPLEMENTATION. If you or your agent or licensee institute or order
or agree to the institution of patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that
THIS IMPLEMENTATION constitutes direct or contributory patent
infringement, or inducement of patent infringement, then any rights
granted to you under this License shall terminate as of the date
such litigation is filed. If you or your agent or exclusive
licensee institute or order or agree to the institution of a PATENT
CHALLENGE, then Tokutek may terminate any rights granted to you
under this License.
*/
#pragma once
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
// Map objects to a sequence of sub block
struct sub_block_map {
uint32_t idx;
uint32_t offset;
uint32_t size;
};
enum {
stored_sub_block_map_size = sizeof (struct sub_block_map), // size of a sub-block map on disk
};
static inline void
sub_block_map_init(struct sub_block_map *sbmap, uint32_t idx, uint32_t offset, uint32_t size) {
sbmap->idx = idx;
sbmap->offset = offset;
sbmap->size = size;
}
static inline void
sub_block_map_serialize(struct sub_block_map *sbmap, struct wbuf *wbuf) {
wbuf_nocrc_int(wbuf, sbmap->idx);
wbuf_nocrc_int(wbuf, sbmap->offset);
wbuf_nocrc_int(wbuf, sbmap->size);
}
static inline void
sub_block_map_deserialize(struct sub_block_map *sbmap, struct rbuf *rbuf) {
sbmap->idx = rbuf_int(rbuf);
sbmap->offset = rbuf_int(rbuf);
sbmap->size = rbuf_int(rbuf);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment