Appending data does not work as expected from command line
The following commands and command sequences fail (all commands have the appropriate LD_PRELOAD
):
- Example 1:
# a.out is not created nor populated
$ echo "foo" > /tmp/mnt/gkfs/a.out
- Example 2:
### this works as expected...
$ cp /tmp/large_file_01 /tmp/mnt/gkfs/
$ cp /tmp/large_file_02 /tmp/mnt/gkfs/
$ ls -l /tmp/mnt/gkfs/
-rw-rw-r-- 1 amiranda amiranda 7068752 Jan 1 1970 large_file_01.pdf
-rw-rw-r-- 1 amiranda amiranda 7068752 Jan 1 1970 large_file_02.pdf
### ...but this fails: metadata is not updated, but data transfer appears in the logs
$ cat /tmp/mnt/gkfs/large_file_01 >> /tmp/mnt/gkfs/large_file_02
$ ls -l /tmp/mnt/gkfs/
-rw-rw-r-- 1 amiranda amiranda 7068752 Jan 1 1970 large_file_01.pdf
-rw-rw-r-- 1 amiranda amiranda 7068752 Jan 1 1970 large_file_02.pdf
### from outside GKFS also fails
$ cat /tmp/large_file_01 >> /tmp/mnt/gkfs/large_file_02
$ ls -l /tmp/mnt/gkfs/
-rw-rw-r-- 1 amiranda amiranda 7068752 Jan 1 1970 large_file_01.pdf
-rw-rw-r-- 1 amiranda amiranda 7068752 Jan 1 1970 large_file_02.pdf
@toto: any idea why this happens? dup()
and dup2()
seem to be managed by the interception library, and appends not originating from command line seem to work as expected (or IO500 would fail catastrophically).