Changeset 561 for trunk/kernel/fs


Ignore:
Timestamp:
Sep 21, 2018, 10:26:47 PM (6 years ago)
Author:
nicolas.van.phan@…
Message:

Remove y_max in all functions except dqdt_init()

Location:
trunk/kernel/fs
Files:
3 edited

Legend:

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

    r457 r561  
    3838    xptr_t    root_inode_xp;   // unused                     
    3939 
    40     cxy_t     cxy = vfs_cluster_random_select();
     40    cxy_t     cxy = cluster_random_select();
    4141
    4242    // create VFS dentry and VFS inode for RAMFS root directory
  • trunk/kernel/fs/vfs.c

    r530 r561  
    11241124//////////////////////////////////////////////////////////////////////////////////////////
    11251125
    1126 /////////////////////////////////
    1127 cxy_t vfs_cluster_random_select( void )
    1128 {
    1129     uint32_t  x_max     = LOCAL_CLUSTER->x_max; // [FIXME]
    1130     uint32_t  y_max     = LOCAL_CLUSTER->y_max; // [FIXME]
    1131     uint32_t  y_width   = LOCAL_CLUSTER->y_width;
    1132     uint32_t  index     = ( hal_get_cycles() + hal_get_gid() ) % (x_max * y_max); // [FIXME]
    1133     uint32_t  x         = index / y_max; // [FIXME]
    1134     uint32_t  y         = index % y_max; // [FIXME]
    1135 
    1136     return (x<<y_width) + y;
    1137 }
    1138 
    11391126
    11401127//////////////////////////////////////////////////////////////////////////
     
    15121499
    15131500            // select a cluster for missing inode
    1514             child_cxy = vfs_cluster_random_select();
     1501            child_cxy = cluster_random_select();
    15151502 
    15161503            // insert a new child dentry/inode in inode tree
  • trunk/kernel/fs/vfs.h

    r484 r561  
    517517
    518518/******************************************************************************************
    519  * This function randomly selects a cluster for a new inode.
    520  ******************************************************************************************
    521  * @ returns the selected cluster identifier.
    522  *****************************************************************************************/
    523 cxy_t vfs_cluster_random_select( void );
    524 
    525 /******************************************************************************************
    526519 * This function returns in a kernel buffer allocated by the caller function,
    527520 * the pathname of a file/dir identified by an extended pointer on the inode.
Note: See TracChangeset for help on using the changeset viewer.