Running out of CF disk space

I 'm working on a CPCI board with Slackware-10.2 linux installed on a 1GB Compact Flash . I tried to use the CF as a hard disk and didn't make any ramdisk file system . I wrote a kernel module as device driver of an fpga on another board . When I insert and run the kernel module to do pci dma for 100 K times -each time 80 Kbytes is transferred - then remove the module ,the CF diskspace is decreasing about 300Kbytes ? Where should I look , actually I'm opening the device and dont ' close it but I 'm removing the module ?

Reply to
istakoz2000
Loading thread data ...

Hello,

If I'm not mistaken, the module will not be removed if there is any activity. In hope that the activity will stop, the module will be removed for further accesses, but the ongoing ones are able to finish (to prevent data loss). You should close your device first.

May be I understood you wrong, but why don't you close the module?

Regards

Reply to
Sebastian

I found that a file is getting bigger and bigger, /var/logs/syslog

360Mbytes. I have about ten printk lines in kernel module an each line is about 20 characters .When I run it in loop 100K times 200 *100K =20Mbytes message is logged into syslog . This is the explanation of running out of CF disk space.

Sebastian yazdi:

Reply to
istakoz2000

You should on embedded systems start a ramdisk anyway because the system will crash after a certain time anyway because of your /tmp directory (too many write operations). Although cf disks can have lots of write operations, linux can easily reach this number. Perhaps a solution for your module /var/log problem: Remove all these printk statements and use a fifo device for debugging. In user space you open this device and read the strings taco

Reply to
Taco

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.