Skip to contentSkip to conversation

ocfs2: should not use le32_add_cpu to set ocfs2_dinode i_flags

Ocfs2-devel Joseph Qi 2 participants 2 messages Jan 22, 2015 1 message not in the archive OCFS2

lore
Share & tools
lore

Joseph Qi

author
#1 lore raw
In reply to a message not in the archive

Hi Srini,

Quoted 4 lines · Srinivas Eeda

Hi Joesph,

thanks a lot for submitting the above patch. I am trying to understand what kind of flag corruption have you noticed and under what circumstances ? I agree with the patch that bitwise operations are better than adding, but I am not able to understand the corruption it could cause. Can you please share!

Suppose a the following case:
The dinode i_flag already has the OCFS2_ORPHANED_FL bit set, and calling le32_add_cpu again. Then it will corrupt the i_flag.

--
Joseph

Quoted 5 lines

Thanks,
--Srini

#2 lore raw

Ok, understood. Thanks for explaining :)

Quoted 20 lines · Joseph Qi

Hi Srini,

Quoted 4 lines · Srinivas Eeda

Hi Joesph,

thanks a lot for submitting the above patch. I am trying to understand what kind of flag corruption have you noticed and under what circumstances ? I agree with the patch that bitwise operations are better than adding, but I am not able to understand the corruption it could cause. Can you please share!

Suppose a the following case:
The dinode i_flag already has the OCFS2_ORPHANED_FL bit set, and calling le32_add_cpu again. Then it will corrupt the i_flag.

--
Joseph

Quoted 5 lines

Thanks,
--Srini