From: William Baker <email@example.com> To: Kevin Willford <Kevin.Willford@microsoft.com>, Junio C Hamano <firstname.lastname@example.org>, Utsav Shah via GitGitGadget <email@example.com>, William Baker <William.Baker@microsoft.com> Cc: "firstname.lastname@example.org" <email@example.com>, Utsav Shah <firstname.lastname@example.org> Subject: Re: [PATCH 0/1] fsmonitor: skip sanity check if the index is split Date: Mon, 11 Nov 2019 09:30:56 -0800 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <BN6PR21MB07869E8D1DCAF189C4E472A891740@BN6PR21MB0786.namprd21.prod.outlook.com> On 11/11/19 8:55 AM, Kevin Willford wrote: >> >> The istate->cache is a dynamic array whose size is managed via the usual >> ALLOC_GROW() using istate->cache_nr and istate->cache_alloc, whether the >> split-index feature is in use. When your patch makes a difference, then, >> doesn't the access to istate->cache pick up a random garbage and then flip >> the bit? >> >> Puzzled... In any case, "check is worse than over-eager, it simply is wrong" I >> wrote in the message I am responding to is totally incorrect, it seems. It >> smells like lifting the check would just hide the underlying problem under the >> rug? > > I agree. The only 2 places that excluding the split-index make sense are in > read_fsmonitor_extension and write_fsmonitor_extension because the > index_state that is being passing into those methods could be the delta index > in which case the number of entries for the fsmonitor bitmap would almost > always be more and cause the BUG to be hit which it should not be. > > The reason it is not needed and should not be in the other 2 places is they > are ran from tweak_fsmonitor which is ran at post_read_index_from which > is after the base and delta indexes have been loaded into the indes_state and > the index_state will have all the entries and if the fsmonitor bitmap is bigger > than the number of entries then the BUG should be hit. > I agree. While working on the 3444ec2e patch I missed that read_fsmonitor_extension and write_fsmonitor_extension could be called with the delta index rather than the full index. I think it makes sense to leave the check in the other two places. Thanks, William
next prev parent reply other threads:[~2019-11-11 17:31 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-08 7:09 Utsav Shah via GitGitGadget 2019-11-08 7:09 ` [PATCH 1/1] " Utsav Shah via GitGitGadget 2019-11-12 11:18 ` SZEDER Gábor 2019-11-12 21:08 ` Utsav Shah 2019-11-11 1:43 ` [PATCH 0/1] " Junio C Hamano 2019-11-11 2:01 ` Junio C Hamano 2019-11-11 16:55 ` Kevin Willford 2019-11-11 17:25 ` Utsav Shah 2019-11-11 18:21 ` Kevin Willford 2019-11-11 17:30 ` William Baker [this message] 2019-11-13 1:30 ` Junio C Hamano 2019-11-14 2:55 ` Utsav Shah 2019-11-14 16:41 ` William Baker 2019-11-15 5:04 ` Junio C Hamano
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 List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --cc=Kevin.Willford@microsoft.com \ --cc=William.Baker@microsoft.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH 0/1] fsmonitor: skip sanity check if the index is split' \ /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
Code repositories for project(s) associated with this inbox: https://80x24.org/mirrors/git.git 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 read-only IMAP folder(s) and NNTP newsgroup(s).