From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28924 invoked by alias); 14 Nov 2013 10:15:48 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 28909 invoked by uid 89); 14 Nov 2013 10:15:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: sam.nabble.com Received: from Unknown (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 14 Nov 2013 10:13:47 +0000 Received: from tom.nabble.com ([192.168.236.105]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Vgtvf-00033y-DZ for ecos-discuss@ecos.sourceware.org; Thu, 14 Nov 2013 02:13:39 -0800 Date: Thu, 14 Nov 2013 10:15:00 -0000 From: Daniel Zebralla To: ecos-discuss@ecos.sourceware.org Message-ID: <1384424019410-250770.post@n7.nabble.com> In-Reply-To: <4AA0E0BF.4010405@meduna.org> References: <4AA0E0BF.4010405@meduna.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [ECOS] Re: umount leaks /dev/flash/ device slots X-SW-Source: 2013-11/txt/msg00013.txt.bz2 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