Inside WBFS

Discussion in 'Wii - Backup Loaders' started by Wiimm, Oct 13, 2009.

Oct 13, 2009

Inside WBFS by Wiimm at 6:55 PM (35,071 Views / 0 Likes) 84 replies

  1. antiaverage

    Member antiaverage GBAtemp Fan

    Joined:
    Apr 1, 2008
    Messages:
    317
    Country:
    United States
    Why have we not started a Google Code page for WBFS? Then all of these bugs could be properly tracked and we could work together. We could have proper code reviews and smooth out the whole process.
     


  2. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    While I'm planning a rename function for my WWT I have discovered that ID6 and DISC-NAME are stored at 2 locations:
    • In the WBFS 'inode'.
    • In the header of the ISO copy.
    Changing ID6 and DISC-NAME in the WBFS inode change the access key and the listing of the WBFS. Fine.

    My questions:
    - What happens if the ID6 within the ISO is changed?
    - Is there any experience?


    A crazy idea:
    Perhaps the system assigns a save game slot to the game by reading the ID. And a duplicated Mario Kart with a changed ID uses an other save game. And so I have 8 instead of only 4 profiles.
    Or 2 animal crossing worlds.

    Time for testing ....
     
  3. oggzee

    Member oggzee GBAtemp Addict

    Joined:
    Apr 11, 2009
    Messages:
    2,335
    Country:
    Slovenia
    Hi,
    I have changed the default split size to 4GB-32kb in wbfs_file, perhaps you want to add that to wwt?
    Also I added 2 options:
    * New option: -2 : use split size 2gb-32kb
    * New option: -4 : use split size 4gb-32kb (default)

    edit: sorry, wrong topic [​IMG]
     
  4. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    I have found this thread and now I know, that changing the ID is not enough. It's may be a new goal for wwt, sometime ...
     
  5. dexter222

    Member dexter222 GBAtemp Fan

    Joined:
    Apr 19, 2009
    Messages:
    336
    Location:
    Land of Fruits and Nuts
    Country:
    United States
    http://wbfs.codeplex.com/ is a site started for the WBFS/WBFS+ filesystems that never really got off the ground. The last post there was in May, by me, asking that the 500 file limit be addressed. Every time I address the issue on this site I get a bunch of smartazz replies that 500 files is enough lol. So to answer your question... a code site was started but there was little or no interest in further development of WBFS - it seemed to work 'good enough' for everyone (but me since I was the only one griping).

    It's great to see this limitation finally addressed. I look forward to testing soon [​IMG]
     
  6. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    I didn't know that there are other repositories.And nobody had answered my questions in the thread "libwbfs / current and best sources". And now I have my own repository as part of my WWT project.

    Once my WWT is completed I will improve the libwbfs and remove the bugs I have found.
     
  7. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    Omega Frost has found a serious bug in the wiidisc part of libwbfs. If scrubbing a disc there is a chance that some needed sectors are not copied.

    Scrubbing is also used when copying a disc to a WBFS (also dumping from DVD). Because WBFS uses large blocks this bug appears not very often when copying to WBFS.

    This means: Many corrupted backups!
     
  8. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    I have written 2 new functions to rename ID and title of a WBFS inode and/or ISO image. I have implemented and tested it with WWT.

    wiidisc.c
    CODE// rename ID and title of a ISO header

    int wd_rename
    (
    ÂÂÂÂÂÂÂÂvoid * p_data,ÂÂÂÂÂÂÂÂÂÂ// pointer to ISO data
    ÂÂÂÂÂÂÂÂconst char * new_id,ÂÂÂÂ// if !NULL: take the first 6 chars as ID
    ÂÂÂÂÂÂÂÂconst char * new_titleÂÂ// if !NULL: take the first 0x39 chars as title
    )
    {
    ÂÂÂÂASSERT(p_data);
    ÂÂÂÂu8 *data = p_data;

    ÂÂÂÂint done = 0;

    ÂÂÂÂif ( new_id && strlen(new_id) >= 6 )
    ÂÂÂÂ{
    ÂÂÂÂÂÂÂÂmemcpy(data,new_id,6);
    ÂÂÂÂÂÂÂÂdone |= 1;
    ÂÂÂÂ}

    ÂÂÂÂif ( new_title && *new_title )
    ÂÂÂÂ{
    ÂÂÂÂÂÂÂÂdata += WII_TITLE_OFF;
    ÂÂÂÂÂÂÂÂmemset(data,0,WII_TITLE_SIZE);
    ÂÂÂÂÂÂÂÂconst size_t slen = strlen(new_title);
    ÂÂÂÂÂÂÂÂmemcpy(data, new_title, slen < WII_TITLE_SIZE ? slen : WII_TITLE_SIZE-1 );
    ÂÂÂÂÂÂÂÂdone |= 2;
    ÂÂÂÂ}

    ÂÂÂÂreturn done;
    }

    wiidisc.h
    Code:
    enum // some constants
    {
    ÂÂÂÂWII_SECTOR_SIZEÂÂÂÂÂÂÂÂÂÂ = 0x8000,
    ÂÂÂÂWII_SECTORS_SINGLE_LAYERÂÂ= 143432,
    ÂÂÂÂWII_SECTORS_DOUBLE_LAYERÂÂ= 2 * WII_SECTORS_SINGLE_LAYER,
    ÂÂÂÂWII_MAX_SECTORSÂÂÂÂÂÂÂÂÂÂ = WII_SECTORS_DOUBLE_LAYER,
    
    ÂÂÂÂWII_TITLE_OFFÂÂÂÂÂÂÂÂÂÂÂÂ = 0x20,
    ÂÂÂÂWII_TITLE_SIZEÂÂÂÂÂÂÂÂÂÂÂÂ= 0x40,
    };
    
    ...
    
    int wd_rename
    (
    ÂÂÂÂÂÂÂÂvoid * data,ÂÂÂÂÂÂÂÂÂÂÂÂ// pointer to ISO data
    ÂÂÂÂÂÂÂÂconst char * new_id,ÂÂÂÂ// if !NULL: take the first 6 chars as ID
    ÂÂÂÂÂÂÂÂconst char * new_titleÂÂ// if !NULL: take the first 0x39 chars as title
    );

    libwbfs.h
    Code:
    // rename a disc
    int wbfs_rename_disc
    (
    ÂÂÂÂÂÂÂÂwbfs_disc_t * d,ÂÂÂÂÂÂÂÂ// pointer to an open disc
    ÂÂÂÂÂÂÂÂconst char * new_id,ÂÂÂÂ// if !NULL: take the first 6 chars as ID
    ÂÂÂÂÂÂÂÂconst char * new_title, // if !NULL: take the first 0x39 chars as title
    ÂÂÂÂÂÂÂÂint change_wbfs_head,ÂÂ // if !0: change ID/title of WBFS header
    ÂÂÂÂÂÂÂÂint change_iso_headÂÂÂÂ // if !0: change ID/title of ISO header
    );
    libwbfs.c
    CODE// rename a disc

    int wbfs_rename_disc
    (
    ÂÂÂÂÂÂÂÂwbfs_disc_t * d,ÂÂÂÂÂÂÂÂ// pointer to an open disc
    ÂÂÂÂÂÂÂÂconst char * new_id,ÂÂÂÂ// if !NULL: take the first 6 chars as ID
    ÂÂÂÂÂÂÂÂconst char * new_title, // if !NULL: take the first 0x39 chars as title
    ÂÂÂÂÂÂÂÂint change_wbfs_head,ÂÂ // if !0: change ID/title of WBFS header
    ÂÂÂÂÂÂÂÂint change_iso_headÂÂÂÂ // if !0: change ID/title of ISO header
    )
    {
    ÂÂÂÂASSERT(d);
    ÂÂÂÂASSERT(d->p);
    ÂÂÂÂASSERT(d->header);

    ÂÂÂÂwbfs_t * p = d->p;

    ÂÂÂÂif ( change_wbfs_head
    ÂÂÂÂÂÂÂÂ&& wd_rename(d->header->disc_header_copy,new_id,new_title) )
    ÂÂÂÂ{
    ÂÂÂÂÂÂÂÂint err = wbfs_sync_disc_header(d);
    ÂÂÂÂÂÂÂÂif (err)
    ÂÂÂÂÂÂÂÂÂÂÂÂreturn err;
    ÂÂÂÂ}

    ÂÂÂÂif ( change_iso_head )
    ÂÂÂÂ{
    ÂÂÂÂÂÂÂÂu32 wlba = ntohs(d->header->wlba_table[0]);
    ÂÂÂÂÂÂÂÂif (wlba)
    ÂÂÂÂÂÂÂÂ{
    ÂÂÂÂÂÂÂÂÂÂÂÂu8 * tmpbuf = p->tmp_buffer;
    ÂÂÂÂÂÂÂÂÂÂÂÂASSERT(tmpbuf);
    ÂÂÂÂÂÂÂÂÂÂÂÂconst u32 lba = wlba wbfs_sec_sz_s - p->hd_sec_sz_s );
    ÂÂÂÂÂÂÂÂÂÂÂÂint err = p->read_hdsector( p->callback_data, lba, 1, tmpbuf );
    ÂÂÂÂÂÂÂÂÂÂÂÂif (err)
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturn err;
    ÂÂÂÂÂÂÂÂÂÂÂÂif (wd_rename(tmpbuf,new_id,new_title))
    ÂÂÂÂÂÂÂÂÂÂÂÂ{
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂerr = p->write_hdsector( p->callback_data, lba, 1, tmpbuf );
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂif (err)
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturn err;
    ÂÂÂÂÂÂÂÂÂÂÂÂ}
    ÂÂÂÂÂÂÂÂ}
    ÂÂÂÂ}

    ÂÂÂÂreturn 0;
    }
     
  9. CasperH

    CasperH Newbie

    Since there are so many things wrong in WBFS, can we fix it without formatting or something?
     
  10. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    Yes: Just use a WBFS manager/USB loader that had fixed the bugs. And try the repair function.
     
  11. mousex

    Member mousex GBAtemp Advanced Fan

    Joined:
    Jan 23, 2009
    Messages:
    987
    Country:
    United States
    But be careful. If more than one game use one block on the partition it will delete all these games.
     
  12. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    What else?
    If some games share a block at least all-1 games are invalid. And who will decide which one is perhaps valid?

    Btw: Repair will only fix the free blocks table by default (has changed). So the user must explicitly allow the deletion.
     
  13. oggzee

    Member oggzee GBAtemp Addict

    Joined:
    Apr 11, 2009
    Messages:
    2,335
    Country:
    Slovenia
    Wiimm:
    I don't know if you already do this, but, the integrity check could also do a scan of the disc data for each game and check if all sectors are present. I mean doing the do_disc from wiidisc and checking if all blocks marked in usage table are also really present in the disc inside wbfs. This is also done as a side effect of doing wbfs_file X: wbfs_copy... if a block that is expected to be present is not found then an error is printed - the old wbfs implementation would just ignore such a case, I don't know if you have too changed that. In case you already do all of the above, sorry for spamming...
    I received some reports which indicate that a modchip might interfere with reading the update partition which results in a strange wbfs copy - the partition table is intact while the update partition is missing. So when trying to copy such a game out of wbfs with the above described method it fails, while doing a copy of only the game partition it succeeds.
     
  14. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    @oggzee:
    After the idea of wiiwu to calculate a checksum i have thought about a deep check, that confirms the encryption. And you are right, do_disc() do this for me.

    The 2do list becomes longer and longer and longer ....
     
  15. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    Are there any interests in a new libwbfs with all fixed bugs?
    If yes, I plan to rewrite libwbfs used by wwt in a more compatible way.
     
  16. mousex

    Member mousex GBAtemp Advanced Fan

    Joined:
    Jan 23, 2009
    Messages:
    987
    Country:
    United States
    Definitifly yes.
     
  17. antiaverage

    Member antiaverage GBAtemp Fan

    Joined:
    Apr 1, 2008
    Messages:
    317
    Country:
    United States
    A fully updated and fixed libwbfs is very wanted!
     
  18. dexter222

    Member dexter222 GBAtemp Fan

    Joined:
    Apr 19, 2009
    Messages:
    336
    Location:
    Land of Fruits and Nuts
    Country:
    United States
    Regardless of these 'serious' bugs, WBFS has worked flawlessly for me and I used it extensively. The only major drawback was the 500 file system limitation. Are there folks out there who actually experienced any problems because of these bugs? I found it very useful for backing up my ISOs and never lost a file. It would appear these bugs are more of an esoteric nature rather than a real problem [​IMG]

    It is rather moot anyways now that WBFS is a relic from the past. Although it was very useful in its day it is now little more than a footnote in Wii storage history. With the ability to use FAT32 and, even better, NTFS with the major loaders, there is little or no reason to perpetuate the use of WBFS.
     
  19. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    WBFS may be a relict, but the FAT32 still uses WBFS and the NTFS sparse files are very unhandy: copy a sparse ISO and it becomes large. So none of them a really good .
     
  20. Wiimm
    OP

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,083
    Location:
    Germany
    Country:
    Germany
    I have done a litte fragmentation test:[*] Create a WBFS with 500 GiB, WBFS block size = 16 MiB[*] Fill the WBFS with 150 discs (Phantoms with random size of 1..4 GiB)[*] Run 100 times:
    [*] Remove 5 discs (random select)
    [*] Add 5 discs (Phantoms with random size of 1..4 GiB)A phantom is a disc without contents. Only space is allocated the header is written but not the disc itself. This makes tests very fast.
    The wwt command "PHANTOM" does this.

    And this is the fragmentation result:
    Code:
    ÂÂ11 *ÂÂ 1 blockÂÂwithÂÂ 16 MiB
    ÂÂ12 *ÂÂ 2 blocks withÂÂ 32 MiB
    ÂÂ15 *ÂÂ 3 blocks withÂÂ 48 MiB
    ÂÂ18 *ÂÂ 4 blocks withÂÂ 64 MiB
    ÂÂ12 *ÂÂ 5 blocks withÂÂ 80 MiB
    ÂÂ14 *ÂÂ 6 blocks withÂÂ 96 MiB
    --> 82 fragments are smaller than 100 MiB
    --> this belongs 296 (1.14%) of 25758 used blocks (32768 blocks total on WBFS)
    ÂÂ11 *ÂÂ 7 blocks withÂÂ112 MiB
    ÂÂ15 *ÂÂ 8 blocks withÂÂ128 MiB
    ÂÂ14 *ÂÂ 9 blocks withÂÂ144 MiB
    ÂÂ10 *ÂÂ10 blocks withÂÂ160 MiB
    ÂÂ14 *ÂÂ11 blocks withÂÂ176 MiB
    ÂÂ 5 *ÂÂ12 blocks withÂÂ192 MiB
    ÂÂ 9 *ÂÂ13 blocks withÂÂ208 MiB
    ÂÂ 4 *ÂÂ14 blocks withÂÂ224 MiB
    ÂÂ 9 *ÂÂ15 blocks withÂÂ240 MiB
    ÂÂ 9 *ÂÂ16 blocks withÂÂ256 MiB
    ÂÂ15 *ÂÂ17 blocks withÂÂ272 MiB
    ÂÂ12 *ÂÂ18 blocks withÂÂ288 MiB
    ÂÂ 6 *ÂÂ19 blocks withÂÂ304 MiB
    ÂÂ12 *ÂÂ20 blocks withÂÂ320 MiB
    ÂÂ 9 *ÂÂ21 blocks withÂÂ336 MiB
    ÂÂ 8 *ÂÂ22 blocks withÂÂ352 MiB
    ÂÂ 5 *ÂÂ23 blocks withÂÂ368 MiB
    ÂÂ10 *ÂÂ24 blocks withÂÂ384 MiB
    ÂÂ 7 *ÂÂ25 blocks withÂÂ400 MiB
    ÂÂ 5 *ÂÂ26 blocks withÂÂ416 MiB
    ÂÂ10 *ÂÂ27 blocks withÂÂ432 MiB
    ÂÂ 3 *ÂÂ28 blocks withÂÂ448 MiB
    ÂÂ 6 *ÂÂ29 blocks withÂÂ464 MiB
    ÂÂ 6 *ÂÂ30 blocks withÂÂ480 MiB
    ÂÂ 2 *ÂÂ31 blocks withÂÂ496 MiB
    ÂÂ 8 *ÂÂ32 blocks withÂÂ512 MiB
    ÂÂ 5 *ÂÂ33 blocks withÂÂ528 MiB
    ÂÂ 9 *ÂÂ34 blocks withÂÂ544 MiB
    ÂÂ 7 *ÂÂ35 blocks withÂÂ560 MiB
    ÂÂ 3 *ÂÂ36 blocks withÂÂ576 MiB
    ÂÂ 6 *ÂÂ37 blocks withÂÂ592 MiB
    ÂÂ 5 *ÂÂ38 blocks withÂÂ608 MiB
    ÂÂ 9 *ÂÂ39 blocks withÂÂ624 MiB
    ÂÂ 4 *ÂÂ40 blocks withÂÂ640 MiB
    ÂÂ 2 *ÂÂ41 blocks withÂÂ656 MiB
    ÂÂ 2 *ÂÂ42 blocks withÂÂ672 MiB
    ÂÂ 9 *ÂÂ43 blocks withÂÂ688 MiB
    ÂÂ 5 *ÂÂ44 blocks withÂÂ704 MiB
    ÂÂ 5 *ÂÂ45 blocks withÂÂ720 MiB
    ÂÂ 5 *ÂÂ46 blocks withÂÂ736 MiB
    ÂÂ10 *ÂÂ47 blocks withÂÂ752 MiB
    ÂÂ 4 *ÂÂ48 blocks withÂÂ768 MiB
    ÂÂ 3 *ÂÂ49 blocks withÂÂ784 MiB
    ÂÂ 1 *ÂÂ50 blocks withÂÂ800 MiB
    ÂÂ 6 *ÂÂ51 blocks withÂÂ816 MiB
    ÂÂ 4 *ÂÂ52 blocks withÂÂ832 MiB
    ÂÂ 4 *ÂÂ53 blocks withÂÂ848 MiB
    ÂÂ 5 *ÂÂ54 blocks withÂÂ864 MiB
    ÂÂ 4 *ÂÂ55 blocks withÂÂ880 MiB
    ÂÂ 2 *ÂÂ56 blocks withÂÂ896 MiB
    ÂÂ 2 *ÂÂ57 blocks withÂÂ912 MiB
    ÂÂ 2 *ÂÂ58 blocks withÂÂ928 MiB
    ÂÂ 5 *ÂÂ59 blocks withÂÂ944 MiB
    ÂÂ 4 *ÂÂ61 blocks withÂÂ976 MiB
    ÂÂ 6 *ÂÂ62 blocks withÂÂ992 MiB
    ÂÂ 2 *ÂÂ63 blocks with 1008 MiB
    ÂÂ 5 *ÂÂ65 blocks with 1040 MiB
    ÂÂ 4 *ÂÂ66 blocks with 1056 MiB
    ÂÂ 4 *ÂÂ67 blocks with 1072 MiB
    ÂÂ 1 *ÂÂ69 blocks with 1104 MiB
    ÂÂ 4 *ÂÂ70 blocks with 1120 MiB
    ÂÂ 4 *ÂÂ71 blocks with 1136 MiB
    ÂÂ 1 *ÂÂ72 blocks with 1152 MiB
    ÂÂ 5 *ÂÂ73 blocks with 1168 MiB
    ÂÂ 2 *ÂÂ74 blocks with 1184 MiB
    ÂÂ 2 *ÂÂ75 blocks with 1200 MiB
    ÂÂ 1 *ÂÂ76 blocks with 1216 MiB
    ÂÂ 2 *ÂÂ77 blocks with 1232 MiB
    ÂÂ 4 *ÂÂ78 blocks with 1248 MiB
    ÂÂ 4 *ÂÂ79 blocks with 1264 MiB
    ÂÂ 5 *ÂÂ81 blocks with 1296 MiB
    ÂÂ 3 *ÂÂ82 blocks with 1312 MiB
    ÂÂ 2 *ÂÂ83 blocks with 1328 MiB
    ÂÂ 3 *ÂÂ84 blocks with 1344 MiB
    ÂÂ 2 *ÂÂ85 blocks with 1360 MiB
    ÂÂ 2 *ÂÂ86 blocks with 1376 MiB
    ÂÂ 3 *ÂÂ88 blocks with 1408 MiB
    ÂÂ 2 *ÂÂ89 blocks with 1424 MiB
    ÂÂ 4 *ÂÂ91 blocks with 1456 MiB
    ÂÂ 1 *ÂÂ92 blocks with 1472 MiB
    ÂÂ 2 *ÂÂ93 blocks with 1488 MiB
    ÂÂ 1 *ÂÂ94 blocks with 1504 MiB
    ÂÂ 2 *ÂÂ95 blocks with 1520 MiB
    ÂÂ 2 *ÂÂ96 blocks with 1536 MiB
    ÂÂ 1 *ÂÂ97 blocks with 1552 MiB
    ÂÂ 2 *ÂÂ98 blocks with 1568 MiB
    ÂÂ 1 *ÂÂ99 blocks with 1584 MiB
    ÂÂ 1 * 102 blocks with 1632 MiB
    ÂÂ 2 * 103 blocks with 1648 MiB
    ÂÂ 2 * 105 blocks with 1680 MiB
    ÂÂ 1 * 107 blocks with 1712 MiB
    ÂÂ 1 * 108 blocks with 1728 MiB
    ÂÂ 2 * 109 blocks with 1744 MiB
    ÂÂ 4 * 110 blocks with 1760 MiB
    ÂÂ 2 * 113 blocks with 1808 MiB
    ÂÂ 1 * 116 blocks with 1856 MiB
    ÂÂ 1 * 117 blocks with 1872 MiB
    ÂÂ 1 * 118 blocks with 1888 MiB
    ÂÂ 2 * 122 blocks with 1952 MiB
    ÂÂ 1 * 124 blocks with 1984 MiB
    ÂÂ 1 * 130 blocks with 2080 MiB
    ÂÂ 1 * 131 blocks with 2096 MiB
    ÂÂ 1 * 135 blocks with 2160 MiB
    ÂÂ 3 * 136 blocks with 2176 MiB
    ÂÂ 1 * 138 blocks with 2208 MiB
    ÂÂ 1 * 140 blocks with 2240 MiB
    ÂÂ 1 * 141 blocks with 2256 MiB
    ÂÂ 2 * 142 blocks with 2272 MiB
    ÂÂ 1 * 151 blocks with 2416 MiB
    ÂÂ 1 * 152 blocks with 2432 MiB
    ÂÂ 1 * 153 blocks with 2448 MiB
    ÂÂ 1 * 158 blocks with 2528 MiB
    ÂÂ 2 * 160 blocks with 2560 MiB
    ÂÂ 1 * 162 blocks with 2592 MiB
    ÂÂ 1 * 163 blocks with 2608 MiB
    ÂÂ 1 * 165 blocks with 2640 MiB
    ÂÂ 1 * 166 blocks with 2656 MiB
    ÂÂ 1 * 175 blocks with 2800 MiB
    ÂÂ 1 * 178 blocks with 2848 MiB
    ÂÂ 1 * 179 blocks with 2864 MiB
    ÂÂ 2 * 183 blocks with 2928 MiB
    ÂÂ 1 * 188 blocks with 3008 MiB
    ÂÂ 1 * 190 blocks with 3040 MiB
    ÂÂ 1 * 191 blocks with 3056 MiB
    ÂÂ 1 * 193 blocks with 3088 MiB
    ÂÂ 1 * 201 blocks with 3216 MiB
    ÂÂ 1 * 202 blocks with 3232 MiB
    ÂÂ 1 * 205 blocks with 3280 MiB
    ÂÂ 2 * 218 blocks with 3488 MiB
    ÂÂ 1 * 239 blocks with 3824 MiB
    ÂÂ 1 * 245 blocks with 3920 MiB
    Only 82 fragments are smaller than 100 MiB. This belongs 296 (1.14%) of 25758 used blocks (32768 blocks total on WBFS).
    In my eyes it is clear: There is no need for defragmentation, because there are only some small fragments and this small fragments are not really small.

    And here is the test code:
    CODErm -f a.wbfs
    ./wwt init a.wbfs -s512 -f
    ./wwt -p a.wbfs phantom 150x1-4g
    ./wwt -p a.wbfs df
    for ((i=0;i
     

Share This Page