Re: [e2fsprogs] initdir: Writing inode after the initial write?

Darren Hart
2012-12-04T17:43:23Z

On 12/04/2012 02:59 AM, Andreas Dilger wrote:
> On 2012-12-03, at 12:46, Darren Hart <dvhart@infradead.org> wrote:
>>
>> It needs symlink as you said, but I can relatively easily migrate my
>> code for that in mke2fs to debugfs.
>>
>> Still needs permissions and such. Is that done with "modify_inode" ? If
>> so, how do I specify the new contents?
>
> "modify_inode" is not a terribly easy use interface. Probably better to add something like "chmod" and "chown" for debugfs as well.

I was thinking the same thing.

>
>> I need to look into how to detect and support hard links.
>
> I was wondering about that, and hoped you wouldn't need them. Maybe just keep a list if any files with nlink > 1 as { inode, pathname } as you go, and any inode with mlink > 1 are looked first in the duplicate list and the duplicate inode is hard linked to the original inode.
>
> Cheers, Andreas

Right, my thoughts as well. Thanks for the confirmation!

I don't know that I need them, but I imagine a complete solution will be
more acceptable than one that fits only our needs. So while we're in
there...

--
Darren