feature/posix: Enabled gfid2path by default
Enable gfid2path feature by default. The basic performance tests are carried out and it doesn't show significant depreciation. The results are updated in issue. Updates: #139 Change-Id: I5f1949a608d0827018ef9d548d5d69f3bb7744fd Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: https://review.gluster.org/17950 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
This commit is contained in:
parent
ea8c9af0b4
commit
3ec63650bb
@ -8,7 +8,7 @@
|
||||
cleanup;
|
||||
|
||||
function get_gfid_count {
|
||||
getfattr -d -m. -e hex $B0/brick{0,1,2,3,4,5}/$1 2>&1 | grep trusted.gfid | wc -l
|
||||
getfattr -d -m. -e hex $B0/brick{0,1,2,3,4,5}/$1 2>&1 | grep trusted.gfid | grep -v gfid2path | wc -l
|
||||
}
|
||||
|
||||
TEST glusterd
|
||||
|
@ -26,7 +26,7 @@ function get_gfid()
|
||||
{
|
||||
path_of_file=$1
|
||||
|
||||
gfid_value=`getfattr -d -m . $path_of_file -e hex 2>/dev/null | grep trusted.gfid | cut --complement -c -15 | sed 's/\([a-f0-9]\{8\}\)\([a-f0-9]\{4\}\)\([a-f0-9]\{4\}\)\([a-f0-9]\{4\}\)/\1-\2-\3-\4-/'`
|
||||
gfid_value=`getfattr -d -m . $path_of_file -e hex 2>/dev/null | grep trusted.gfid | grep -v gfid2path | cut --complement -c -15 | sed 's/\([a-f0-9]\{8\}\)\([a-f0-9]\{4\}\)\([a-f0-9]\{4\}\)\([a-f0-9]\{4\}\)/\1-\2-\3-\4-/'`
|
||||
|
||||
echo $gfid_value
|
||||
}
|
||||
|
@ -21,9 +21,6 @@ EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0
|
||||
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
|
||||
TEST $GFS --volfile-id=$V0 --volfile-server=$H0 $M0;
|
||||
|
||||
## enable gfid2path
|
||||
TEST $CLI volume set $V0 gfid2path enable
|
||||
|
||||
## Mount the volume
|
||||
TEST $GFS --volfile-server=$H0 --volfile-id=$V0 $M0;
|
||||
|
||||
|
@ -20,9 +20,6 @@ EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" glustershd_up_status
|
||||
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0
|
||||
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
|
||||
|
||||
## enable gfid2path
|
||||
TEST $CLI volume set $V0 gfid2path enable
|
||||
|
||||
## Mount the volume
|
||||
TEST $GFS --volfile-server=$H0 --aux-gfid-mount --volfile-id=$V0 $M0;
|
||||
|
||||
|
@ -30,6 +30,9 @@ EXPECT 'Started' volinfo_field $V0 'Status';
|
||||
## Mount the volume
|
||||
TEST $GFS --volfile-server=$H0 --volfile-id=$V0 $M0;
|
||||
|
||||
## disable gfid2path
|
||||
TEST $CLI volume set $V0 gfid2path disable
|
||||
|
||||
pgfid="00000000-0000-0000-0000-000000000001"
|
||||
xxh64_file=$B0/${V0}1/xxh64_file
|
||||
|
||||
|
@ -28,9 +28,6 @@ TEST $CLI volume set $V0 nfs.disable false
|
||||
TEST $CLI volume start $V0;
|
||||
EXPECT 'Started' volinfo_field $V0 'Status';
|
||||
|
||||
## enable gfid2path
|
||||
TEST $CLI volume set $V0 gfid2path enable
|
||||
|
||||
## Wait for volume to register with rpc.mountd
|
||||
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT "1" is_nfs_export_available
|
||||
|
||||
|
@ -2792,6 +2792,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
|
||||
},
|
||||
{ .option = "gfid2path",
|
||||
.key = "storage.gfid2path",
|
||||
.type = NO_DOC,
|
||||
.voltype = "storage/posix",
|
||||
.op_version = GD_OP_VERSION_3_12_0,
|
||||
},
|
||||
|
@ -7663,18 +7663,6 @@ init (xlator_t *this)
|
||||
" set.");
|
||||
}
|
||||
|
||||
tmp_data = dict_get (this->options, "gfid2path");
|
||||
if (tmp_data) {
|
||||
if (gf_string2boolean (tmp_data->data,
|
||||
&_private->gfid2path) == -1) {
|
||||
ret = -1;
|
||||
gf_msg (this->name, GF_LOG_ERROR, 0,
|
||||
P_MSG_INVALID_OPTION, "wrong value provided "
|
||||
"for 'gfid2path'");
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
ret = dict_get_str (this->options, "glusterd-uuid", &guuid);
|
||||
if (!ret) {
|
||||
if (gf_uuid_parse (guuid, _private->glusterd_uuid))
|
||||
@ -7841,6 +7829,8 @@ init (xlator_t *this)
|
||||
goto out;
|
||||
}
|
||||
|
||||
GF_OPTION_INIT ("gfid2path", _private->gfid2path, bool, out);
|
||||
|
||||
GF_OPTION_INIT ("gfid2path-separator", gfid2path_sep, str, out);
|
||||
if (set_gfid2path_separator (_private, gfid2path_sep) != 0) {
|
||||
gf_msg (this->name, GF_LOG_ERROR, 0, P_MSG_INVALID_ARGUMENT,
|
||||
@ -8045,7 +8035,7 @@ struct volume_options options[] = {
|
||||
},
|
||||
{ .key = {"gfid2path"},
|
||||
.type = GF_OPTION_TYPE_BOOL,
|
||||
.default_value = "off",
|
||||
.default_value = "on",
|
||||
.description = "Enable logging metadata for gfid to path conversion"
|
||||
},
|
||||
{ .key = {"gfid2path-separator"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user