performance/open-behind: don't use anonymous fds for reads by default

anonymous fds interfere with working of read-ahead as read-ahead won't
be able to store its cache in fd. Also, as seen in bz 1455872,
anonymous fds also affect performance of large file sequential reads
as the cost of opening fd for each read on brick stack is
significant. So, have a proper fd which enables read-ahead to store
its cache and brick stack to reuse the fd during reads.

With this change test
tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access.t
fails consistently. The failure can also be seen with open-behind
off. bz 1611532 has been filed to track the issue with test. Thanks to
Rafi <rkavunga@redhat.com> for assistance provided in debugging test
failure.

Change-Id: Ifa52d8ff017f115e83247f3396b9d27f0295ce3f
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Fixes: bz#1455872
This commit is contained in:
Raghavendra G 2018-07-14 18:17:47 +05:30
parent 47cbe34db6
commit 74b63639e8
2 changed files with 3 additions and 1 deletions

View File

@ -199,3 +199,5 @@ TEST $CLI snapshot delete all
cleanup;
#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000

View File

@ -1096,7 +1096,7 @@ struct volume_options options[] = {
},
{ .key = {"read-after-open"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "no",
.default_value = "yes",
.description = "read is sent only after actual open happens and real "
"fd is obtained, instead of doing on anonymous fd (similar to write)",
.op_version = {3},