Check-in [67735b9ee3]
Overview
Comment:Updated to flush cache before exiting in exit path mode and allow short reads without returning an error as they seem to be expected
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:67735b9ee34f262331fd029307b0ca10afc81bd1
User & Date: rkeene on 2014-11-15 17:20:18
Other Links: manifest | tags
Context
2014-11-15
17:33
Added dangling symlink support check-in: 538accae67 user: rkeene tags: trunk
17:20
Updated to flush cache before exiting in exit path mode and allow short reads without returning an error as they seem to be expected check-in: 67735b9ee3 user: rkeene tags: trunk
16:46
Added more debugging, renamed appfs_terminate_interp for with more accurate name, fixed FUSE read/write to use pread/pwrite and return no short reads as is required by FUSE, added call to Tcl_FinalizeThread() on thread termination check-in: d5bfe6710c user: rkeene tags: trunk
Changes

Modified appfsd.c from [69177869fa] to [1c0ba85f13].

   385    385   
   386    386   		interp = NULL;
   387    387   
   388    388   		pthread_ret = pthread_setspecific(interpKey, interp);
   389    389   	}
   390    390   
   391    391   	if (global_interp_reset_key == -1) {
   392         -		APPFS_DEBUG("Not creating a new interpreter since we are terminating.");
          392  +		APPFS_DEBUG("Returning NULL since we are in the process of terminating all threads.");
   393    393   
   394    394   		return(NULL);
   395    395   	}
   396    396   
   397    397   	thread_interp_reset_key = global_interp_reset_key;
   398    398   
   399    399   	if (interp == NULL) {
................................................................................
  1072   1072   	}
  1073   1073   
  1074   1074   	global_interp_reset_key = __sync_fetch_and_add(&interp_reset_key, 0);
  1075   1075   	if (global_interp_reset_key != -1) {
  1076   1076   		APPFS_DEBUG("Error sending kill signal to all threads, aborting anyway.");
  1077   1077   	}
  1078   1078   
  1079         -	fuse_exit(fuse_get_context()->fuse);
  1080         -
  1081   1079   	appfs_get_path_info_cache_flush(-1, -1);
         1080  +
         1081  +	fuse_exit(fuse_get_context()->fuse);
  1082   1082   
  1083   1083   	return;
  1084   1084   }
  1085   1085   #endif
  1086   1086   
  1087   1087   static int appfs_fuse_readlink(const char *path, char *buf, size_t size) {
  1088   1088   	struct appfs_pathinfo pathinfo;
................................................................................
  1390   1390   		size -= read_ret;
  1391   1391   		buf  += read_ret;
  1392   1392   		offset += read_ret;
  1393   1393   		retval += read_ret;
  1394   1394   	}
  1395   1395   
  1396   1396   	if (size != 0) {
  1397         -		APPFS_DEBUG("error: incomplete read (this is an error because FUSE will request the exact length of the file)");
  1398         -
  1399         -		return(0);
         1397  +		APPFS_DEBUG("error: incomplete read (this might be an error because FUSE will request the exact length of the file)");
  1400   1398   	}
  1401   1399   
  1402   1400   	APPFS_DEBUG("Returning: %i", retval);
  1403   1401   
  1404   1402   	return(retval);
  1405   1403   }
  1406   1404