Directory limit

Hi,
Compact flash on our target has one partitition 2GB with qnx4 file system. I would like to limit the size of a directory to say 200MB for example. Does qnx provide any such utility to do this?

I was reading through below link. I’m looking something like this for QNX 6.4.1.

unix.com/unix-dummies-questi … limit.html

Thanks,
Cheetah

Not to my knowledge.

However you may be able to do something similar. Create a filesystem image of 200MB and mount it under the name of the directory you want to limit.

It would be possible to create a filter resource manager. It would own the users file space, which would be projected onto the file system. Most of the i/o calls would be passed on to the file system. The write() call would have a new failure mode, “Allocate Used Up”.

This would be a lot of work, especially if you are not familiar wit resource managers. There is some cpu overhead involved, but on a fast processor, say anything like a Pentium IV, it would probably not be very noticeable.