[Ocfs2-tools-devel] [PATCH 10/10] dx_dirs v6: add disable indexed-dirs support in tunefs.ocfs2
Coly Li
coly.li at suse.de
Thu Jan 28 18:30:16 PST 2010
On 2010年01月29日 10:13, Mark Fasheh Wrote:
> On Fri, Jan 29, 2010 at 08:44:44AM +0800, Coly Li wrote:
>>>
>>>> +static int disable_indexed_dirs(ocfs2_filesys *fs, int flags)
>>>> +{
>>>> + errcode_t ret = 0;
>> [snip]
>>>> + tunefs_block_signals();
>>>> + ret = clean_indexed_dirs(fs, &ctxt);
>>>> + if (ret) {
>>>> + tcom_err(ret, "while truncate indexed directories");
>>>> + }
>>>> + /* We already touched file system, must disable dx dirs flag here.
>>>> + * XXX: fsck.ocfs2 will handle the orphan indexed trees. */
>>>
>>> Is the "XXX: fsck.ocfs2 will handle the orphan indexed trees." comment still
>>> true? It should only be a matter of a few lines of code to iterate the
>>> system directory...
>>
>> If clean_indexed_dirs() does not truncate all the indexed trees and returns an error...
>> In this condition, IMHO, the indexed dir flag should be removed from the super block, but there are still some indexed
>> trees not truncated. This comment means, in fsck.ocfs2, if (!ocfs2_supports_indexed_dirs(supper)), it's also necessary
>> to check the direcotry inode's dynamic feature flag, if there is indexed tree, truncate it.
>>
>> Maybe I used an incorrect term 'orphan', does it have specific meaning in ocfs2 ?
>
> Oh, I see what you mean there. When you said "orphan" i thought you meant
> the orphan directories (where unlinked inodes go). Ultimately, we want
> mkfs.ocfs2 to create them as indexed too. Anyway, what you *really* meant is
> orphaned indices, which makes more sense now. Disregard my previous question
> then :)
Thanks for the explanation, it's clear to me now ;-)
--
Coly Li
SuSE Labs
More information about the Ocfs2-tools-devel
mailing list