[PATCH v2 0/5] trace2 output for bitmap decision path

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

 



Sorry for the late patch. Main diffs from v1:

1. Add a new commit to rename "idx_name" and this may clear up
some misconceptions about the naming

2. Add the warnings more detailed when opening bitmap and also
let the texts support translation.

3. using error() instead of silently returning -1 when opening
bitmap.

4. Continue looping when first MIDX bitmap is found.

Thanks.

Teng Long (5):
  pack-bitmap.c: continue looping when first MIDX bitmap is found
  pack-bitmap.c: rename "idx_name" to "bitmap_name"
  pack-bitmap.c: make warnings more detailed when opening bitmap
  bitmap: add trace2 outputs during open "bitmap" file
  pack-bitmap.c: using error() instead of silently returning -1

 pack-bitmap.c           | 73 ++++++++++++++++++++++++++++-------------
 repo-settings.c         |  1 +
 t/t5310-pack-bitmaps.sh |  3 +-
 3 files changed, 54 insertions(+), 23 deletions(-)

Range-diff against v1:
1:  3048b4dd29 ! 1:  1bfd2fb6ab pack-bitmap.c: use "ret" in "open_midx_bitmap()"
    @@ Metadata
     Author: Teng Long <dyroneteng@xxxxxxxxx>
     
      ## Commit message ##
    -    pack-bitmap.c: use "ret" in "open_midx_bitmap()"
    +    pack-bitmap.c: continue looping when first MIDX bitmap is found
     
    -    Let's use "ret" value for "return" statement in "open_midx_bitmap()"
    -    just as the same way as int "open_pack_bitmap()".
    +    In "open_midx_bitmap()", we do a loop with the MIDX(es) in repo, when
    +    the first one has been found, then will break out by a "return"
    +    directly.
     
    +    But actually, it's better to don't stop the loop until we have visited
    +    both the MIDX in our repository, as well as any alternates (along with
    +    _their_ alternates, recursively).
    +
    +    The discussion link of community:
    +
    +      https://public-inbox.org/git/YjzCTLLDCby+kJrZ@nand.local/
    +
    +    Helped-by: Taylor Blau <me@xxxxxxxxxxxx>
         Signed-off-by: Teng Long <dyroneteng@xxxxxxxxx>
     
      ## pack-bitmap.c ##
    @@ pack-bitmap.c: static int open_pack_bitmap(struct repository *r,
      	assert(!bitmap_git->map);
      
      	for (midx = get_multi_pack_index(r); midx; midx = midx->next) {
    --		if (!open_midx_bitmap_1(bitmap_git, midx))
    + 		if (!open_midx_bitmap_1(bitmap_git, midx))
     -			return 0;
    -+		if (!open_midx_bitmap_1(bitmap_git, midx)) {
     +			ret = 0;
    -+			break;
    -+		}
      	}
     -	return -1;
     +	return ret;
2:  70500b6343 < -:  ---------- pack-bitmap.c: add "break" statement in "open_pack_bitmap()"
3:  9912450fc1 < -:  ---------- bitmap: add trace outputs during open "bitmap" file
-:  ---------- > 2:  1fff3b3ca7 pack-bitmap.c: rename "idx_name" to "bitmap_name"
-:  ---------- > 3:  5a8f5afccf pack-bitmap.c: make warnings more detailed when opening bitmap
-:  ---------- > 4:  2016ef2e34 bitmap: add trace2 outputs during open "bitmap" file
-:  ---------- > 5:  1a169d7b5e pack-bitmap.c: using error() instead of silently returning -1
-- 
2.35.1.583.g30faa5f068




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux