write error: No space left on device in embedded linux
<p>all
  I have a embedded board, run linux OS. and I use yaffs2 as rootfs.
  I run a program on it, but after some times, it got a error "error No space left on device.". but I checked the flash, there still have a lot free space. 
  I just write some config file. the config file is rarely update. the program will write some log to flash. log size is limited to 2M.
  I don't know why, and how to solve. 
  Help me please!(my first language is not English,sorry. hope you understand what I say)</p>

<p>some debug info:</p>

<pre><code>    # ./write_test 
    version 1.0
    close file :: No space left on device
    return errno 28
    # cat /proc/yaffs 
    YAFFS built:Nov 23 2015 16:57:34


    Device 0 "rootfs"
    start_block........... 0
    end_block............. 511
    total_bytes_per_chunk. 2048
    use_nand_ecc.......... 1
    no_tags_ecc........... 1
    is_yaffs2............. 1
    inband_tags........... 0
    empty_lost_n_found.... 0
    disable_lazy_load..... 0
    refresh_period........ 500
    n_caches.............. 10
    n_reserved_blocks..... 5
    always_check_erased... 0
    data_bytes_per_chunk.. 2048
    chunk_grp_bits........ 0
    chunk_grp_size........ 1
    n_erased_blocks....... 366
    blocks_in_checkpt..... 0

    n_tnodes.............. 749
    n_obj................. 477
    n_free_chunks......... 23579

    n_page_writes......... 6092
    n_page_reads.......... 11524
    n_erasures............ 96
    n_gc_copies........... 5490
    all_gcs............... 1136
    passive_gc_count...... 1136
    oldest_dirty_gc_count. 95
    n_gc_blocks........... 96
    bg_gcs................ 96
    n_retired_writes...... 0
    n_retired_blocks...... 0
    n_ecc_fixed........... 0
    n_ecc_unfixed......... 0
    n_tags_ecc_fixed...... 0
    n_tags_ecc_unfixed.... 0
    cache_hits............ 0
    n_deleted_files....... 0
    n_unlinked_files...... 289
    refresh_count......... 1
    n_bg_deletions........ 0

    Device 2 "data"
    start_block........... 0
    end_block............. 927
    total_bytes_per_chunk. 2048
    use_nand_ecc.......... 1
    no_tags_ecc........... 1
    is_yaffs2............. 1
    inband_tags........... 0
    empty_lost_n_found.... 0
    disable_lazy_load..... 0
    refresh_period........ 500
    n_caches.............. 10
    n_reserved_blocks..... 5
    always_check_erased... 0
    data_bytes_per_chunk.. 2048
    chunk_grp_bits........ 0
    chunk_grp_size........ 1
    n_erased_blocks....... 10
    blocks_in_checkpt..... 0

    n_tnodes.............. 4211
    n_obj................. 24
    n_free_chunks......... 658

    n_page_writes......... 430
    n_page_reads.......... 467
    n_erasures............ 7
    n_gc_copies........... 421
    all_gcs............... 20
    passive_gc_count...... 13
    oldest_dirty_gc_count. 3
    n_gc_blocks........... 6
    bg_gcs................ 4
    n_retired_writes...... 0
    n_retired_blocks...... 0
    n_ecc_fixed........... 0
    n_ecc_unfixed......... 0
    n_tags_ecc_fixed...... 0
    n_tags_ecc_unfixed.... 0
    cache_hits............ 0
    n_deleted_files....... 0
    n_unlinked_files...... 2
    refresh_count......... 1
    n_bg_deletions........ 0
    # 
</code></pre>

<p>log and config file stored in "data". 
thanks!!</p>