"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "api/src/glfs.c" between
glusterfs-7.5.tar.gz and glusterfs-7.6.tar.gz

About: GlusterFS is a network/cluster filesystem. The storage server (or each in a cluster) runs glusterfsd and the clients use mount command or glusterfs client to mount the exported filesystem. Release series 7.x (latest version).

glfs.c  (glusterfs-7.5):glfs.c  (glusterfs-7.6)
skipping to change at line 744 skipping to change at line 744
glfs_new_fs(const char *volname) glfs_new_fs(const char *volname)
{ {
struct glfs *fs = NULL; struct glfs *fs = NULL;
fs = CALLOC(1, sizeof(*fs)); fs = CALLOC(1, sizeof(*fs));
if (!fs) if (!fs)
return NULL; return NULL;
INIT_LIST_HEAD(&fs->openfds); INIT_LIST_HEAD(&fs->openfds);
INIT_LIST_HEAD(&fs->upcall_list); INIT_LIST_HEAD(&fs->upcall_list);
INIT_LIST_HEAD(&fs->waitq);
PTHREAD_MUTEX_INIT(&fs->mutex, NULL, fs->pthread_flags, GLFS_INIT_MUTEX, PTHREAD_MUTEX_INIT(&fs->mutex, NULL, fs->pthread_flags, GLFS_INIT_MUTEX,
err); err);
PTHREAD_COND_INIT(&fs->cond, NULL, fs->pthread_flags, GLFS_INIT_COND, err); PTHREAD_COND_INIT(&fs->cond, NULL, fs->pthread_flags, GLFS_INIT_COND, err);
PTHREAD_COND_INIT(&fs->child_down_cond, NULL, fs->pthread_flags, PTHREAD_COND_INIT(&fs->child_down_cond, NULL, fs->pthread_flags,
GLFS_INIT_COND_CHILD, err); GLFS_INIT_COND_CHILD, err);
PTHREAD_MUTEX_INIT(&fs->upcall_list_mutex, NULL, fs->pthread_flags, PTHREAD_MUTEX_INIT(&fs->upcall_list_mutex, NULL, fs->pthread_flags,
skipping to change at line 1232 skipping to change at line 1233
pub_glfs_fini(struct glfs *fs) pub_glfs_fini(struct glfs *fs)
{ {
int ret = -1; int ret = -1;
int countdown = 100; int countdown = 100;
xlator_t *subvol = NULL; xlator_t *subvol = NULL;
glusterfs_ctx_t *ctx = NULL; glusterfs_ctx_t *ctx = NULL;
glusterfs_graph_t *graph = NULL; glusterfs_graph_t *graph = NULL;
call_pool_t *call_pool = NULL; call_pool_t *call_pool = NULL;
int fs_init = 0; int fs_init = 0;
int err = -1; int err = -1;
struct synctask *waittask = NULL;
DECLARE_OLD_THIS; DECLARE_OLD_THIS;
if (!fs) { if (!fs) {
errno = EINVAL; errno = EINVAL;
goto invalid_fs; goto invalid_fs;
} }
ctx = fs->ctx; ctx = fs->ctx;
if (!ctx) { if (!ctx) {
skipping to change at line 1253 skipping to change at line 1255
} }
THIS = fs->ctx->master; THIS = fs->ctx->master;
if (ctx->mgmt) { if (ctx->mgmt) {
rpc_clnt_disable(ctx->mgmt); rpc_clnt_disable(ctx->mgmt);
} }
call_pool = fs->ctx->pool; call_pool = fs->ctx->pool;
/* Wake up any suspended synctasks */
while (!list_empty(&fs->waitq)) {
waittask = list_entry(fs->waitq.next, struct synctask, waitq);
list_del_init(&waittask->waitq);
synctask_wake(waittask);
}
while (countdown--) { while (countdown--) {
/* give some time for background frames to finish */ /* give some time for background frames to finish */
pthread_mutex_lock(&fs->mutex); pthread_mutex_lock(&fs->mutex);
{ {
/* Do we need to increase countdown? */ /* Do we need to increase countdown? */
if ((!call_pool->cnt) && (!fs->pin_refcnt)) { if ((!call_pool->cnt) && (!fs->pin_refcnt)) {
gf_msg_trace("glfs", 0, gf_msg_trace("glfs", 0,
"call_pool_cnt - %" PRId64 "call_pool_cnt - %" PRId64
"," ","
"pin_refcnt - %d", "pin_refcnt - %d",
 End of changes. 3 change blocks. 
0 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)