Yun V:2 SD card file locking - Yun shield and arduino

I've not tried it, but the way I would approach it is to skip the FileIO class in your sketch. Instead, write some sort of Linux code (Python, shell script, or your favorite language) to do the file access and call that script from your sketch using a Process object. Do your file I/O through the Process object.

What this does is it performs all of the SD card access through Linux code that you control. Now your problem is reduced to one of being strictly Linux file locking - the Arduino side is removed from the equation. It should be simpler to find a solution that way.