ocfs2: two bug fixes about xattr and inline-data
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 2 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 2 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Ocfs2-devel] [PATCH 0/2] ocfs2: two bug fixes about xattr and inline-data
Hi, all,
I found these two bugs in latest mainline kernel not other branch.
thanks,
tiger
Quoted 89 lines · tristan.ye
Quoted 8 lines · Tao Ma
Quoted 7 lines · tristan.ye
Quoted 3 lines · Tao Ma
Hi tristan,
the first bug should happen when you create a directory with acl. So do
you have the test case for that?Yes, I can add this.
Quoted 2 lines
The second one should happen when you try to try to the inline file and
then you will lose the xattr entry you set.Quoted 8 lines
Quoted 4 lines
Actually, I've had similar testcase, and it never failed to me, that means a previously set xattr entry which has reserved 256 bytes in inode never be affected or overwriten by the following inline-data writing attempt when
i_size>MAX_INLINE_SIZE- 256.Just go through the code and guess ;) the process should be:
1. fill in some inline data.
2. set entry
3. writei_size>MAX_INLINE_SIZE- 256.I still can not reproduce this bug with your testing step on joel's cacheme branch, maybe it is a regression bug on mainline kernel, tiger, how did you think about it?
Quoted 60 lines
I guess your case miss step 1.
Tiger,
Can bug 2 reproduced by my guess steps?Regards,
TaoQuoted 53 lines
Regards,
TristanQuoted 46 lines
Regards,
TaoQuoted 42 lines · tristan.ye
Quoted 4 lines · Joel Becker
Quoted 1 line · Tiger Yang
I found two serious bugs about xattr and inline-data.
Tristan,
Can you add tests for this in the xattr suite? Thanks!Of course, I'll be looking back to my testcases, and add these if missed.
Actually, I've already had inline-data&inline-xattr combination tests in xattr testing suite, how can I misse such boundary cases?
Tiger,
Thanks for posting the cases:)
Regards,
TristanQuoted 18 lines
Joel
Quoted 16 lines
the first bug:
inocfs2_mknod(), we check and found the ACL or security xattr entry could be set into inode inocfs2_calc_xattr_init(), then don't reserve block for them. But inocfs2_mknod_locked(), if we found ocfs2 support inline-data, then setid_countwith themax_inline_data. After that, we set acl/security xattr entry inocfs2_init_acl()orocfs2_init_security_set(), but in there we found inode is full, then panic atocfs2_claim_metadatainocfs2_xattr_block_set.the second bug:
we don't check inline xattr inocfs2_try_to_write_inline_data(), so the inline data may overwrite the xattr entries which have already in inode.thanks,
tiger_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel