git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Justin Tobler <jltobler@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 06/16] reftable/block: rename `block` to `block_data`
Date: Mon, 7 Apr 2025 14:30:55 +0200	[thread overview]
Message-ID: <Z_PFfwf4D8HtYr_a@pks.im> (raw)
In-Reply-To: <y3lbo4dnuv46kgy7fhzcksdea2pdm6nsy43tjai6tcgd6b3w5u@w5zqty5tgpmt>

On Wed, Apr 02, 2025 at 03:26:26PM -0500, Justin Tobler wrote:
> On 25/03/31 10:41AM, Patrick Steinhardt wrote:
> > The `reftable_block` structure associates a byte slice with a block
> > source. As such it only holds the data of a reftable block without
> > actually encoding any of the details for how to access that data.
> > 
> > Rename the structure to instead be called `reftable_block_data`. Besides
> > clarifying that this really only holds data, it also allows us to rename
> > the `reftable_block_reader` to `reftable_block` in the next commit, as
> > this is the structure that actually encapsulates access to the reftable
> > blocks.
> > 
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> > ---
> >  reftable/block.c                    | 10 ++++-----
> >  reftable/block.h                    |  2 +-
> >  reftable/blocksource.c              | 44 ++++++++++++++++++-------------------
> >  reftable/blocksource.h              | 10 ++++-----
> >  reftable/iter.c                     |  4 ++--
> >  reftable/reftable-blocksource.h     | 14 ++++++------
> >  reftable/table.c                    | 14 ++++++------
> >  t/unit-tests/t-reftable-readwrite.c | 10 ++++-----
> >  8 files changed, 54 insertions(+), 54 deletions(-)
> [snip]  
> > diff --git a/reftable/block.h b/reftable/block.h
> > index 6afb1b2952a..c55d47c3c52 100644
> > --- a/reftable/block.h
> > +++ b/reftable/block.h
> > @@ -71,7 +71,7 @@ struct block_reader {
> >  	uint32_t header_off;
> >  
> >  	/* the memory block */
> > -	struct reftable_block block;
> > +	struct reftable_block_data block;
> 
> I wonder if we should rename the `reftable_block_data` here from `block`
> to `data`. In the next commit we rename `block_reader` to `block` which
> leads to `block->block` in some places which I think looks a bit funny.

Fair. Will rename it to `block_data` though to match the struct name.

Patrick

  reply	other threads:[~2025-04-07 12:30 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31  8:41 [PATCH 00/16] reftable: overhaul the API to expose access to blocks Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 01/16] reftable: fix formatting of the license header Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 02/16] reftable/reader: rename data structure to "table" Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 03/16] reftable/blocksource: consolidate code into a single file Patrick Steinhardt
2025-04-02 17:42   ` Justin Tobler
2025-04-03 10:42   ` Karthik Nayak
2025-03-31  8:41 ` [PATCH 04/16] reftable/block: simplify how we track restart points Patrick Steinhardt
2025-04-02 18:08   ` Justin Tobler
2025-04-03 15:17   ` Karthik Nayak
2025-04-07 12:31     ` Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 05/16] reftable/table: move reading block into block reader Patrick Steinhardt
2025-04-02 20:13   ` Justin Tobler
2025-04-07 12:31     ` Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 06/16] reftable/block: rename `block` to `block_data` Patrick Steinhardt
2025-04-02 20:26   ` Justin Tobler
2025-04-07 12:30     ` Patrick Steinhardt [this message]
2025-03-31  8:41 ` [PATCH 07/16] reftable/block: rename `block_reader` to `reftable_block` Patrick Steinhardt
2025-04-02 20:39   ` Justin Tobler
2025-04-07 12:30     ` Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 08/16] git-zlib: use `struct z_stream_s` instead of typedef Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 09/16] reftable/block: create public interface for reading blocks Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 10/16] reftable/block: store block pointer in the block iterator Patrick Steinhardt
2025-04-02 20:56   ` Justin Tobler
2025-04-07 12:31     ` Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 11/16] reftable/block: make block iterators reseekable Patrick Steinhardt
2025-04-02 21:24   ` Justin Tobler
2025-04-07 12:30     ` Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 12/16] reftable/block: expose a generic iterator over reftable records Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 13/16] reftable/table: add `reftable_table` to the public interface Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 14/16] reftable/table: introduce iterator for table blocks Patrick Steinhardt
2025-04-01 22:08   ` Junio C Hamano
2025-04-02  7:21     ` Patrick Steinhardt
2025-04-02 21:46   ` Justin Tobler
2025-04-07 12:31     ` Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 15/16] reftable/constants: make block types part of the public interface Patrick Steinhardt
2025-03-31  8:41 ` [PATCH 16/16] reftable/table: move printing logic into test helper Patrick Steinhardt
2025-04-02 21:52   ` Justin Tobler
2025-04-07 13:16 ` [PATCH v2 00/16] reftable: overhaul the API to expose access to blocks Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 01/16] reftable: fix formatting of the license header Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 02/16] reftable/reader: rename data structure to "table" Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 03/16] reftable/blocksource: consolidate code into a single file Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 04/16] reftable/block: simplify how we track restart points Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 05/16] reftable/table: move reading block into block reader Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 06/16] reftable/block: rename `block` to `block_data` Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 07/16] reftable/block: rename `block_reader` to `reftable_block` Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 08/16] git-zlib: use `struct z_stream_s` instead of typedef Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 09/16] reftable/block: create public interface for reading blocks Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 10/16] reftable/block: store block pointer in the block iterator Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 11/16] reftable/block: make block iterators reseekable Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 12/16] reftable/block: expose a generic iterator over reftable records Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 13/16] reftable/table: add `reftable_table` to the public interface Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 14/16] reftable/table: introduce iterator for table blocks Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 15/16] reftable/constants: make block types part of the public interface Patrick Steinhardt
2025-04-07 13:16   ` [PATCH v2 16/16] reftable/table: move printing logic into test helper Patrick Steinhardt
2025-04-14 19:42   ` [PATCH v2 00/16] reftable: overhaul the API to expose access to blocks Justin Tobler

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=Z_PFfwf4D8HtYr_a@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=jltobler@gmail.com \
    /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).