From: Gary Thomas <gary@mlbassoc.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: eCos Maintainers <ecos-maintainers@ecos.sourceware.org>,
dwmw2@cambridge.redhat.com
Subject: Re: FWD: JFFS2 : Node info mutex fix suggestion.
Date: Tue, 17 Feb 2004 14:11:00 -0000 [thread overview]
Message-ID: <1077027103.17692.32.camel@hermes> (raw)
In-Reply-To: <20040216170742.GF29388@lunn.ch>
On Mon, 2004-02-16 at 10:07, Andrew Lunn wrote:
> Hi Folks
>
> Does anybody know how locking should work in the jffs2 package?
>
> To me this patch looks the wrong solution.
I agree. I did already pass this to David, with no reply :-(
>
> Thanks
> Andrew
>
> ----- Forwarded message from Alf Nilsson <alf.nilsson@abem.se> -----
>
> Date: Thu, 12 Feb 2004 17:19:31 +0100
> From: Alf Nilsson <alf.nilsson@abem.se>
> To: ecos-patches@sources.redhat.com
> Subject: JFFS2 : Node info mutex fix suggestion.
> X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
> version=2.63
>
> When running a project with priority inheritance we noticed that all the
> threads that passed though JFFS did not return to their original
> priority. This due to the mutex count in the jffs2_inode_info was in
> some cases 2 as lowest. We found that this depended on a call to
> fs-ecos.c:jffs2_init_inode_info in fs-ecos.c:jffs2_new_inode. The 2nd
> call in fs-ecos.c:jffs2_new_inode that increases the mutex occurs in
> read.c:jffs2_do_new_inode.
> This might not be the ultimate solution, but it seemed like the right
> place to place the patch, but I'm open for suggestions.
>
> Regards,
> Alf Nilsson
>
> Index: current/ChangeLog
> ===================================================================
> RCS file: /cvs/ecos/ecos/packages/fs/jffs2/current/ChangeLog,v
> retrieving revision 1.24
> diff -u -w -p -r1.24 ChangeLog
> --- current/ChangeLog 27 Jan 2004 10:49:06 -0000 1.24
> +++ current/ChangeLog 12 Feb 2004 16:01:10 -0000
> @@ -1,3 +1,10 @@
> +2004-02-12 Alf Nilsson <alf.nilsson@abem.se>
> +
> + * src/fs-ecos.c: Removed call to jffs2_init_inode_info in
> + jffs2_new_inode. The call resulted in the mutex in the inode_info
> + being locked twice. The 2nd lock is in the call to
> + jffs2_do_new_inode.
> +
> 2004-01-09 Thomas Koeller <thomas.koeller@baslerweb.com>
>
> * src/fs-ecos.c: Fixed inode reference counting in jffs2_ops_link().
> Index: current/src/fs-ecos.c
> ===================================================================
> RCS file: /cvs/ecos/ecos/packages/fs/jffs2/current/src/fs-ecos.c,v
> retrieving revision 1.17
> diff -u -w -p -r1.17 fs-ecos.c
> --- current/src/fs-ecos.c 27 Jan 2004 10:49:06 -0000 1.17
> +++ current/src/fs-ecos.c 12 Feb 2004 16:01:11 -0000
> @@ -1849,7 +1849,7 @@ struct _inode *jffs2_new_inode (struct _
> return ERR_PTR(-ENOMEM);
>
> f = JFFS2_INODE_INFO(inode);
> - jffs2_init_inode_info(f);
> + memset(f, 0, sizeof(*f));
>
> memset(ri, 0, sizeof(*ri));
> /* Set OS-specific defaults for new inodes */
>
>
> ----- End forwarded message -----
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
next prev parent reply other threads:[~2004-02-17 14:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-16 17:07 Andrew Lunn
2004-02-17 14:11 ` Gary Thomas [this message]
2004-02-17 14:58 ` David Woodhouse
2004-02-17 15:09 ` Gary Thomas
2004-02-17 15:42 ` Gary Thomas
2004-02-17 15:59 ` 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=1077027103.17692.32.camel@hermes \
--to=gary@mlbassoc.com \
--cc=andrew@lunn.ch \
--cc=dwmw2@cambridge.redhat.com \
--cc=ecos-maintainers@ecos.sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).