* - display information on the disks mounted by the current host
* - create a 200,000 bytes file
* - completely read the created file
- * - write 100,000 more bytes in the file
+ * - write 100,000 bytes in the file
* - rename the created file
* - attach some user data to a disk
* - dump disk's contents
read = MSG_file_read(file, file_size);
XBT_INFO("Read %llu bytes on %s", read, file_name);
- // Now write 100,000 more bytes in tmp/data.txt
+ // Now write 100,000 bytes in tmp/data.txt
write = MSG_file_write(file, 100000); // Write 100,000 bytes
- XBT_INFO("Write %llu more bytes on %s", write, file_name);
+ XBT_INFO("Write %llu bytes on %s", write, file_name);
MSG_file_dump(file);
MSG_file_close(file);
> [0.003333] (1@denise) Free size: 536857490006 bytes
> [0.003333] (1@denise) Used size: 13421994 bytes
> [0.004583] (1@denise) Read 200000 bytes on ./tmp/data.txt
-> [0.007917] (1@denise) Write 100000 more bytes on ./tmp/data.txt
+> [0.007917] (1@denise) Write 100000 bytes on ./tmp/data.txt
> [0.007917] (1@denise) File Descriptor information:
> Full name: './tmp/data.txt'
-> Size: 300000
+> Size: 100000
> Mount point: '/home'
> Storage Id: 'Disk4'
> Storage Type: 'single_SSD'
> [0.007917] (1@denise) ./doc/simgrid/examples/smpi/mc_bugged2.c size: 1387 bytes
> [0.007917] (1@denise) ./include/simdag/simdag.h size: 10325 bytes
> [0.007917] (1@denise) ./doc/simgrid/examples/smpi/NAS/sys/README size: 1461 bytes
-> [0.007917] (1@denise) ./tmp/simgrid.readme size: 300000 bytes
+> [0.007917] (1@denise) ./tmp/simgrid.readme size: 100000 bytes
> [0.007917] (1@denise) ./doc/simgrid/examples/smpi/NAS/common/randdp.c size: 1441 bytes
> [0.007917] (1@denise) ./include/msg/datatypes.h size: 4635 bytes
> [0.007917] (1@denise) ./doc/simgrid/examples/smpi/NAS/EP/randlc.c size: 3300 bytes
/* Hack to avoid rounding differences between x86 and x86_64
* (note that the next sizes are of type sg_size_t). */
long incr = delta * rate + MAXMIN_PRECISION;
- action->p_storage->m_usedSize += incr; // disk usage
- action->p_file->size += incr; // file size
+ action->p_storage->m_usedSize += (incr - action->p_file->size); // disk usage
+ action->p_file->size = incr; // file size
sg_size_t *psize = xbt_new(sg_size_t,1);
*psize = action->p_file->size;