Re: [PATCH] bcache: correct journal bucket reading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tang--

I think the scenario you listed can't happen, because the first bucket
we try in the hash-search is 0.  If the circular buffer has wrapped,
that will be detected immediately and we'll leave the loop with l=0.
We should add a comment that we need to try the first index first for
correctness so that we don't inadvertently change this behavior.

One thing took me a long time to convince myself was safe with the
original code:  If we have 'YYNYYYYYYY', we'll start at l=0, and then
we'll search across the N;  I think this is OK because sequence
numbers will cause us to do the right thing.

Mike

On Wed, Nov 1, 2017 at 12:10 AM,  <tang.junhui@xxxxxxxxxx> wrote:
> From: Tang Junhui <tang.junhui@xxxxxxxxxx>
>
> Hello Mike, Coly
>
> I found this issue by code reading.
> It looks serious.
> May I am wrong.
> Please have a review.
>
> Thanks,
> Tang
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux