All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sebastian" <sebastian.vaitus@masstechgroup.com>
To: "David Woodhouse" <dwmw2@infradead.org>
Cc: <linux-mtd@lists.infradead.org>
Subject: Re: No space left on device
Date: Wed, 27 Mar 2002 13:49:37 -0500	[thread overview]
Message-ID: <005a01c1d5c0$26756730$be04010a@MTG016> (raw)
In-Reply-To: 8945.1016645253@redhat.com

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

David,

I have logged the output for the problem described in a previous email
(attached below). I am using 6 erase blocks this time instead of 8 (which
should still be enough for the 280 byte JFFS2 image). From what I saw in the
logs, I think that JFFS is only able to use the first block out of the 6 due
to some formatting or erasing problem with the rest of 5 blocks. Please have
a  look at the attached log and maybe you'll be able to easily identify the
problem..

Regards,
Sebastian

>
> sebastian.vaitus@masstechgroup.com said:
> >  I was able to create a JFFS2 image with mkfs.jffs2, erase the flash,
> > and then copy the image to the flash ( about 200 bytes). I can mount
> > the mtdblock and browse the files on the JFFS2 file system, but I
> > cannot make any changes to the existing files or add new ones.
> > Everytime I try to modify it I get the 'No space left on device'
> > error.
>
> Please compile with CONFIG_JFFS2_FS_DEBUG=1, set the console loglevel to 9
> so that you see all the KERN_DEBUG messages, and log the output over a
> serial console while you reproduce this and also run 'df'.
>
> --
> dwmw2
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
>

[-- Attachment #2: jffs2_clean --]
[-- Type: application/octet-stream, Size: 10013 bytes --]


*** Make the jffs2 image

root@192.0.0.123:/jffs2#
root@192.0.0.123:/jffs2# mkfs.jffs2 -d ./imgdir -o jffs2.img
root@192.0.0.123:/jffs2# ls
imgdir	jffs2.img
root@192.0.0.123:/jffs2# ls -l
total 8
drwxr-xr-x    2 root     root         4096 Mar 27  2002 imgdir
-rw-r--r--    1 root     root          280 Mar 27  2002 jffs2.img

*** Copy the image to flash

root@192.0.0.123:/jffs2# cd ..
root@192.0.0.123:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00060000 00010000 "Flash File System"
mtd1: 00020000 00010000 "ROM Monitor"
mtd2: 00080000 00010000 "Whole Flash"
root@192.0.0.123:/# eraseall /dev/mtd0
MTD_open
MTD_ioctl
MTD_ioctl
Erasing 64 Kibytodo: 1 0 0 0
te @ 0 --  0 % complete.MTD_ioctl
Erasing 64 Kibytodo: 1 0 0 0
te @ 10000 -- 16 % complete.MTD_ioctl
Erasing 64 Kibytodo: 1 0 0 0
te @ 20000 -- 33 % complete.MTD_ioctl
Erasing 64 Kibytodo: 1 0 0 0
te @ 30000 -- 50 % complete.MTD_ioctl
Erasing 64 Kibytodo: 1 0 0 0
te @ 40000 -- 66 % complete.MTD_ioctl
Erasing 64 Kibytodo: 1 0 0 0
te @ 50000 -- 83 % complete.MTD_close
Erased 384 Kibyte @ 0 -- 100% complete.
root@192.0.0.123:/# cp /jffs2/jffs2.img /dev/mtd0
MTD_open
MTD_write
MTD_close

*** Mount the JFFS2 file system

root@192.0.0.123:/# cd mnt/flash
root@192.0.0.123:/mnt/flash# ls
root@192.0.0.123:/mnt/flash# cd ..
root@192.0.0.123:/mnt# mount -t jffs2 /dev/mtdblock0 /mnt/flash
mtdblock_open
ok
jffs2: read_super for device 1f:00
jffs2_scan_eraseblock(): Scanning block at 0x0
jffs2_scan_inode_node(): Node at 0x00000000
jffs2_get_ino_cache(): ino 1
jffs2_get_ino_cache found 00000000 for ino 1
Allocated inocache at c778c2d4
jffs2_add_ino_cache: Add c778c2d4 (ino #1)
Node is ino #1, version 1. Range 0x0-0x0
jffs2_scan_dirent_node(): Node at 0x00000044
jffs2_get_ino_cache(): ino 1
jffs2_get_ino_cache found c778c2d4 for ino 1
jffs2_add_fd_to_list( c70124c0, c70124a0 (->00000000))
Dirent "test" (hash 0x01c4ddc5, ino #2
jffs2_scan_inode_node(): Node at 0x00000070
jffs2_get_ino_cache(): ino 2
jffs2_get_ino_cache found 00000000 for ino 2
Allocated inocache at c778c2c0
jffs2_add_ino_cache: Add c778c2c0 (ino #2)
Node is ino #2, version 1. Range 0x0-0x1d
jffs2_scan_inode_node(): Node at 0x000000d0
jffs2_get_ino_cache(): ino 2
jffs2_get_ino_cache found c778c2c0 for ino 2
Node is ino #2, version 2. Range 0x1d-0x1f
Found empty flash at 0x118
Empty flash detected from 0x00000118 to 0x00010000
Block at 0x00000000: free 0x0000fee8, dirty 0x00000000, used 0x00000118
jffs2_scan_eraseblock(): Scanning block at 0x10000
Found empty flash at 0x10000
Empty flash detected from 0x00010000 to 0x00020000
Block at 0x00010000: free 0x00010000, dirty 0x00000000, used 0x00000000
JFFS2: Erase block at 0x00010000 is not formatted. It will be erased
jffs2_scan_eraseblock(): Scanning block at 0x20000
Found empty flash at 0x20000
Empty flash detected from 0x00020000 to 0x00030000
Block at 0x00020000: free 0x00010000, dirty 0x00000000, used 0x00000000
JFFS2: Erase block at 0x00020000 is not formatted. It will be erased
jffs2_scan_eraseblock(): Scanning block at 0x30000
Found empty flash at 0x30000
Empty flash detected from 0x00030000 to 0x00040000
Block at 0x00030000: free 0x00010000, dirty 0x00000000, used 0x00000000
JFFS2: Erase block at 0x00030000 is not formatted. It will be erased
jffs2_scan_eraseblock(): Scanning block at 0x40000
Found empty flash at 0x40000
Empty flash detected from 0x00040000 to 0x00050000
Block at 0x00040000: free 0x00010000, dirty 0x00000000, used 0x00000000
JFFS2: Erase block at 0x00040000 is not formatted. It will be erased
jffs2_scan_eraseblock(): Scanning block at 0x50000
Found empty flash at 0x50000
Empty flash detected from 0x00050000 to 0x00060000
Block at 0x00050000: free 0x00010000, dirty 0x00000000, used 0x00000000
JFFS2: Erase block at 0x00050000 is not formatted. It will be erased
Scanned flash completely
Pass 1: ino #1
jffs2_build_inode building inode #1
jffs2_get_ino_cache(): ino 2
jffs2_get_ino_cache found c778c2c0 for ino 2
Increased nlink for child "test" (ino #2)
Pass 1: ino #2
jffs2_build_inode building inode #2
adding node 0000-001d @0x00000070 on flash, newfrag *c778b2d4
adding node 001d-001f @0x000000d0 on flash, newfrag *c778b2c0
j_a_f_d_t_f: skipping frag 0x0000-0x001d; phys 0x00000070 (*c778b2d4->00000000)
Pass 1 complete
Pass 2 (re)starting
Pass 2: ino #1, nlink 1, ic c778c2d4, nodes c778f360
Pass 2: ino #2, nlink 1, ic c778c2c0, nodes c778f340
Pass 2 complete
Pass 3: ino #1, ic c778c2d4, nodes c778f360
Pass 3: ino #2, ic c778c2c0, nodes c778f340
Pass 3 complete
jffs2_read_super(): Getting root inode
jffs2_read_inode(): inode->i_ino == 1
getting inocache
jffs2_get_ino_cache(): ino 1
jffs2_get_ino_cache found c778c2d4 for ino 1
jffs2_read_inode(): Got inocache at c778c2d4
jffs2_read_inode(): ino #1 nlink is 1
jffs2_get_inode_nodes(): ino #1
Node at 00000044 is a dirent node
Adding fd "test", ino #2
jffs2_add_fd_to_list( c70124e0, c7429c1c (->00000000))
Dirent "test" (hash 0x01c4ddc5, ino #2
Node at 00000000 is a data node
version 1, highest_version now 2
dnode @00000000: ver 1, offset 0000, dsize 0000
metadata @00000000: ver 1
jffs2_read_inode() returning
jffs2_read_super(): d_alloc_root()
JFFS2: Garbage collect thread is pid 186
thread_should_wake(): nr_free_blocks 0, nr_erasing_blocks 5, dirty_size 0x0
jffs2_garbage_collect_thread sleeping...
thread_should_wake(): nr_free_blocks 0, nr_erasing_blocks 5, dirty_size 0x0
Starting erase of pending block 0x00050000
Freeing all node refs for eraseblock offset 0x00050000
todo: 1 0 0 0
Erase at 0x00050000 finished, but state != MTD_ERASE_DONE. State is 0x0 instead.
Starting erase of pending block 0x00040000
Freeing all node refs for eraseblock offset 0x00040000
todo: 1 0 0 0
Erase at 0x00040000 finished, but state != MTD_ERASE_DONE. State is 0x0 instead.
Starting erase of pending block 0x00030000
Freeing all node refs for eraseblock offset 0x00030000
todo: 1 0 0 0
Erase at 0x00030000 finished, but state != MTD_ERASE_DONE. State is 0x0 instead.
Starting erase of pending block 0x00020000
Freeing all node refs for eraseblock offset 0x00020000
todo: 1 0 0 0
Erase at 0x00020000 finished, but state != MTD_ERASE_DONE. State is 0x0 instead.
Starting erase of pending block 0x00010000
Freeing all node refs for eraseblock offset 0x00010000
todo: 1 0 0 0
Erase at 0x00010000 finished, but state != MTD_ERASE_DONE. State is 0x0 instead.
jffs2_erase_pending_blocks completed
root@192.0.0.123:/mnt# thread_should_wake(): nr_free_blocks 0, nr_erasing_blocks 0, dirty_size 0x0
jffs2_erase_pending_blocks completed

*** List files on JFFS2 drive

root@192.0.0.123:/mnt# cd flash
root@192.0.0.123:/mnt/flash# ls
jffs2_readdir() for dir_i #1
Dirent 0: ".", ino #1
Dirent 1: "..", ino #1
Dirent 2: "test", ino #2, type 8
jffs2_readdir() for dir_i #1
Skipping dirent: "test", ino #2, type 8, because curofs 2 < offset 3
test

*** Attempt to rename the file under JFFS2

root@192.0.0.123:/mnt/flash# mv test test1
jffs2_lookup()
jffs2_lookup()
jffs2_read_inode(): inode->i_ino == 2
getting inocache
jffs2_get_ino_cache(): ino 2
jffs2_get_ino_cache found c778c2c0 for ino 2
jffs2_read_inode(): Got inocache at c778c2c0
jffs2_read_inode(): ino #2 nlink is 1
jffs2_get_inode_nodes(): ino #2
Node at 000000d0 is a data node
version 2, highest_version now 2
dnode @000000d0: ver 2, offset 001d, dsize 0002
Node at 00000070 is a data node
version 1, highest_version now 2
dnode @00000070: ver 1, offset 0000, dsize 001d
jffs2_add_full_dnode_to_inode(ino #2, f c6fd8b10, fn c778d360)
adding node 0000-001d @0x00000070 on flash, newfrag *c778b2c0
frag 0000-001d: 0x00000070 on flash (*c778b2c0->00000000)
jffs2_add_full_dnode_to_inode(ino #2, f c6fd8b10, fn c778d350)
adding node 001d-001f @0x000000d0 on flash, newfrag *c778b2d4
j_a_f_d_t_f: skipping frag 0x0000-0x001d; phys 0x00000070 (*c778b2c0->00000000)
frag 0000-001d: 0x00000070 on flash (*c778b2c0->c778b2d4)
frag 001d-001f: 0x000000d0 on flash (*c778b2d4->00000000)
Truncating fraglist to 0x0000001f bytes
jffs2_read_inode() returning
jffs2_reserve_space(): Requested 0x30 bytes
jffs2_reserve_space(): alloc sem got
Short on space, but total dirty size 0x00000000 < sector size 0x00010000, so -ENOSPC
jffs2_create()
jffs2_reserve_space(): Requested 0x44 bytes
jffs2_reserve_space(): alloc sem got
Short on space, but total dirty size 0x00000000 < sector size 0x00010000, so -ENOSPC
jffs2_create(): reserved 0xc7aef000 bytes
mv: cannot create regular file `test1': No space left on device

*** Attempt to change permissions on file

root@192.0.0.123:/mnt/flash# chmod 777 test
jffs2_setattr(): ino #2
jffs2_reserve_space(): Requested 0x44 bytes
jffs2_reserve_space(): alloc sem got
Short on space, but total dirty size 0x00000000 < sector size 0x00010000, so -ENOSPC
chmod: changing permissions of `test': No space left on device

*** Attempt to create a directory

root@192.0.0.123:/mnt/flash# mkdir test123
jffs2_lookup()
jffs2_reserve_space(): Requested 0x44 bytes
jffs2_reserve_space(): alloc sem got
Short on space, but total dirty size 0x00000000 < sector size 0x00010000, so -ENOSPC
mkdir: cannot create directory `test123': No space left on device

*** DF

root@192.0.0.123:/mnt/flash# df
Filesystem      STATFS:
flash_size: 00060000
used_size: 00000118
dirty_size: 00000000
free_size: 0000fee8
erasing_size: 00000000
bad_size: 00050000
sector_size: 00010000
nextblock: 0x00000000
gcblock: NULL
clean_list: empty
dirty_list: empty
erasing_list: empty
erase_pending_list: empty
free_list: empty
bad_list: 00010000
bad_list: 00020000
bad_list: 00030000
bad_list: 00040000
bad_list: 00050000
bad_used_list: empty
     1k-blocks      Used Available Use% Mounted on
/dev/root              2869272   1721132   1002384  64% /
/dev/mtdblock0             384       384         0 100% /mnt/flash


  reply	other threads:[~2002-03-27 18:48 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-19 17:27 No space left on device Sebastian
2002-03-20 17:27 ` David Woodhouse
2002-03-27 18:49   ` Sebastian [this message]
2002-03-27 19:13   ` David Woodhouse
2002-03-27 19:58     ` Sebastian
2008-12-08  9:46 Gabor MICSKO
2008-12-08 14:02 ` dcg
2010-07-30  5:31 no " Lubos Kolouch
     [not found] ` <AANLkTikBRfR45DZxZW9LM6wnREWrbysPCr9Z1d3YuYhC@mail.gmail.com>
2010-07-30 12:27   ` Lubos Kolouch
     [not found]     ` <AANLkTinBj1O-LapAeBCT2Y3A1ZhfFZ3AotCk6SZ-e-2U@mail.gmail.com>
2010-07-30 14:30       ` Leonidas Spyropoulos
2010-07-30 15:02         ` Lubos Kolouch
2010-07-30 15:09           ` Lubos Kolouch
2010-08-14 20:15             ` Lubos Kolouch
2010-09-24 14:07 No " Turbo Fredriksson
2010-09-24 15:23 ` Geoffrey Wehrman
     [not found]   ` <2D51C7BA-FE51-48AF-9839-1A6AD2171510@bayour.com>
     [not found]     ` <20100927160643.GA10594@sgi.com>
     [not found]       ` <D3DB5B56-D15C-408C-B2B4-58626C23D798@bayour.com>
2010-10-04  6:40         ` Turbo Fredriksson
2010-09-25  2:18 ` Dave Chinner
2011-02-07 21:21 no " Leonidas Spyropoulos
2011-02-07 21:27 ` Erik Logtenberg
2011-02-07 23:58   ` Robert G.
2011-02-08  0:09 ` C Anthony Risinger
     [not found] <AANLkTinH225vC8fRbA7zk_iOEmyADFZMBS6b7gx1tOxm@mail.gmail.com>
2011-02-08  9:00 ` Leonidas Spyropoulos
2011-02-08  9:31   ` cwillu
2011-02-08 10:08     ` Leonidas Spyropoulos
2011-02-08 13:19       ` Helmut Hullen
2011-02-08 18:56         ` Erik Logtenberg
2011-02-08 19:43           ` Helmut Hullen
2011-02-12 14:11             ` Erik Logtenberg
2011-02-08 20:36           ` Helmut Hullen
2012-06-19 12:05 No " André Øien Langvand
2012-06-19 12:36 ` Geoffrey Wehrman
2012-06-20  6:07   ` Dave Chinner
2012-06-20 15:30     ` André Øien Langvand
2012-08-03 10:05 no " Mark Marshall
2012-08-04  9:14 ` Chris Samuel
2012-08-04  9:26 ` Martin Steigerwald
2012-11-01 13:35 Kenneth Johansson
2012-11-02 15:54 ` Kyle Gates
2012-11-02 15:59   ` Hugo Mills
2012-11-06 13:23   ` Kenneth Johansson
2014-02-12  9:51 No " Jakob Truelsen
2014-02-12 10:26 ` Hugo Mills
2014-02-12 10:45   ` Jakob Truelsen
2014-02-12 11:07     ` Hugo Mills
2014-02-12 10:34 ` Leonidas Spyropoulos

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='005a01c1d5c0$26756730$be04010a@MTG016' \
    --to=sebastian.vaitus@masstechgroup.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.