linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Huang Jianan via Linux-erofs <linux-erofs@lists.ozlabs.org>
To: Gao Xiang <xiang@kernel.org>
Cc: yh@oppo.com, kevin.liw@oppo.com, guoweichao@oppo.com,
	linux-erofs@lists.ozlabs.org, guanyuwei@oppo.com
Subject: Re: [PATCH V2] erofs-utils: fix random data for block-aligned uncompressed file
Date: Tue, 7 Sep 2021 21:54:05 +0800	[thread overview]
Message-ID: <1ecb04cf-9372-4470-48e3-cc88302c7a90@oppo.com> (raw)
In-Reply-To: <20210907132048.GA2401@hsiangkao-HP-ZHAN-66-Pro-G1>

在 2021/9/7 21:20, Gao Xiang 写道:
> On Tue, Sep 07, 2021 at 11:53:45AM +0800, Huang Jianan via Linux-erofs wrote:
>> If the file size is block-aligned for uncompressed files, i_u is
>> meaningless for erofs_inode on disk, but it's not cleared when
>> datalayout is seted in erofs_prepare_inode_buffer.
>>
>> This problem will cause inconsistent reproducible builds. Clear the
>> entire erofs_inode to zero to fix this.
>>
>> Signed-off-by: Huang Jianan <huangjianan@oppo.com>
> Reviewed-by: Gao Xiang <xiang@kernel.org>
>
> BTW, how about adding --from="Huang Jianan <huangjianan@oppo.com>" when
> sending patches with OPPO emails.
>
> Otherwise, it seems the author becomes
> "Huang Jianan via Linux-erofs <linux-erofs@lists.ozlabs.org>" when
> reaching to the mailing list and I have to update it by hand....
Thanks for pointing this out, I will pay attention next time.

Thanks,
Jianan
> Thanks,
> Gao Xiang
>
>> ---
>>   lib/inode.c | 12 +-----------
>>   1 file changed, 1 insertion(+), 11 deletions(-)
>>
>> diff --git a/lib/inode.c b/lib/inode.c
>> index 5bad75e..0cce07d 100644
>> --- a/lib/inode.c
>> +++ b/lib/inode.c
>> @@ -834,25 +834,15 @@ static struct erofs_inode *erofs_new_inode(void)
>>   	static unsigned int counter;
>>   	struct erofs_inode *inode;
>>   
>> -	inode = malloc(sizeof(struct erofs_inode));
>> +	inode = calloc(1, sizeof(struct erofs_inode));
>>   	if (!inode)
>>   		return ERR_PTR(-ENOMEM);
>>   
>> -	inode->i_parent = NULL;	/* also used to indicate a new inode */
>> -
>>   	inode->i_ino[0] = counter++;	/* inode serial number */
>>   	inode->i_count = 1;
>>   
>>   	init_list_head(&inode->i_subdirs);
>>   	init_list_head(&inode->i_xattrs);
>> -
>> -	inode->idata_size = 0;
>> -	inode->xattr_isize = 0;
>> -	inode->extent_isize = 0;
>> -
>> -	inode->bh = inode->bh_inline = inode->bh_data = NULL;
>> -	inode->idata = NULL;
>> -	inode->z_physical_clusterblks = 0;
>>   	return inode;
>>   }
>>   
>> -- 
>> 2.25.1
>>


  reply	other threads:[~2021-09-07 13:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06  8:13 [PATCH] erofs-utils: remove unnecessary "\n" Huang Jianan via Linux-erofs
2021-09-06  8:13 ` [PATCH] uerofs-utils: fix random data for block-aligned uncompressed file Huang Jianan via Linux-erofs
2021-09-07  0:10   ` Gao Xiang
2021-09-07  0:46     ` Gao Xiang
2021-09-07  2:54       ` Huang Jianan via Linux-erofs
2021-09-07  3:53   ` [PATCH V2] erofs-utils: " Huang Jianan via Linux-erofs
2021-09-07 13:20     ` Gao Xiang
2021-09-07 13:54       ` Huang Jianan via Linux-erofs [this message]
2021-09-07  0:08 ` [PATCH] erofs-utils: remove unnecessary "\n" Gao Xiang

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ecb04cf-9372-4470-48e3-cc88302c7a90@oppo.com \
    --to=linux-erofs@lists.ozlabs.org \
    --cc=guanyuwei@oppo.com \
    --cc=guoweichao@oppo.com \
    --cc=huangjianan@oppo.com \
    --cc=kevin.liw@oppo.com \
    --cc=xiang@kernel.org \
    --cc=yh@oppo.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).