Message types for VFS mountpoint
Change-Id: I61c5729628b9b9262cc11415591b1b0f25ad04a8
This commit is contained in:
		
							parent
							
								
									83cd8ba616
								
							
						
					
					
						commit
						16a3f23203
					
				@ -204,6 +204,13 @@ typedef struct {
 | 
			
		||||
} mess_fs_vfs_lookup;
 | 
			
		||||
_ASSERT_MSG_SIZE(mess_fs_vfs_lookup);
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
	ino_t inode;
 | 
			
		||||
 | 
			
		||||
	uint8_t data[48];
 | 
			
		||||
} mess_vfs_fs_mountpoint;
 | 
			
		||||
_ASSERT_MSG_SIZE(mess_vfs_fs_mountpoint);
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
	dev_t device;
 | 
			
		||||
 | 
			
		||||
@ -330,6 +337,7 @@ typedef struct {
 | 
			
		||||
	mess_fs_vfs_create m_fs_vfs_create;
 | 
			
		||||
	mess_vfs_fs_lookup m_vfs_fs_lookup;
 | 
			
		||||
	mess_fs_vfs_lookup m_fs_vfs_lookup;
 | 
			
		||||
	mess_vfs_fs_mountpoint m_vfs_fs_mountpoint;
 | 
			
		||||
	mess_vfs_fs_readsuper m_vfs_fs_readsuper;
 | 
			
		||||
	mess_fs_vfs_readsuper m_fs_vfs_readsuper;
 | 
			
		||||
	mess_vfs_utimens m_vfs_utimens;
 | 
			
		||||
 | 
			
		||||
@ -49,13 +49,14 @@ int fs_mountpoint(void)
 | 
			
		||||
 */
 | 
			
		||||
  int r = OK;
 | 
			
		||||
  struct puffs_node *pn;
 | 
			
		||||
  pmode_t bits;
 | 
			
		||||
  mode_t bits;
 | 
			
		||||
 | 
			
		||||
  /*
 | 
			
		||||
   * XXX: we assume that lookup was done first, so pnode can be found with
 | 
			
		||||
   * puffs_pn_nodewalk.
 | 
			
		||||
   */
 | 
			
		||||
  if ((pn = puffs_pn_nodewalk(global_pu, 0, &fs_m_in.REQ_INODE_NR)) == NULL)
 | 
			
		||||
  if ((pn = puffs_pn_nodewalk(global_pu, 0, &fs_m_in.m_vfs_fs_mountpoint.inode))
 | 
			
		||||
	  == NULL)
 | 
			
		||||
	return(EINVAL);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -174,10 +174,10 @@ int fs_mountpoint()
 | 
			
		||||
 */
 | 
			
		||||
  register struct inode *rip;
 | 
			
		||||
  int r = OK;
 | 
			
		||||
  pmode_t bits;
 | 
			
		||||
  mode_t bits;
 | 
			
		||||
 | 
			
		||||
  /* Temporarily open the file. */
 | 
			
		||||
  if( (rip = get_inode(fs_dev, fs_m_in.REQ_INODE_NR)) == NULL)
 | 
			
		||||
  if( (rip = get_inode(fs_dev, fs_m_in.m_vfs_fs_mountpoint.inode)) == NULL)
 | 
			
		||||
	  return(EINVAL);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -70,7 +70,7 @@ int fs_mountpoint()
 | 
			
		||||
  int r = OK;
 | 
			
		||||
  
 | 
			
		||||
  /* Temporarily open the file. */
 | 
			
		||||
  if ((rip = get_dir_record(fs_m_in.REQ_INODE_NR)) == NULL)
 | 
			
		||||
  if ((rip = get_dir_record(fs_m_in.m_vfs_fs_mountpoint.inode)) == NULL)
 | 
			
		||||
	return(EINVAL);
 | 
			
		||||
 | 
			
		||||
  if (rip->d_mountpoint)
 | 
			
		||||
 | 
			
		||||
@ -132,7 +132,7 @@ int fs_mountpoint()
 | 
			
		||||
  pmode_t bits;
 | 
			
		||||
  
 | 
			
		||||
  /* Temporarily open the file. */
 | 
			
		||||
  if( (rip = get_inode(fs_dev, (pino_t) fs_m_in.REQ_INODE_NR)) == NULL)
 | 
			
		||||
  if( (rip = get_inode(fs_dev, fs_m_in.m_vfs_fs_mountpoint.inode)) == NULL)
 | 
			
		||||
	  return(EINVAL);
 | 
			
		||||
  
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
@ -607,7 +607,7 @@ int req_mountpoint(endpoint_t fs_e, ino_t inode_nr)
 | 
			
		||||
 | 
			
		||||
  /* Fill in request message */
 | 
			
		||||
  m.m_type = REQ_MOUNTPOINT;
 | 
			
		||||
  m.REQ_INODE_NR = (pino_t) inode_nr;
 | 
			
		||||
  m.m_vfs_fs_mountpoint.inode = inode_nr;
 | 
			
		||||
 | 
			
		||||
  /* Send/rec request */
 | 
			
		||||
  return fs_sendrec(fs_e, &m);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user