Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 5bb9907 in mainline


Ignore:
Timestamp:
2011-07-26T19:54:53Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
867e2555, ceb890b
Parents:
7eb0fed8
Message:

Fix VFS_OUT_READ and VFS_OUT_WRITE with respect to 64-bit file sizes.

Location:
uspace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/fs/libfs.c

    r7eb0fed8 r5bb9907  
    157157        rc = vfs_out_ops->write(devmap_handle, index, pos, &wbytes, &nsize);
    158158
    159         if (rc == EOK)  // FIXME: nsize is 64-bit
    160                 async_answer_2(rid, EOK, wbytes, nsize);
     159        if (rc == EOK)
     160                async_answer_3(rid, EOK, wbytes, LOWER32(nsize), UPPER32(nsize));
    161161        else
    162162                async_answer_0(rid, rc);
  • uspace/srv/vfs/vfs_ops.c

    r7eb0fed8 r5bb9907  
    796796        ipc_call_t answer;
    797797        if (read) {
    798                 rc = async_data_read_forward_3_1(fs_exch, VFS_OUT_READ,
    799                     file->node->devmap_handle, file->node->index, file->pos,
    800                     &answer);
     798                rc = async_data_read_forward_4_1(fs_exch, VFS_OUT_READ,
     799                    file->node->devmap_handle, file->node->index,
     800                    LOWER32(file->pos), UPPER32(file->pos), &answer);
    801801        } else {
    802802                if (file->append)
    803803                        file->pos = file->node->size;
    804804               
    805                 rc = async_data_write_forward_3_1(fs_exch, VFS_OUT_WRITE,
    806                     file->node->devmap_handle, file->node->index, file->pos,
    807                     &answer);
     805                rc = async_data_write_forward_4_1(fs_exch, VFS_OUT_WRITE,
     806                    file->node->devmap_handle, file->node->index,
     807                    LOWER32(file->pos), UPPER32(file->pos), &answer);
    808808        }
    809809       
     
    822822                /* Update the cached version of node's size. */
    823823                if (rc == EOK)
    824                         file->node->size = IPC_GET_ARG2(answer);
     824                        file->node->size = MERGE_LOUP32(IPC_GET_ARG2(answer),
     825                            IPC_GET_ARG3(answer));
    825826                fibril_rwlock_write_unlock(&file->node->contents_rwlock);
    826827        }
Note: See TracChangeset for help on using the changeset viewer.