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
386
387
388
389
390
391
392
393
394
395
396
397
398
399

		interp = NULL;

		pthread_ret = pthread_setspecific(interpKey, interp);
	}

	if (global_interp_reset_key == -1) {
		APPFS_DEBUG("Not creating a new interpreter since we are terminating.");

		return(NULL);
	}

	thread_interp_reset_key = global_interp_reset_key;

	if (interp == NULL) {







|







385
386
387
388
389
390
391
392
393
394
395
396
397
398
399

		interp = NULL;

		pthread_ret = pthread_setspecific(interpKey, interp);
	}

	if (global_interp_reset_key == -1) {
		APPFS_DEBUG("Returning NULL since we are in the process of terminating all threads.");

		return(NULL);
	}

	thread_interp_reset_key = global_interp_reset_key;

	if (interp == NULL) {
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
	}

	global_interp_reset_key = __sync_fetch_and_add(&interp_reset_key, 0);
	if (global_interp_reset_key != -1) {
		APPFS_DEBUG("Error sending kill signal to all threads, aborting anyway.");
	}

	fuse_exit(fuse_get_context()->fuse);

	appfs_get_path_info_cache_flush(-1, -1);

	return;
}
#endif

static int appfs_fuse_readlink(const char *path, char *buf, size_t size) {
	struct appfs_pathinfo pathinfo;







|

|







1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
	}

	global_interp_reset_key = __sync_fetch_and_add(&interp_reset_key, 0);
	if (global_interp_reset_key != -1) {
		APPFS_DEBUG("Error sending kill signal to all threads, aborting anyway.");
	}

	appfs_get_path_info_cache_flush(-1, -1);

	fuse_exit(fuse_get_context()->fuse);

	return;
}
#endif

static int appfs_fuse_readlink(const char *path, char *buf, size_t size) {
	struct appfs_pathinfo pathinfo;
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
		size -= read_ret;
		buf  += read_ret;
		offset += read_ret;
		retval += read_ret;
	}

	if (size != 0) {
		APPFS_DEBUG("error: incomplete read (this is an error because FUSE will request the exact length of the file)");

		return(0);
	}

	APPFS_DEBUG("Returning: %i", retval);

	return(retval);
}








|
<
<







1390
1391
1392
1393
1394
1395
1396
1397


1398
1399
1400
1401
1402
1403
1404
		size -= read_ret;
		buf  += read_ret;
		offset += read_ret;
		retval += read_ret;
	}

	if (size != 0) {
		APPFS_DEBUG("error: incomplete read (this might be an error because FUSE will request the exact length of the file)");


	}

	APPFS_DEBUG("Returning: %i", retval);

	return(retval);
}