public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* JFFS2: scan leaves dirent for inode which has no valid data nodes
@ 2006-04-27  7:40 Dmitry Bazhenov
  2006-04-27 13:59 ` David Woodhouse
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Bazhenov @ 2006-04-27  7:40 UTC (permalink / raw)
  To: linux-mtd

Hi,

I am running Linux 2.4.26 for MIPS-4k custom board and has the problem wich 
appears from time to time on one of the JFFS2 partitions.

The partition is mounted to /etc mount point. The following screenshot shows 
the problem (I have changed the real file name for confidentiality).

# touch /etc/any.file
touch: /etc/any.file: Input/output error
# echo ddd > /etc/any.file
/etc/any.file: cannot create (Input/output error)

It is worth to note, that 'ls' utility doesn't show this file in the list.

I have made a dump of the partition and examined it. I have found that there 
is a valid dirent for the file and there is no valid data nodes (all are 
obsolete).

The curcumstances that proceeded the appearance of the situation are unknown. 
It is also unknown was it a powerfail or it was a normal functioning.

My questions are:

1. Should the scan process during mounting mark as obsolete dirent nodes which 
has no valid data nodes?
2. Is this a bug when such dirent exists and there is no chanse to 
create/read/write a file with the same name?

I have browsed the mailing list archive and haven't found (or just missed) the 
problem in it. Maybe the problem were resolved in more recent 2.4.x kernels.

Any information would be appreciated.

Thanks,
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: JFFS2: scan leaves dirent for inode which has no valid data nodes
  2006-04-27  7:40 JFFS2: scan leaves dirent for inode which has no valid data nodes Dmitry Bazhenov
@ 2006-04-27 13:59 ` David Woodhouse
  2006-04-27 14:19   ` Dmitry Bazhenov
  0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2006-04-27 13:59 UTC (permalink / raw)
  To: Dmitry Bazhenov; +Cc: linux-mtd

On Thu, 2006-04-27 at 11:40 +0400, Dmitry Bazhenov wrote:
> 1. Should the scan process during mounting mark as obsolete dirent
> nodes which has no valid data nodes?

Maybe. We don't keep track of such things though -- and when we detect
it we _know_ there's something wrong, so it's not clear that writing to
the file system is the right thing to do.

> 2. Is this a bug when such dirent exists and there is no chanse to 
> create/read/write a file with the same name?

You should still be able to unlink it.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: JFFS2: scan leaves dirent for inode which has no valid data nodes
  2006-04-27 13:59 ` David Woodhouse
@ 2006-04-27 14:19   ` Dmitry Bazhenov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Bazhenov @ 2006-04-27 14:19 UTC (permalink / raw)
  To: linux-mtd

On Thursday 27 April 2006 17:59, David Woodhouse wrote:
> You should still be able to unlink it.

I was not and I am still not able to do any operation upon the file. The 
jffs2_read_inode() function marked the inode as bad and all I/O operations 
return EIO, even unlink() does.

For the moment, I have to find and eliminate the reason(s) that could lead to 
appearance of the situation. I think, there is some kind of a race here. My 
experience with the filesystem is much to be desired and I would appreciate 
any points to the possible places of error.

Thanks,
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-27 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-27  7:40 JFFS2: scan leaves dirent for inode which has no valid data nodes Dmitry Bazhenov
2006-04-27 13:59 ` David Woodhouse
2006-04-27 14:19   ` Dmitry Bazhenov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox