summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2019-02-20 15:52:55 +0530
committerSusant Palai <spalai@redhat.com>2019-03-06 03:16:53 +0000
commit8444c1ea54936732764c12aee075af8b6d952975 (patch)
tree729ae55cfc683855ea9e029a1fd17f1b5d64d11e
parentea78c029a769e09fe2c9408f8b29b55f47141606 (diff)
io-threads: Prioritize fops with NO_ROOT_SQUASH pid
There was 30% regression observed in mkdir path with commit b139bc58eb504adf5ef81658896c9283ae21f390. On analysis it is found that io-threads xlator deprioritzes fops with all -ve pid. Some context in to the no-root-squash pid requirement: DHT xlator does some of the internal fops with root privileges. This is needed so that operations like layout healing should not be abandoned because a non root user is operating. If root-squash option is enabled the layout set operation looses its root privilege as server xlator converts the uid and pid to random numbers. Hence, the above mentioned commit converted pid to GF_CLIENT_PID_NO_ROOT_SQUASH to continue fops as root. Combining the above I am proposing not to deprioritize fops with no-root-squash pid. > Change-Id: I54d056c01b25729304a77f9242fbaff39c5672ba > fixes: bz#1676430 > Signed-off-by: Susant Palai <spalai@redhat.com> (cherry picked from commit f5c3b1727f55ffaa3dcdb3c3a09b968ebb45dbb2) Change-Id: I54d056c01b25729304a77f9242fbaff39c5672ba fixes: bz#1676429 Signed-off-by: Susant Palai <spalai@redhat.com>
-rw-r--r--xlators/performance/io-threads/src/io-threads.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index bf75015eda8..060d9234cd7 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -294,7 +294,9 @@ iot_schedule(call_frame_t *frame, xlator_t *this, call_stub_t *stub)
gf_fop_pri_t pri = GF_FOP_PRI_MAX - 1;
iot_conf_t *conf = this->private;
- if ((frame->root->pid < GF_CLIENT_PID_MAX) && conf->least_priority) {
+ if ((frame->root->pid < GF_CLIENT_PID_MAX) &&
+ (frame->root->pid != GF_CLIENT_PID_NO_ROOT_SQUASH) &&
+ conf->least_priority) {
pri = GF_FOP_PRI_LEAST;
goto out;
}