[Ocfs2-tools-devel] [PATCH 06/10] Dir operation modification for inline data.
Joel Becker
Joel.Becker at oracle.com
Fri Jul 11 21:36:56 PDT 2008
On Sat, Jul 12, 2008 at 12:27:50PM +0800, Tao Ma wrote:
>> I know why you did it, I just don't like the consequences.
>> ocfs2_insert_extent() can't handle an i_size that isn't 0?
> no, ocfs2_insert_extent need the initialized extent list. So I
> initialized it and write it out(actually it doesn't care i_size).
Oh, right, you totally squash it. Yeah, if only we had a
journal. Never mind.
>> [No loop at all]
>> retval = ocfs2_dir_iterate(fs, dir,
>> OCFS2_DIRENT_FLAG_INCLUDE_EMPTY,
>> NULL, link_proc, &ls);
>> if (retval)
>> return retval;
>> if (!ls.done) {
>> retval = ocfs2_expand_dir(fs, dir);
>> if (retval)
>> return retval;
>>
>> retval = ocfs2_dir_iterate(fs, dir,
>> OCFS2_DIRENT_FLAG_INCLUDE_EMPTY,
>> NULL, link_proc, &ls);
>> if (retval)
>> return retval;
>> if (!ls.done)
>> return OCFS2_ET_INTERNAL_FAILURE;
>> }
> Yeah, I like the 2nd one. It is a little like what we used to call
> ocfs2_link/ocfs2_expand_dir, hehe. Thanks.
Yeah, that's precisely what I mean. And it's clean to read.
Joel
--
"I inject pure kryptonite into my brain.
It improves my kung fu, and it eases the pain."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list