Re: help with ext3 reserved inode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 5, 2009 at 10:28 PM, Donato Capitella<d.capitella@xxxxxx> wrote:
> Well, as it's a reserved inode, I didn't create it. stat <3> shows that
> the inode has bad type... so this might be the problem. But how am I
> supposed to initialize the inode fields if I can't read it?

What are you reserving it for ? Note that the reserved inodes today (2
for root) & (8 for journal commonly) both are initialized during mkfs.
You also need to do something similar. Depending on what you are using
it for you may need to initialize it properly. To do that you can do
the following :-

a) Either write a simple C program to write the fields properly at
correct offset.
b) Hack the code of mkfs to include your inode too.
c) Use debugfs to change the contents of inode 3. This is the easiest
option but I am not sure if you can modify all the fields of the
inode, so it depends on what you need.

Thanks -
Manish

>
>
> On Sun, 2009-07-05 at 22:06 +0530, Manish Katiyar wrote:
>> On Sun, Jul 5, 2009 at 7:30 PM, Donato Capitella<d.capitella@xxxxxx> wrote:
>> > Hi there,
>> > I need some help with a patch to the ext3 filesystem I'm developing. I'm
>> > completelly new to kernel programming and I need to understand
>> > practically how to use one of the ext3 reserved inode for storing a log.
>> >
>> > I thought it would be just as easy as getting the inode with the
>> > ext3_iget() function, but it doesn't seem to be the case. For example,
>> > if I try to load the third reserved inode like this :
>> >
>> > inode = ext3_iget(sb, 3);
>> >
>> > ext3_iget() fails somehow and crashes the process with a NULL pointer
>> > reference. What am I missing here?
>> Have you created the inode 3 ? What entries does it have ? What does
>> "stat <3>" show from the debugfs ?
>>
>> Thanks -
>> Manish
>>
>>
>> > How do you use a reserved inode? Can
>> > anybody point to some documentation or project that uses reserved
>> > inodes?
>> >
>> > I'm really stuck :(
>> >
>> > Thanks a lot,
>> > Donato Capitella
>> >
>> >
>> >
>> > --
>> > To unsubscribe from this list: send an email with
>> > "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
>> > Please read the FAQ at http://kernelnewbies.org/FAQ
>> >
>> >
>>
>>
>>
>
>



-- 
Thanks -
Manish

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux