[Desire Android Development] melethron:
Again you need to set up garbage collector right. The default settings are for 1 hour backup minimum of your "complete" disc states.

Im still testing on ubuntu with a usb stick before i do this on my phone.

Here is how i have set it up for now:

Edit "/etc/nilfs_cleanerd.conf" and set these

protection_period	30
min_clean_segments	0
max_clean_segments	90%

If set it to continous cleaning for now. Also 30 sec will be enough to provide you with at least one clean "check point" of the filesystem.

After setting this i made sure that the garbage cleaner daemon uses the settings:

nilfs_cleanerd -c /etc/nilfs_cleanerd.conf

you can also set the protection period with "nilfs_cleanerd -p"

for more info use man (nilfs / nilfs_cleanerd / nilfs_cleanerd.conf )

Issues -> RTFM ;-)

I moved some stuff from my dl dir on the stick. Now check this.

melethron@melethron-laptop:~/nilfs2$ df -h | grep /dev/sdb2
/dev/sdb2 888M 808M 16M 99% /home/melethron/nilfs2
melethron@melethron-laptop:~/nilfs2$ ls -lrah
insgesamt 781M
-rwxrwxrwx 1 melethron melethron 5,1M 2010-12-06 02:06 UOT-ZC-12-06-02-04-4.zip
drwx------ 4 melethron melethron 4,0K 2010-12-11 04:26 .Trash-1000
-rw-r--r-- 1 melethron melethron 2 2010-12-11 06:46 Textdatei
-rwxrwxrwx 1 melethron melethron 260M 2010-12-05 22:39 RCMixHD_v014.zip
-rwxrwxrwx 1 melethron melethron 267M 2010-12-06 01:42 RCMixHD_v013.zip
-rwxrwxrwx 1 melethron melethron 247M 2010-12-06 01:13 ownheredesireHD_v1.6_101205.zip
-rw-r--r-- 1 root root 0 2010-12-10 15:04 .nilfs
drwxr-xr-x 61 melethron melethron 4,0K 2010-12-11 14:01 ..
drwxr-xr-x 3 melethron melethron 4,0K 2010-12-11 16:51 .
melethron@melethron-laptop:~/nilfs2$ lscp
CNO DATE TIME MODE FLG NBLKINC ICNT
282 2010-12-11 06:52:53 cp - 2794 12
283 2010-12-11 06:52:56 cp - 13 12
284 2010-12-11 06:53:07 cp - 244 12
285 2010-12-11 06:53:16 cp i 260 12
286 2010-12-11 06:53:25 cp i 223 12
287 2010-12-11 06:53:34 cp i 264 12
288 2010-12-11 06:53:43 cp i 282 12
289 2010-12-11 06:53:52 cp i 246 12
290 2010-12-11 06:54:01 cp i 333 12
291 2010-12-11 06:54:10 cp i 258 12
292 2010-12-11 06:54:19 cp i 261 12
293 2010-12-11 06:54:29 cp i 310 12
294 2010-12-11 06:54:38 cp i 273 12
295 2010-12-11 06:54:47 cp i 183 12
296 2010-12-11 06:54:55 cp i 151 12
297 2010-12-11 06:55:04 cp i 234 12
298 2010-12-11 06:55:13 cp i 170 12
299 2010-12-11 06:55:22 cp i 173 12
300 2010-12-11 06:55:31 cp i 260 12
301 2010-12-11 06:55:40 cp i 213 12
302 2010-12-11 06:55:49 cp i 176 12
303 2010-12-11 06:55:57 cp i 224 12
304 2010-12-11 06:56:06 cp i 227 12
305 2010-12-11 06:56:13 cp i 189 12
306 2010-12-11 07:04:28 cp i 229 12
307 2010-12-11 16:51:34 cp - 19 11
melethron@melethron-laptop:~/nilfs2$

781MB use 808 MB. Also note that there isn't any clearing done although checkpoints before 307 are far older than 30s since 30s is a minimum value.

After "rm -rf /nilfs/mount/dir/*" i get this:

