diff options
author | Jiffin Tony Thottan <jthottan@redhat.com> | 2016-10-21 00:08:26 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2016-11-03 07:09:41 -0700 |
commit | cd9be49f6fe05d424989c0686a7e55a3f3ead27e (patch) | |
tree | ecd50321b5493015357ae0cfe4c4d3c9146d8624 /xlators/features/trash/src/trash.c | |
parent | 9a2b3fb8b9ff28edafa012dacc5f5f0e4ee1afab (diff) |
xlators/trash : Remove upper limit for trash max file size
Currently file which size exceeds more than 1GB never moved to
trash directory. This is due to the hard coded check using
GF_ALLOWED_MAX_FILE_SIZE.
Change-Id: I2ed707bfe1c3114818896bb27a9856b9a164be92
BUG: 1386766
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/15689
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/trash/src/trash.c')
-rw-r--r-- | xlators/features/trash/src/trash.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c index 22ee0a3f48e..02302c2c5d9 100644 --- a/xlators/features/trash/src/trash.c +++ b/xlators/features/trash/src/trash.c @@ -2105,13 +2105,7 @@ reconfigure (xlator_t *this, dict_t *options) GF_OPTION_RECONF ("trash-max-filesize", max_fsize, options, size_uint64, out); if (max_fsize) { - if (max_fsize > GF_ALLOWED_MAX_FILE_SIZE) { - gf_log (this->name, GF_LOG_DEBUG, - "Size specified for max-size(in MB) is too " - "large so using 1GB as max-size (NOT IDEAL)"); - priv->max_trash_file_size = GF_ALLOWED_MAX_FILE_SIZE; - } else - priv->max_trash_file_size = max_fsize; + priv->max_trash_file_size = max_fsize; gf_log (this->name, GF_LOG_DEBUG, "%"GF_PRI_SIZET" max-size", priv->max_trash_file_size); } @@ -2434,13 +2428,7 @@ init (xlator_t *this) GF_DEFAULT_MAX_FILE_SIZE / GF_UNIT_MB); priv->max_trash_file_size = GF_DEFAULT_MAX_FILE_SIZE; } else { - if( max_trash_file_size64 > GF_ALLOWED_MAX_FILE_SIZE ) { - gf_log (this->name, GF_LOG_DEBUG, - "Size specified for max-size(in MB) is too " - "large so using 1GB as max-size (NOT IDEAL)"); - priv->max_trash_file_size = GF_ALLOWED_MAX_FILE_SIZE; - } else - priv->max_trash_file_size = max_trash_file_size64; + priv->max_trash_file_size = max_trash_file_size64; gf_log (this->name, GF_LOG_DEBUG, "%"GF_PRI_SIZET" max-size", priv->max_trash_file_size); } |