Changeset 628 for trunk/kernel/fs/vfs.c


Ignore:
Timestamp:
May 6, 2019, 1:28:01 PM (5 years ago)
Author:
alain
Message:

Introduce teh page_min / page_max mechanism in the fatfs_release_inode()
function, to avoid to scan all pages in FAT mapper.

File:
1 edited

Legend:

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

    r626 r628  
    815815assert( (inode_type == INODE_TYPE_FILE), "bad inode type" );
    816816
     817    // get mapper pointer and file offset from file descriptor
     818    file_offset = hal_remote_l32( XPTR( file_cxy , &file_ptr->offset ) );
     819    mapper      = hal_remote_lpt( XPTR( file_cxy , &file_ptr->mapper ) );
     820
    817821#if DEBUG_VFS_USER_MOVE
    818822char          name[CONFIG_VFS_MAX_NAME_LENGTH];
     
    824828{
    825829    if( to_buffer )
    826     printk("\n[%s] thread[%x,%x] enter / %d bytes / mapper(%s) -> buffer(%x) / cycle %d\n",
    827     __FUNCTION__ , this->process->pid, this->trdid, size, name, buffer, cycle );
     830    printk("\n[%s] thread[%x,%x] enter / %d bytes / map(%s) -> buf(%x) / offset %d / cycle %d\n",
     831    __FUNCTION__ , this->process->pid, this->trdid, size, name, buffer, file_offset, cycle );
    828832    else           
    829     printk("\n[%s] thread[%x,%x] enter / %d bytes / buffer(%x) -> mapper(%s) / cycle %d\n",
    830     __FUNCTION__ , this->process->pid, this->trdid, size, buffer, name, cycle );
     833    printk("\n[%s] thread[%x,%x] enter / %d bytes / buf(%x) -> map(%s) / offset %d / cycle %d\n",
     834    __FUNCTION__ , this->process->pid, this->trdid, size, buffer, name, file_offset, cycle );
    831835}
    832836#endif
    833 
    834     // get mapper pointer and file offset from file descriptor
    835     file_offset = hal_remote_l32( XPTR( file_cxy , &file_ptr->offset ) );
    836     mapper      = hal_remote_lpt( XPTR( file_cxy , &file_ptr->mapper ) );
    837837
    838838    // move data between mapper and buffer
     
    856856{
    857857    if( to_buffer )
    858     printk("\n[%s] thread[%x,%x] exit / %d bytes / mapper(%s) -> buffer(%x) / cycle %d\n",
    859     __FUNCTION__ , this->process->pid, this->trdid, size, name, buffer, cycle );
     858    printk("\n[%s] thread[%x,%x] exit / cycle %d\n",
     859    __FUNCTION__ , this->process->pid, cycle );
    860860    else           
    861     printk("\n[%s] thread[%x,%x] exit / %d bytes / buffer(%x) -> mapper(%s) / cycle %d\n",
    862     __FUNCTION__ , this->process->pid, this->trdid, size, buffer, name, cycle );
     861    printk("\n[%s] thread[%x,%x] exit / cycle %d\n",
     862    __FUNCTION__ , this->process->pid, cycle );
    863863}
    864864#endif
     
    25382538#if (DEBUG_VFS_LOOKUP & 1)
    25392539if( DEBUG_VFS_LOOKUP < cycle )
    2540 printk("\n[%s] thread[%x,%x] look for <%s> in <%s> / last = %d\n",
     2540printk("\n[%s] thread[%x,%x] search <%s> in <%s> / last = %d\n",
    25412541__FUNCTION__, process->pid, this->trdid, name, pathname, last );
    25422542#endif
Note: See TracChangeset for help on using the changeset viewer.