Re: help with ext3 reserved inode

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

 



On Tue, 2009-07-07 at 00:10 +0530, Manish Katiyar wrote:
> Hmm.. Can you try to write something like ext3_get_journal() and tell
> us the errors you are enountering. 

Here's the function I wrote:

/********************************************************/
struct inode *secdel_get_journal(struct super_block *sb)
{
	struct inode *journal;

	journal = ext3_iget(sb, 3);
	if (IS_ERR(journal)) {
		printk(KERN_ERR "ext3secdel - no journal found.\n");
		return NULL;
	}

	if (!S_ISREG(journal->i_mode)) {
		printk(KERN_ERR "ext3secdel - invalid journal inode.\n");
		iput(journal);
		return NULL;
	}

	return journal;
}
/********************************************************/

It doesn't crash, but stops on the first error, after the ext3_iget()
call and returns NULL.

> And also could you post what is the
> output of "stat <3>" after you have initialized your reserved inode.

Here's the output:

Inode: 3 Type: regular Mode: 0600 Flags: 0x0 Generation: 0x0
User: 0 Group: 0 Size: 0
File ACL: 0 Directory ACL: 0
Links: 0 Blockcount: 0
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x4622bea1 -- Mon Apr 16 08:09:05 2007
atime: 0x462a2136 -- Sat Apr 21 22:35:34 2007
mtime: 0x4622325e -- Sun Apr 15 22:10:38 2007
BLOCKS:

ps. never mind the dates, I put random values...

> Instead of trying to reference any pointer and do any operation, could
> you just try to print success or the errno from the ext3_iget()
> 
> Thanks -
> Manish
> 
Thank you,
Donato


--
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