Changeset 656 for trunk/kernel/fs/vfs.h
- Timestamp:
- Dec 6, 2019, 12:07:51 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/vfs.h
r635 r656 602 602 * and synchronously update the IOC device). 603 603 * 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. 604 605 * 3. It updates the parent directory mapper to introduce the new child, 605 606 * and synchronously update the IOC device. … … 660 661 * account the offset in <file_xp>. The transfer direction is defined by <to_buffer>. 661 662 * 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. 662 667 ****************************************************************************************** 663 668 * @ to_buffer : mapper -> buffer if true / buffer -> mapper if false. 664 669 * @ file_xp : extended pointer on the remote file descriptor. 665 670 * @ 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. 667 672 * @ returns number of bytes actually moved if success / -1 if error. 668 673 *****************************************************************************************/ 669 int vfs_user_move( bool_t to_buffer,670 xptr_t file_xp,671 void * buffer,672 uint32_t size);674 uint32_t vfs_user_move( bool_t to_buffer, 675 xptr_t file_xp, 676 void * buffer, 677 uint32_t count ); 673 678 674 679 /****************************************************************************************** … … 745 750 * to the file, and removes these pages from the dirty list, using an RPC if required. 746 751 * 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. 748 753 * 3) All entries in the fd_array copies are directly reset by the calling thread, 749 754 * using remote accesses. … … 895 900 * argument to/from the IOC device from/to the mapper, as defined by the <cmd_type>. 896 901 * 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 must898 * be updated in the File System.899 * The mapper pointer isobtained 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. 900 905 * It can be executed by any thread running in any cluster. 901 906 * This function does NOT take any lock.
Note: See TracChangeset
for help on using the changeset viewer.