diff options
| -rw-r--r-- | libglusterfs/src/defaults.c | 12 | ||||
| -rw-r--r-- | xlators/cluster/afr/src/pump.c | 18 | 
2 files changed, 23 insertions, 7 deletions
diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c index a3f506d9bf5..7e09a2c2b3e 100644 --- a/libglusterfs/src/defaults.c +++ b/libglusterfs/src/defaults.c @@ -1265,8 +1265,8 @@ default_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,  int32_t  default_forget (xlator_t *this, inode_t *inode)  { -        gf_log (this->name, GF_LOG_WARNING, "xlator does not implement " -                "forget_cbk"); +        gf_log_callingfn (this->name, GF_LOG_WARNING, "xlator does not " +                          "implement forget_cbk");          return 0;  } @@ -1274,16 +1274,16 @@ default_forget (xlator_t *this, inode_t *inode)  int32_t  default_releasedir (xlator_t *this, fd_t *fd)  { -        gf_log (this->name, GF_LOG_WARNING, "xlator does not implement " -                "releasedir_cbk"); +        gf_log_callingfn (this->name, GF_LOG_WARNING, "xlator does not " +                          "implement releasedir_cbk");          return 0;  }  int32_t  default_release (xlator_t *this, fd_t *fd)  { -        gf_log (this->name, GF_LOG_WARNING, "xlator does not implement " -                "release_cbk"); +        gf_log_callingfn (this->name, GF_LOG_WARNING, "xlator does not " +                          "implement release_cbk");          return 0;  } diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c index b2fd1f7385b..2d72e305098 100644 --- a/xlators/cluster/afr/src/pump.c +++ b/xlators/cluster/afr/src/pump.c @@ -437,7 +437,7 @@ gf_pump_traverse_directory (loc_t *loc)                                                      gf_pump_traverse_directory (&entry_loc);                                              }                                      } -                            } +                        }                  }                  gf_dirent_free (&entries); @@ -448,6 +448,10 @@ gf_pump_traverse_directory (loc_t *loc)          } +        ret = syncop_close (fd); +        if (ret < 0) +                gf_log (this->name, GF_LOG_DEBUG, "closing the fd failed"); +          if (is_directory_empty && IS_ROOT_PATH (loc->path)) {                 pump_change_state (this, PUMP_STATE_RUNNING);                 gf_log (this->name, GF_LOG_INFO, "Empty source brick. " @@ -2258,6 +2262,17 @@ pump_release (xlator_t *this,  } +static int32_t +pump_forget (xlator_t *this, inode_t *inode) +{ +        afr_private_t  *priv  = NULL; + +        priv = this->private; +        if (priv->use_afr_in_pump) +                afr_forget (this, inode); + +        return 0; +}  static int32_t  pump_setattr (call_frame_t *frame, @@ -2622,6 +2637,7 @@ struct xlator_dumpops dumpops = {  struct xlator_cbks cbks = {  	.release     = pump_release,  	.releasedir  = pump_releasedir, +        .forget      = pump_forget,  };  struct volume_options options[] = {  | 
