Welcome! Log In Create A New Profile


Hacking an FS to make it artificially slow

Posted by Kristian 
Wierd request this but I need to emulate an HSM filesystem where a file can take literally minutes to open. So, I think the easiest way to do that would be to stick a big pause in the FileOpen code of a linux filesystem. I really havent got a clue as to what source to edit. I can use any FS really, not bothered. Any pointers on how to do this / where to get code / which method to insert my hack would be really helpful. Cheers.
Re: Hacking an FS to make it artificially slow
December 19, 2009 03:11PM
Replace your user-space calls to open() with sleep(60); open() ?
Hi, I've found the correct linux source file (fs/ext3/file.c) and yes a sleep() would do for a start but it gets more involved than that to mimic an HSM filesystem. When you mean user space calls are you referring to the source code of my applictaion? Unfortunatelly the open calls are initiated all over the place by a variety of third party dlls and Microsoft libraries so it's probably easier to hack the kernel source in one place. Thanks yoush.
Re: Hacking an FS to make it artificially slow
December 21, 2009 10:00AM
You may use LD__PRELOAD-based user-space solution.

Your Email:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 6 plus 13?