[Ocfs2-devel] [PATCH 0/2] ocfs2: two bug fixes about xattr and inline-data
tristan.ye
tristan.ye at oracle.com
Mon Mar 9 03:57:49 PDT 2009
On Mon, 2009-03-09 at 18:36 +0800, Tiger Yang wrote:
> Hi, all,
>
> Finally, Tristan and I found the reason why he could not reproduce bug2.
> It's very interesting.
>
> He runs the command "dd if=/dev/zero of=testfile bs=1 count=3641" which
> can not hit the bug2. But I found "dd if=/dev/zero of=testfile bs=3641
> count=1" will hit the bug2.
>
> I trace the source code in ocfs2_try_to_write_inline_data(). Those two
> commands run the different way in kernel. In first situation, the codes
> going into "handle inodes which already have inline data 1st", then
> fault at ocfs2_size_fits_inline_data(), then go
> ocfs2_conver_inline_data_to_extents(). In second situation, It passed
> the wrong check about inline data size: ocfs2_max_inline_data(), then
> cause the fault.
>
> As we discussed, Tristan will add the new command into his test script.
> Meanwhile he will reserve the old one because it cover more codes.
Cool, tiger.
After testing, these 2 bugs can be reproduced both on mainline and
joel's cacheme kernel tree,for bug1, acl_tests in ocfs2-test is good
enough to expose. for bug2, as you suggested, I may add a extra testcase
later.
Thanks,
Tristan
>
> thanks,
> tiger
>
> Tiger Yang wrote:
> > Hi,
> >
> > I think Tristan's test script could catch these two bugs against
> > mainline. He didn't run his test script in mainline yet.
> >
> > bug1:
> > Just create a file in a directory which has default ACLs.
> >
> > bug2:
> > 1. touch a file in a file system which blocksize large than 512.
> > 2. set xattr in it.
> > 3. write i_size > (MAX_INLINE_SIZE - 256).
> > then you can find the inline data overwrite the xattr in inode.
> >
> > thanks,
> > tiger
> >
> > Tao Ma wrote:
> >> Hi Tiger,
> >> so could you please describe how to reproduce these 2 bugs step by
> >> step? It would be easy for tristan to code them down and add them to the
> >> test case. And also we all can see whether we can reproduce them in our
> >> own env.
> >>
> >> Regards,
> >> Tao
> >>
> >> tristan.ye wrote:
> >>> On Sun, 2009-03-08 at 23:47 -0700, Joel Becker wrote:
> >>>> On Mon, Mar 09, 2009 at 02:35:36PM +0800, Tiger Yang wrote:
> >>>>> I found these two bugs in latest mainline kernel not other branch.
> >>>> The bugs should still be in cacheme - cacheme doesn't change
> >>>> the inline data code.
> >>> Fairly strange, I've already done the tests on cacheme branch, no such
> >>> bugs happened to me...
> >>>
> >>> Tristan
> >>>
> >>>> Joel
> >>>>
> >
> > _______________________________________________
> > 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
More information about the Ocfs2-devel
mailing list