public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Zebralla <daniel.zebralla@zebralla-it.de>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Re: umount leaks /dev/flash/ device slots
Date: Thu, 14 Nov 2013 10:15:00 -0000	[thread overview]
Message-ID: <1384424019410-250770.post@n7.nabble.com> (raw)
In-Reply-To: <4AA0E0BF.4010405@meduna.org>

Though this posting is from 2009, I just ran into the same problem recently.

We use a patched JFFS2 file system in eCos on a Freescale MPC5668 processor.
The umount-function there has not released the flash i/o handles, resulting
in exactly the described problem: After CYGNUM_IO_FLASH_BLOCK_DEVICES
remounts, mount failed because no flash handles were available any longer.

I now added the call to flashiodev_set_config to the umount function as
follows:
    if (--n_fs_mounted == 0) {
    	jffs2_destroy_slab_caches();
    	jffs2_compressors_exit();

    	// Release the flash device i/o handler
    	flashiodev_set_config(
    			jffs2_sb->s_dev,
    			CYG_IO_SET_CONFIG_CLOSE,
    			(void*) NULL,
    			0);
	}

This results in the 'fs-test3.c' test case provided with eCos to run
smoothly, re-mounting lots of times.

I wonder however:
1) The documentation "Using FLASH I/O devices" [1] speaks of the function
'cyg_io_setconfig' instead of 'flashiodev_set_config'. I haven't found
anything regarding this function name in my eCos base package besides two
occurrences in a manual file. Does this function even exist inside the code?
2) The function 'flashiodev_set_config' is statically declared inside
'flashiodev.c'. I had to mess up the code a bit to get this function to be
known inside the jffs2-source file as well. Wouldn't it make more sense if
functions like this would be declared inside a header file which can easily
be included elsewhere?

Regards
- Daniel

[1] http://ecos.sourceware.org/docs-3.0/ref/ecos-flash-iodevice-usage.html



--
View this message in context: http://sourceware-org.1504.n7.nabble.com/umount-leaks-dev-flash-device-slots-tp195700p250770.html
Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

      parent reply	other threads:[~2013-11-14 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04  9:41 [ECOS] " Stanislav Meduna
2009-09-04 10:11 ` [ECOS] CPULoad on i386 Jim Bradleigh
2009-09-04 15:09   ` Jim Bradleigh
2013-11-14 10:15 ` Daniel Zebralla [this message]

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=1384424019410-250770.post@n7.nabble.com \
    --to=daniel.zebralla@zebralla-it.de \
    --cc=ecos-discuss@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).