From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa6.hgst.iphmx.com ([216.71.154.45]:62740 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbeKSOOP (ORCPT ); Mon, 19 Nov 2018 09:14:15 -0500 From: Damien Le Moal To: linux-block@vger.kernel.org, Jens Axboe Cc: Adam Manzanares , Alexander Viro , linux-fsdevel@vger.kernel.org Subject: [PATCH 3/7] block: Fix get_task_ioprio() default return value Date: Mon, 19 Nov 2018 12:51:27 +0900 Message-Id: <20181119035131.11255-4-damien.lemoal@wdc.com> In-Reply-To: <20181119035131.11255-1-damien.lemoal@wdc.com> References: <20181119035131.11255-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: As explained in ioprio_get() and ionice man pages, the default I/O priority class for processes which have not set an I/O priority using ioprio_set() is IOPRIO_CLASS_BE and not IOPRIO_CLASS_NONE. Signed-off-by: Damien Le Moal --- block/ioprio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/ioprio.c b/block/ioprio.c index f9821080c92c..ea5be206eb26 100644 --- a/block/ioprio.c +++ b/block/ioprio.c @@ -163,7 +163,7 @@ static int get_task_ioprio(struct task_struct *p) ret = security_task_getioprio(p); if (ret) goto out; - ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM); + ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM); task_lock(p); if (p->io_context) ret = p->io_context->ioprio; -- 2.19.1