melethron@melethron-laptop:~/nilfs2$ df -h | grep /dev/sdb2
/dev/sdb2 888M 704M 120M 86% /home/melethron/nilfs2
melethron@melethron-laptop:~/nilfs2$ ls -lrah
insgesamt 8,0K
drwxr-xr-x 61 melethron melethron 4,0K 2010-12-11 14:01 ..
drwxr-xr-x 2 melethron melethron 4,0K 2010-12-11 04:22 .
melethron@melethron-laptop:~/nilfs2$ lscp
CNO DATE TIME MODE FLG NBLKINC ICNT
310 2010-12-11 17:40:49 cp - 1348 9
311 2010-12-11 17:40:55 cp - 1782 8
312 2010-12-11 17:41:01 cp - 1843 6
313 2010-12-11 17:41:06 cp i 1902 6
314 2010-12-11 17:41:11 cp i 1853 6
315 2010-12-11 17:41:16 cp i 1912 6
316 2010-12-11 17:41:20 cp i 19 6
317 2010-12-11 17:41:25 cp i 14 6
318 2010-12-11 17:41:30 cp i 24 6
319 2010-12-11 17:41:35 cp i 16 6
320 2010-12-11 17:41:40 cp i 16 6
321 2010-12-11 17:41:45 cp i 30 6
322 2010-12-11 17:41:50 cp i 23 6
323 2010-12-11 17:41:55 cp i 16 6
324 2010-12-11 17:42:00 cp i 29 6
325 2010-12-11 17:42:05 cp i 16 6
326 2010-12-11 17:42:10 cp i 18 6
327 2010-12-11 17:42:15 cp i 16 6
328 2010-12-11 17:42:20 cp i 16 6
329 2010-12-11 17:42:25 cp i 14 6

Note that although there isn't any file on the disk anymore it still uses 707 MB. This is because of the checkpoint 310 wich was made a short time after the deleting startet. After that i didn't change any state of the filesystem. Due to the continues cleaning setting. It cleaned up some old checkpoints:

melethron@melethron-laptop:~/nilfs2$ df -h | grep /dev/sdb2
/dev/sdb2 888M 152M 672M 19% /home/melethron/nilfs2
melethron@melethron-laptop:~/nilfs2$ lscp
CNO DATE TIME MODE FLG NBLKINC ICNT
311 2010-12-11 17:40:55 cp - 1782 8
312 2010-12-11 17:41:01 cp - 1843 6
313 2010-12-11 17:41:06 cp i 1902 6
314 2010-12-11 17:41:11 cp i 1853 6
315 2010-12-11 17:41:16 cp i 1912 6
316 2010-12-11 17:41:20 cp i 19 6
317 2010-12-11 17:41:25 cp i 14 6
318 2010-12-11 17:41:30 cp i 24 6
319 2010-12-11 17:41:35 cp i 16 6
320 2010-12-11 17:41:40 cp i 16 6
321 2010-12-11 17:41:45 cp i 30 6
322 2010-12-11 17:41:50 cp i 23 6
323 2010-12-11 17:41:55 cp i 16 6
324 2010-12-11 17:42:00 cp i 29 6
325 2010-12-11 17:42:05 cp i 16 6
326 2010-12-11 17:42:10 cp i 18 6
327 2010-12-11 17:42:15 cp i 16 6
328 2010-12-11 17:42:20 cp i 16 6
329 2010-12-11 17:42:25 cp i 14 6
330 2010-12-11 17:42:30 cp i 14 6
331 2010-12-11 17:42:35 cp i 14 6
332 2010-12-11 17:42:40 cp i 20 6
333 2010-12-11 17:42:45 cp i 14 6
334 2010-12-11 17:42:50 cp i 21 6
335 2010-12-11 17:42:55 cp i 18 6
336 2010-12-11 17:43:00 cp i 21 6
337 2010-12-11 17:43:05 cp i 16 6
338 2010-12-11 17:43:10 cp i 14 6
339 2010-12-11 17:43:15 cp i 16 6
340 2010-12-11 17:43:20 cp i 18 6
341 2010-12-11 17:43:25 cp i 16 6
342 2010-12-11 17:43:30 cp i 16 6
343 2010-12-11 17:43:35 cp i 14 6
344 2010-12-11 17:43:40 cp i 16 6
345 2010-12-11 17:43:45 cp i 18 6
346 2010-12-11 17:43:50 cp i 17 6
347 2010-12-11 17:43:55 cp i 16 6
348 2010-12-11 17:44:00 cp i 18 6
349 2010-12-11 17:44:05 cp i 15 6
350 2010-12-11 17:44:10 cp i 15 6
351 2010-12-11 17:44:15 cp i 17 6
352 2010-12-11 17:44:20 cp i 17 6
353 2010-12-11 17:44:25 cp i 17 6
354 2010-12-11 17:44:30 cp i 17 6
355 2010-12-11 17:44:35 cp i 17 6
356 2010-12-11 17:44:40 cp i 15 6
357 2010-12-11 17:44:45 cp i 19 6

I first wonderened here why the cleaning stopped on 81% free instead of the 90% that i have set. I think thats because nilfs need some space. I had about ~80 Mb used after i made the partition. But i look into this and make a new Partition. Also note that if you move files to it now it will also clean up the old checkpoints. This means that copying data to it will actually REDUCE the used disk space due to the cleaning.

As you can see it works fine if it's set up proberly (at least on ubuntu ^^ i didn't test the tools on the phone yet. But i don't see why it shouldn't work like this if nilfs. ko is loaded proberly and the tools are compiled right). . The default setting is for Backup purposes. Since we only need a clear checkpoint to have a clean filesystem after a powerloss we don't need these.