Re: [PATCH 07/10] packed-backend: create "fsck_packed_ref_entry" to store parsing info

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

 



On Sun, Jan 05, 2025 at 09:50:10PM +0800, shejialuo wrote:
> We have already check whether the oid hash is correct by using
> `parse_oid_hex_algop`. However, we doesn't check whether the object
> exists. It may seem that we could do this when we are parsing the raw
> "packed-refs" file. But this is impossible. Let's analysis why.
> 
> We will use "parse_object" function to get the "struct object". However,
> this function will eventually call the "create_snapshot" and
> "next_record" function in "packed-backend.c". If there is anything
> wrong, it will die the program. And we don't want to die the program
> during the check.
> 
> So, we should store the information in the parsing process. And if there
> is nothing wrong in the parsing process, we could continue to check
> things. So, create "fsck_packed_ref_entry" to do this.

This step can be avoided if we made the check generic.

Patrick




[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