Re: [RFC PATCH v2 1/4] object: remove "used" field from struct object
- From
Ben Peart <peartben@gmail.com>
- Date
- Jul 20, 2017, 17:44 UTC
- Message-ID
- <dfa6a97c-683c-66d6-61f1-cf7cde6f8b16@gmail.com>
- In-Reply-To
- <20170719175512.4974d1a2@twelve2.svl.corp.google.com>
On 7/19/2017 8:55 PM, Jonathan Tan wrote:
Show 21 quoted lines
> On Wed, 19 Jul 2017 17:36:39 -0700 > Stefan Beller <sbeller@google.com> wrote: > >> On Wed, Jul 19, 2017 at 5:21 PM, Jonathan Tan <jonathantanmy@google.com> wrote: >>> The "used" field in struct object is only used by builtin/fsck. Remove >>> that field and modify builtin/fsck to use a flag instead. >> >> The patch looks good to me (I would even claim this could >> go in as an independent cleanup, not tied to the RFCish nature >> of the later patches), though I have a question: >> How did you select 0x0008 for USED, i.e. does it >> collide with other flags (theoretically?), and if so >> how do we make sure to avoid the collusion in >> the future? > > Thanks. 0x0008 was the next one in the series (as you can see in the > context). As for whether it collides with other flags, that is what the > chart in object.h is for (which I have added to in this patch), I > presume. As far as I can tell, each component must make sure not to > overlap with any other component running concurrently. >
This patch seems reasonable to me. I agree it could go in separately as a general cleanup.