VFS: find job only if request is an transaction
This commit is contained in:
		
							parent
							
								
									8f55767619
								
							
						
					
					
						commit
						f571466c56
					
				| @ -71,7 +71,7 @@ int main(void) | |||||||
|  * three major activities: getting new work, processing the work, and sending |  * three major activities: getting new work, processing the work, and sending | ||||||
|  * the reply.  This loop never terminates as long as the file system runs. |  * the reply.  This loop never terminates as long as the file system runs. | ||||||
|  */ |  */ | ||||||
|   int transid, req; |   int transid; | ||||||
|   struct job *job; |   struct job *job; | ||||||
| 
 | 
 | ||||||
|   /* SEF local startup. */ |   /* SEF local startup. */ | ||||||
| @ -83,18 +83,20 @@ int main(void) | |||||||
|   while (TRUE) { |   while (TRUE) { | ||||||
| 	yield_all();	/* let other threads run */ | 	yield_all();	/* let other threads run */ | ||||||
| 	self = NULL; | 	self = NULL; | ||||||
|  | 	job = NULL; | ||||||
| 	send_work(); | 	send_work(); | ||||||
| 	get_work(); | 	get_work(); | ||||||
| 
 | 
 | ||||||
| 	transid = TRNS_GET_ID(m_in.m_type); | 	transid = TRNS_GET_ID(m_in.m_type); | ||||||
| 	req = TRNS_DEL_ID(m_in.m_type); | 	if (IS_VFS_FS_TRANSID(transid)) { | ||||||
| 	job = worker_getjob( (thread_t) transid - VFS_TRANSID); | 		job = worker_getjob( (thread_t) transid - VFS_TRANSID); | ||||||
| 
 | 		if (job == NULL) { | ||||||
| 	/* Transaction encoding changes original m_type value; restore. */ | 			printf("VFS: spurious message %d from endpoint %d\n", | ||||||
| 	if (job == NULL) | 				m_in.m_type, m_in.m_source); | ||||||
| 		m_in.m_type = transid; | 			continue; | ||||||
| 	else | 		} | ||||||
| 		m_in.m_type = req; | 		m_in.m_type = TRNS_DEL_ID(m_in.m_type); | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	if (job != NULL) { | 	if (job != NULL) { | ||||||
| 		do_fs_reply(job); | 		do_fs_reply(job); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Thomas Veerman
						Thomas Veerman