* [PATCH] fsck: fix missing endian conversion
@ 2018-01-26 9:31 Yunlei He
2018-01-27 3:29 ` Chao Yu
0 siblings, 1 reply; 4+ messages in thread
From: Yunlei He @ 2018-01-26 9:31 UTC (permalink / raw)
To: jaegeuk, yuchao0, linux-f2fs-devel; +Cc: ning.jia, heyunlei
This patch fix missing endian conversion in function
build_nat_area_bitmap
Signed-off-by: Yunlei He <heyunlei@huawei.com>
---
fsck/mount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index fe0d510..5289a1b 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -2225,7 +2225,7 @@ void build_nat_area_bitmap(struct f2fs_sb_info *sbi)
if (fsck->entries[nid].block_addr != 0x0) {
fsck->chk.valid_nat_entry_cnt--;
f2fs_clear_bit(nid, fsck->nat_area_bitmap);
- if (fsck->entries[nid].ino == nid)
+ if (le32_to_cpu(fsck->entries[nid].ino) == nid)
fsck->nat_valid_inode_cnt--;
}
--
1.9.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fsck: fix missing endian conversion
2018-01-26 9:31 [PATCH] fsck: fix missing endian conversion Yunlei He
@ 2018-01-27 3:29 ` Chao Yu
2018-01-27 3:53 ` heyunlei
0 siblings, 1 reply; 4+ messages in thread
From: Chao Yu @ 2018-01-27 3:29 UTC (permalink / raw)
To: Yunlei He, jaegeuk, linux-f2fs-devel; +Cc: ning.jia
On 2018/1/26 17:31, Yunlei He wrote:
> This patch fix missing endian conversion in function
> build_nat_area_bitmap
I note that there are some missing cases for f2fs_nat_entry::blocik_addr,
how about fixing them in this patch too?
Thanks,
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fsck: fix missing endian conversion
2018-01-27 3:29 ` Chao Yu
@ 2018-01-27 3:53 ` heyunlei
2018-01-27 5:47 ` Chao Yu
0 siblings, 1 reply; 4+ messages in thread
From: heyunlei @ 2018-01-27 3:53 UTC (permalink / raw)
To: Yuchao (T), jaegeuk, linux-f2fs-devel; +Cc: Jianing (Euler)
>-----Original Message-----
>From: Yuchao (T)
>Sent: Saturday, January 27, 2018 11:30 AM
>To: heyunlei; jaegeuk@kernel.org; linux-f2fs-devel@lists.sourceforge.net
>Cc: Wangbintian; Jianing (Euler)
>Subject: Re: [f2fs-dev][PATCH] fsck: fix missing endian conversion
>
>On 2018/1/26 17:31, Yunlei He wrote:
>> This patch fix missing endian conversion in function
>> build_nat_area_bitmap
>
>I note that there are some missing cases for f2fs_nat_entry::blocik_addr,
>how about fixing them in this patch too?
2224 /* Clear the original bit and count */
2225 if (fsck->entries[nid].block_addr != 0x0) {
You mean here? I checked the whole function and found only here
exist this problem. Because of comparing with zero, so I didn't change
here in previous patch.
Thanks.
2226 fsck->chk.valid_nat_entry_cnt--;
2227 f2fs_clear_bit(nid, fsck->nat_area_bitmap);
2228 if (le32_to_cpu(fsck->entries[nid].ino) == nid)
2229 fsck->nat_valid_inode_cnt--;
2230 }
>
>Thanks,
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fsck: fix missing endian conversion
2018-01-27 3:53 ` heyunlei
@ 2018-01-27 5:47 ` Chao Yu
0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2018-01-27 5:47 UTC (permalink / raw)
To: heyunlei, jaegeuk, linux-f2fs-devel; +Cc: Jianing (Euler)
On 2018/1/27 11:53, heyunlei wrote:
>
>
>> -----Original Message-----
>> From: Yuchao (T)
>> Sent: Saturday, January 27, 2018 11:30 AM
>> To: heyunlei; jaegeuk@kernel.org; linux-f2fs-devel@lists.sourceforge.net
>> Cc: Wangbintian; Jianing (Euler)
>> Subject: Re: [f2fs-dev][PATCH] fsck: fix missing endian conversion
>>
>> On 2018/1/26 17:31, Yunlei He wrote:
>>> This patch fix missing endian conversion in function
>>> build_nat_area_bitmap
>>
>> I note that there are some missing cases for f2fs_nat_entry::blocik_addr,
>> how about fixing them in this patch too?
>
> 2224 /* Clear the original bit and count */
> 2225 if (fsck->entries[nid].block_addr != 0x0) {
>
> You mean here? I checked the whole function and found only here
> exist this problem. Because of comparing with zero, so I didn't change
> here in previous patch.
Yes, how about just using if (f2fs_nat_entry::blocik_addr) in both
write_nat_bits and build_nat_area_bitmap.
Thanks,
>
> Thanks.
>
> 2226 fsck->chk.valid_nat_entry_cnt--;
> 2227 f2fs_clear_bit(nid, fsck->nat_area_bitmap);
> 2228 if (le32_to_cpu(fsck->entries[nid].ino) == nid)
> 2229 fsck->nat_valid_inode_cnt--;
> 2230 }
>
>>
>> Thanks,
>
>
> .
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-27 5:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26 9:31 [PATCH] fsck: fix missing endian conversion Yunlei He
2018-01-27 3:29 ` Chao Yu
2018-01-27 3:53 ` heyunlei
2018-01-27 5:47 ` Chao Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.