Changeset 656 for trunk/kernel/fs/vfs.h


Ignore:
Timestamp:
Dec 6, 2019, 12:07:51 PM (4 years ago)
Author:
alain
Message:

Fix several bugs in the FATFS and in the VFS,
related to the creation of big files requiring
more than 4 Kbytes (one cluster) on device.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/fs/vfs.h

    r635 r656  
    602602 *    and synchronously update the IOC device).
    603603 * 2. It set the "size", and "extend" fields in child inode descriptor.
     604 *    The size is 4096 for a directory, the size is 0 for a file.
    604605 * 3. It updates the parent directory mapper to introduce the new child,
    605606 *    and synchronously update the IOC device.
     
    660661 * account the offset in <file_xp>. The transfer direction is defined by <to_buffer>.
    661662 * It is called by the sys_read() and sys_write() functions.
     663 * - for a read, it checks the actual file size (registered in the inode descriptor),
     664 *   against the (offset + count), and moves only the significant bytes.
     665 * - for a write, it updates the the file size in inode descriptor if required.
     666 * In case of write to the mapper, the "inode.size" field is updated as required.
    662667 ******************************************************************************************
    663668 * @ to_buffer : mapper -> buffer if true / buffer -> mapper if false.
    664669 * @ file_xp   : extended pointer on the remote file descriptor.
    665670 * @ buffer    : user space pointer on buffer (can be physically distributed).
    666  * @ size      : requested number of bytes from offset.
     671 * @ count     : requested number of bytes from offset.
    667672 * @ returns number of bytes actually moved if success / -1 if error.
    668673 *****************************************************************************************/
    669 int vfs_user_move( bool_t   to_buffer,
    670                    xptr_t   file_xp,
    671                    void   * buffer,
    672                    uint32_t size );
     674uint32_t vfs_user_move( bool_t   to_buffer,
     675                        xptr_t   file_xp,
     676                        void   * buffer,
     677                        uint32_t count );
    673678
    674679/******************************************************************************************
     
    745750 *    to the file, and removes these pages from the dirty list, using an RPC if required.
    746751 * 2) It updates the file size in all parent directory mapper(s), and update the modified
    747  *    pages on the block device, using RPCs if required.
     752 *    pages on the block device, using RPCs if required, only if the size is modified.
    748753 * 3) All entries in the fd_array copies are directly reset by the calling thread,
    749754 *    using remote accesses.
     
    895900 * argument to/from the IOC device from/to the mapper, as defined by the <cmd_type>.
    896901 * Depending on the file system type, it calls the proper, FS specific function.
    897  * It is used in case of MISS on the mapper, or when a dirty page in the mapper must
    898  * be updated in the File System.
    899  * The mapper pointer is obtained from the page descriptor.
     902 * It is used in case of MISS on the mapper (read), or when a dirty page in the mapper
     903 * must be updated in the File System (write).
     904 * The mapper pointer, and the page index in file are obtained from the page descriptor.
    900905 * It can be executed by any thread running in any cluster.
    901906 * This function does NOT take any lock.
Note: See TracChangeset for help on using the changeset viewer.