diff options
| author | Shehjar Tikoo <shehjart@gluster.com> | 2009-06-25 14:31:28 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2009-06-30 14:36:28 -0700 | 
| commit | d93b62a943f8181928f13175a273bcd9f1e0118f (patch) | |
| tree | 7440e97d62e0d757ddad344347143f01617809de /libglusterfs | |
| parent | 666e5c127a20ec1f3ef08610db588ac6ecf6e5f3 (diff) | |
booster: Remove gf_fd_unused_get2
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfs')
| -rw-r--r-- | libglusterfs/src/fd.c | 37 | ||||
| -rw-r--r-- | libglusterfs/src/fd.h | 7 | 
2 files changed, 4 insertions, 40 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c index b28fb047e4a..39385fd7577 100644 --- a/libglusterfs/src/fd.c +++ b/libglusterfs/src/fd.c @@ -227,43 +227,6 @@ gf_fd_fdtable_destroy (fdtable_t *fdtable)  	}  } -int32_t -gf_fd_unused_get2 (fdtable_t *fdtable, fd_t *fdptr, int32_t fd) -{ -	int32_t ret = -1; -	 -	if (fdtable == NULL || fdptr == NULL || fd < 0) -	{ -		gf_log ("fd", GF_LOG_ERROR, "invalid argument"); -		errno = EINVAL; -		return -1; -	} -  -	pthread_mutex_lock (&fdtable->lock); -	{ -		while (fdtable->max_fds < fd) { -			int error = 0; -			error = gf_fd_fdtable_expand (fdtable, fdtable->max_fds + 1); -			if (error)  -			{ -				gf_log ("fd.c", -					GF_LOG_ERROR, -					"Cannot expand fdtable:%s", strerror (error)); -				goto err; -			} -		} -		 -		fdtable->fdentries[fd].fd = fdptr; -		fd_ref (fdptr); -		ret = fd; -        } -err: -	pthread_mutex_unlock (&fdtable->lock); -	 -	return ret; -} - -    int32_t   gf_fd_unused_get (fdtable_t *fdtable, fd_t *fdptr)  { diff --git a/libglusterfs/src/fd.h b/libglusterfs/src/fd.h index efe02e8876b..298b1b34765 100644 --- a/libglusterfs/src/fd.h +++ b/libglusterfs/src/fd.h @@ -38,6 +38,10 @@ struct _fd_ctx {  	uint64_t value;  }; +/* If this structure changes, please have mercy on the booster maintainer + * and update the fd_t struct in booster/src/booster-fd.h. + * See the comment there to know why. + */  struct _fd {          pid_t             pid;  	int32_t           flags; @@ -89,9 +93,6 @@ gf_fd_fdtable_alloc (void);  int32_t   gf_fd_unused_get (fdtable_t *fdtable, fd_t *fdptr); -int32_t  -gf_fd_unused_get2 (fdtable_t *fdtable, fd_t *fdptr, int32_t fd); -  fdentry_t *  gf_fd_fdtable_get_all_fds (fdtable_t *fdtable, uint32_t *count);  | 
