Re: reverse link from bucket to keys

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

 



sure, in your btree.c code, when you do btree gc, you update the
bucket's used sectors by min(unsigned, GC_SECTORS_USED(b)+key_size(),
1<<14-1). this might get you larger than the bucket size. since the
newly allocated bucket is set to bucket size already. so each round
you will accumulate the key_size(). i print the information at that
point, and see GC_SECTORS_USED > bucket size.

Thanks,
Sheng

On Thu, Jul 11, 2013 at 10:25 PM, Kent Overstreet <kmo@xxxxxxxxxxxxx> wrote:
> On Thu, Jul 11, 2013 at 10:22:02PM -0400, sheng qiu wrote:
>> Hi Kent,
>>
>> thanks for the explain above. my concern is that the GC_SECTORS_USED
>> does not get you the correct valid data size within each bucket. for
>> example, the GC_SECTORS_USED might return you larger than the bucket
>> size, while when you go to match the reserved_sectors, you might get
>> wrong.  i do not know if you get my meaning. A simple way is run some
>> test while enable the GC code, you will see how it work actually. If
>> it's my misunderstanding, i am glad to hear from you later.
>
> I'm not sure I follow - if GC_SECTORS_USED was > bucket size that'd
> probably be a bug, but I don't see how that could happen - could you
> explain?



-- 
Sheng Qiu
Texas A & M University
Room 332B Wisenbaker
email: herbert1984106@xxxxxxxxx
College Station, TX 77843-3259
--
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