diff options
| author | Vijay Bellur <vijay@gluster.com> | 2010-10-12 03:06:30 +0000 | 
|---|---|---|
| committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-12 02:39:01 -0700 | 
| commit | 9bad9d59f0f19fe20f90c6ed80e25c7db08b3371 (patch) | |
| tree | 05dc2622a1ab6e00930f3846bd79cf560e8a939e /xlators | |
| parent | f637330995eab92a1d0b9f4ad9c43acfaad35037 (diff) | |
Change assert to GF_ASSERT
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'xlators')
| -rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 4 | ||||
| -rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 2 | ||||
| -rw-r--r-- | xlators/cluster/afr/src/pump.c | 10 | ||||
| -rw-r--r-- | xlators/features/locks/src/posix.c | 2 | ||||
| -rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 4 | ||||
| -rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 4 | ||||
| -rw-r--r-- | xlators/performance/io-cache/src/page.c | 2 | ||||
| -rw-r--r-- | xlators/performance/quick-read/src/quick-read.c | 2 | ||||
| -rw-r--r-- | xlators/performance/read-ahead/src/page.c | 2 | ||||
| -rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 2 | ||||
| -rw-r--r-- | xlators/protocol/legacy/transport/ib-verbs/src/ib-verbs.c | 2 | ||||
| -rw-r--r-- | xlators/protocol/legacy/transport/socket/src/socket.c | 4 | ||||
| -rw-r--r-- | xlators/storage/bdb/src/bctx.c | 2 | ||||
| -rw-r--r-- | xlators/storage/bdb/src/bdb.c | 2 | 
14 files changed, 22 insertions, 22 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 368a334230e..4ef11cb1bc8 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2451,10 +2451,10 @@ afr_priv_dump (xlator_t *this)          int   i = 0; -        assert(this); +        GF_ASSERT (this);          priv = this->private; -        assert(priv); +        GF_ASSERT (priv);          snprintf(key_prefix, GF_DUMP_MAX_BUF_LEN, "%s.%s", this->type, this->name);          gf_proc_dump_add_section(key_prefix);          gf_proc_dump_build_key(key, key_prefix, "child_count"); diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index c0c5e4c2c24..1bb395cc387 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -1639,7 +1639,7 @@ void  afr_self_heal_type_str_get (afr_self_heal_t *self_heal_p, char *str,                              size_t size)  { -        assert(str && (size > 0)); +        GF_ASSERT (str && (size > 0));          if (self_heal_p->need_metadata_self_heal) {                  snprintf(str, size, " meta-data"); diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c index 3bb9b851d30..a162d3fa164 100644 --- a/xlators/cluster/afr/src/pump.c +++ b/xlators/cluster/afr/src/pump.c @@ -135,7 +135,7 @@ pump_set_resume_path (xlator_t *this, const char *path)          priv = this->private;          pump_priv = priv->pump_private; -        assert (pump_priv); +        GF_ASSERT (pump_priv);          LOCK (&pump_priv->resume_path_lock);          { @@ -231,7 +231,7 @@ pump_save_path (xlator_t *this, const char *path)          priv = this->private;          pump_priv = priv->pump_private; -        assert (priv->root_inode); +        GF_ASSERT (priv->root_inode);          build_root_loc (priv->root_inode, &loc); @@ -424,7 +424,7 @@ gf_pump_traverse_directory (loc_t *loc)          this = THIS;          priv = this->private; -        assert (loc->inode); +        GF_ASSERT (loc->inode);  	fd = fd_create (loc->inode, PUMP_PID);          if (!fd) { @@ -587,7 +587,7 @@ pump_complete_migration (xlator_t *this)          priv = this->private;          pump_priv = priv->pump_private; -        assert (priv->root_inode); +        GF_ASSERT (priv->root_inode);          build_root_loc (priv->root_inode, &loc); @@ -683,7 +683,7 @@ pump_task (void *data)          this = THIS;          priv = this->private; -        assert (priv->root_inode); +        GF_ASSERT (priv->root_inode);          build_root_loc (priv->root_inode, &loc);          xattr_req = dict_new (); diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index f03fb06e0c4..dacc2b04eed 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -1835,7 +1835,7 @@ int  pl_dump_inode (xlator_t *this)  { -        assert(this); +        GF_ASSERT (this);          if (this->itable) {                  inode_table_dump(this->itable, diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 6578710ea07..8ddf9ee171b 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -3558,7 +3558,7 @@ init (xlator_t *this_xl)          ret = dict_get_str (options, ZR_DIRECT_IO_OPT, &value_string);          if (ret == 0) {                  ret = gf_string2boolean (value_string, &priv->direct_io_mode); -                assert (ret == 0); +                GF_ASSERT (ret == 0);          }          priv->strict_volfile_check = 0; @@ -3566,7 +3566,7 @@ init (xlator_t *this_xl)          if (ret == 0) {                  ret = gf_string2boolean (value_string,                                           &priv->strict_volfile_check); -                assert (ret == 0); +                GF_ASSERT (ret == 0);          }          priv->fuse_dump_fd = -1; diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 787c073e5e0..e76764bcb6a 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -1938,10 +1938,10 @@ ioc_priv_dump (xlator_t *this)          char            key_prefix[GF_DUMP_MAX_BUF_LEN];          char            key[GF_DUMP_MAX_BUF_LEN]; -        assert (this); +        GF_ASSERT (this);          priv = this->private; -        assert (priv); +        GF_ASSERT (priv);          gf_proc_dump_build_key (key_prefix, "xlator.performance.io-cache",                                  "priv"); diff --git a/xlators/performance/io-cache/src/page.c b/xlators/performance/io-cache/src/page.c index 07757c0c1a6..47a8fbb6606 100644 --- a/xlators/performance/io-cache/src/page.c +++ b/xlators/performance/io-cache/src/page.c @@ -779,7 +779,7 @@ ioc_frame_return (call_frame_t *frame)  	int32_t wait_count = 0;          local = frame->local; -        assert (local->wait_count > 0); +        GF_ASSERT (local->wait_count > 0);  	ioc_local_lock (local);  	{ diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c index 965f943799b..3bd0a615424 100644 --- a/xlators/performance/quick-read/src/quick-read.c +++ b/xlators/performance/quick-read/src/quick-read.c @@ -161,7 +161,7 @@ qr_fd_ctx_free (qr_fd_ctx_t *qr_fd_ctx)                  goto out;          } -        assert (list_empty (&qr_fd_ctx->waiting_ops)); +        GF_ASSERT (list_empty (&qr_fd_ctx->waiting_ops));          GF_FREE (qr_fd_ctx->path);          GF_FREE (qr_fd_ctx); diff --git a/xlators/performance/read-ahead/src/page.c b/xlators/performance/read-ahead/src/page.c index 5e69add2df5..925bc253d65 100644 --- a/xlators/performance/read-ahead/src/page.c +++ b/xlators/performance/read-ahead/src/page.c @@ -423,7 +423,7 @@ ra_frame_return (call_frame_t *frame)  	int32_t     wait_count = 0;  	local = frame->local; -	assert (local->wait_count > 0); +	GF_ASSERT (local->wait_count > 0);  	ra_local_lock (local);  	{ diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index 70335f6227a..d693b596b50 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -2516,7 +2516,7 @@ wb_release (xlator_t *this, fd_t *fd)          if (file != NULL) {                  LOCK (&file->lock);                  { -                        assert (list_empty (&file->request)); +                        GF_ASSERT (list_empty (&file->request));                  }                  UNLOCK (&file->lock); diff --git a/xlators/protocol/legacy/transport/ib-verbs/src/ib-verbs.c b/xlators/protocol/legacy/transport/ib-verbs/src/ib-verbs.c index 9020f58dbe8..92034cd1519 100644 --- a/xlators/protocol/legacy/transport/ib-verbs/src/ib-verbs.c +++ b/xlators/protocol/legacy/transport/ib-verbs/src/ib-verbs.c @@ -500,7 +500,7 @@ ib_verbs_ioq_new (char *buf, int len, struct iovec *vector,          /* TODO: use mem-pool */          entry = GF_CALLOC (1, sizeof (*entry), gf_ibv_mt_ib_verbs_ioq_t); -        assert (count <= (MAX_IOVEC-2)); +        GF_ASSERT (count <= (MAX_IOVEC-2));          entry->header.colonO[0] = ':';          entry->header.colonO[1] = 'O'; diff --git a/xlators/protocol/legacy/transport/socket/src/socket.c b/xlators/protocol/legacy/transport/socket/src/socket.c index 0ba329ba73e..c101a8715cf 100644 --- a/xlators/protocol/legacy/transport/socket/src/socket.c +++ b/xlators/protocol/legacy/transport/socket/src/socket.c @@ -343,7 +343,7 @@ __socket_ioq_new (transport_t *this, char *buf, int len,          if (!entry)                  return NULL; -        assert (count <= (MAX_IOVEC-2)); +        GF_ASSERT (count <= (MAX_IOVEC-2));          entry->header.colonO[0] = ':';          entry->header.colonO[1] = 'O'; @@ -423,7 +423,7 @@ __socket_ioq_churn_entry (transport_t *this, struct ioq *entry)          if (ret == 0) {                  /* current entry was completely written */ -                assert (entry->pending_count == 0); +                GF_ASSERT (entry->pending_count == 0);                  __socket_ioq_entry_free (entry);          } diff --git a/xlators/storage/bdb/src/bctx.c b/xlators/storage/bdb/src/bctx.c index d7d0932c914..e87b2e7a98d 100644 --- a/xlators/storage/bdb/src/bctx.c +++ b/xlators/storage/bdb/src/bctx.c @@ -167,7 +167,7 @@ __bctx_activate (bctx_t *bctx)  static bctx_t *  __bdb_ctx_unref (bctx_t *bctx)  { -        assert (bctx->ref); +        GF_ASSERT (bctx->ref);          --bctx->ref; diff --git a/xlators/storage/bdb/src/bdb.c b/xlators/storage/bdb/src/bdb.c index 8ef409a53b1..f8c5ee270a0 100644 --- a/xlators/storage/bdb/src/bdb.c +++ b/xlators/storage/bdb/src/bdb.c @@ -3230,7 +3230,7 @@ notify (xlator_t *this,          case GF_EVENT_PARENT_UP:          {                  /* Tell the parent that bdb xlator is up */ -                assert ((this->private != NULL) && +                GF_ASSERT ((this->private != NULL) &&                          (BDB_ENV(this) != NULL));                  default_notify (this, GF_EVENT_CHILD_UP, data);          }  | 
