From: "Joakim Tjernlund" <joakim.tjernlund@transmode.se>
To: "'David Woodhouse'" <dwmw2@infradead.org>
Cc: 'Linux-MTD Mailing List' <linux-mtd@lists.infradead.org>
Subject: RE: getdents64 problem in 2.6.23
Date: Sat, 27 Oct 2007 01:03:37 +0200 [thread overview]
Message-ID: <023b01c81824$71647f40$5267a8c0@Jocke> (raw)
In-Reply-To: <1193426035.16168.41.camel@shinybook.infradead.org>
> -----Original Message-----
> From: David Woodhouse [mailto:dwmw2@infradead.org]
> Sent: den 26 oktober 2007 21:14
> To: joakim.tjernlund@transmode.se
> Cc: Linux-MTD Mailing List
> Subject: Re: getdents64 problem in 2.6.23
>
> On Wed, 2007-10-24 at 15:47 +0200, Joakim Tjernlund wrote:
> > started to use 2.6.23 in our development system a few days ago and
> > now I got problems when deleting files from a large directory
> > structure. A rm -rf does not delete all files.
> >
> > Did a strace and found that some files does not appear in the
> > strace, the same ones that doesn't get deleted.
>
> Following up on the IRC conversation... the problem here is the horrid
> readdir() interface, and how it interacts with f_pos on the
> directory's
> file descriptor. The file position simply represents the offset within
> the linked list of dirents -- which used to be fairly safe,
> because when
> we unlinked something, we'd write out a 'deletion dirent', which would
> serve as a placeholder in the list.
>
> Someone changed that code recently though, and those deletion dirents
> are no longer written on NOR flash.... :)
Yeah, I wonder who that was. Can't really recall :)
>
> The answer is probably to keep a 'deletion dirent' in the
> f->dents list
> of jffs2_full_dirents, but with NULL for the 'raw' field. I think that
> shouldn't break any other part of the code. Then you'd want to remove
> those dummy dirents when the filedescriptor for the directory in
> question is closed.
Is this what you mean(just a stupid hack for now)?
//*prev = this->next;
jffs2_mark_node_obsolete(c, (this->raw));
this->raw = NULL;
//jffs2_free_full_dirent(this);
Perhaps add a jffs2_add_fd_to_list(c, this, &dir_f->dents)?
How do I find where the filedescriptor is closed?
Jocke
next prev parent reply other threads:[~2007-10-26 23:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 13:47 getdents64 problem in 2.6.23 Joakim Tjernlund
2007-10-25 21:36 ` Joakim Tjernlund
2007-10-26 19:13 ` David Woodhouse
2007-10-26 23:03 ` Joakim Tjernlund [this message]
2007-10-26 23:17 ` David Woodhouse
2007-10-27 11:02 ` Joakim Tjernlund
2007-10-27 12:44 ` David Woodhouse
2007-10-27 15:01 ` Joakim Tjernlund
2007-10-27 17:09 ` David Woodhouse
2007-10-27 17:20 ` Joakim Tjernlund
2007-10-27 20:31 ` Joakim Tjernlund
2007-10-27 22:36 ` David Woodhouse
2007-10-28 0:04 ` Joakim Tjernlund
2007-10-27 23:18 ` Jörn Engel
2007-10-28 2:00 ` David Woodhouse
2007-10-28 11:52 ` Jörn Engel
2007-10-28 18:28 ` Jamie Lokier
2007-10-28 23:49 ` Jörn Engel
2007-10-28 23:58 ` Joakim Tjernlund
2007-10-29 0:26 ` David Woodhouse
2007-10-29 12:58 ` Joakim Tjernlund
2007-10-29 17:30 ` Joakim Tjernlund
2007-10-29 23:41 ` Joakim Tjernlund
2007-10-30 17:42 ` Joakim Tjernlund
2007-10-31 2:08 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='023b01c81824$71647f40$5267a8c0@Jocke' \
--to=joakim.tjernlund@transmode.se \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox