Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp782690lqj; Sun, 2 Jun 2024 23:44:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWWx0iQBm4iFQlLdgNFYI2+29YhQC+FgrIrSABcLozf5BIQqqOHOBaC0UUdlur1aWNTXPfFOwWX35jcMFRx1X9G9/PUHo5uYCHEwTBRNw== X-Google-Smtp-Source: AGHT+IG33jSInEDTkIPPRfK0rZCDYywhP8bdFwX0/sK5E19qIy6unRWM4+9taLsAmPYQZKGq7rpf X-Received: by 2002:a05:6a20:9151:b0:1b0:2b96:5f9 with SMTP id adf61e73a8af0-1b26f16e4eemr9235968637.36.1717397093061; Sun, 02 Jun 2024 23:44:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717397093; cv=pass; d=google.com; s=arc-20160816; b=wEnMQtEq4cndsajORZm2xbHstDbULePUSr53XtHT1MKipn/eZGDQo/lc8jrXa49LKZ ROBovFm/F9fVfERq2Nix/pNSiPHWDQEkys0O9mRPQgW6ypu+/eqswKNt49Z160PFMfYd eAzsgeP5LxbYkkzvcnTd00I9M0164o0/kFmU+dZjv3/4GjSquu/L8g7S9S4E+UIW4t38 kPkTeErALv/MJgRC85in7QdQnHSE1F8FVVDSjUaNhyhUzkNROtkoAmhXcFi/EeyhYrHU O2PjmrnY4J//QBz9Qujrifz85ehDM9NH76e5s/CFaPm8M8Myo5ZOxDcE+YGK17f2U209 I5MA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=lPAaNlTMlGF5/Ju3NJ7bELN7ekax56notjSCE0gM0Ts=; fh=zQ4KyqolXqQO+yNFGVuXxCeSvQq3rubOak+k9IB2PKU=; b=lV9wZO+aALV+Qf16UfvMgunEGdGr1T3b8fQXI0qX1aCNgOtlxojAAqgK6nSFBXA7rQ SvPm5zKEQI6SdSnPusl6gvJTa/EdNwuf9rGXYGq+7qzu4axoHS/767CifAy2TzcpvpDN cNGnY6mDZs71xys/3HrSirlG4TXVdIedQ7IjKFd+0UrQWBTIyRILD5y65v6wfd4oDcew 65Gqna+O6B60UuDDaGM+Aq4ZesaQ1K+niGcaN7VI891uuiN4eXbhPMvoyu7Ub+LC+uVx yNBTnAzmNl1MRYleuqsOF6N8ItIRkMYhEUKBYuLzC2oS45IuE4lTErEz4V5v+RM3myOi mBzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F6Wjim7A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198661-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a77b71aesi7973532a91.94.2024.06.02.23.44.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 23:44:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F6Wjim7A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198661-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DCD4DB226CF for ; Mon, 3 Jun 2024 06:42:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 727E77D3E6; Mon, 3 Jun 2024 06:39:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F6Wjim7A" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94B5F364A0 for ; Mon, 3 Jun 2024 06:39:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717396797; cv=none; b=DNQzrArbLj0UDHpXnbBdWZgeVvv5jYobm/7m9oddYvsKzCENIrciT8Zo4vTMOmTnlMxJWntXGS7coSgoQj1ckAHUoa2+L5TjXZgLJtpA1w4uVUSyHGW+6cPSJsVmlEp9NkfdH7jQtcWMafTuRUf76ZXxrlDzXVw9N/t0CP9r0gU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717396797; c=relaxed/simple; bh=yMVHDPZTk2KiIA4M5duiDTFOwyQCPZJ4+zZKOyjLkCQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cT4zevaL+Fd9yGmVByEk4W3YHflun7J164NvdDF+7yHU3lVfPpHFL/9gzLFQrm7fESJI5Jf2WaDtfWdJiK53TzWIKalJOPquntdW8DnxpWgE76X55wcwZPr7AOoe2D03FX/nQe4xhscmYz/n9E3vfNNknZ5nyXIrWKByOxe90x8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F6Wjim7A; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A936DC2BD10; Mon, 3 Jun 2024 06:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717396797; bh=yMVHDPZTk2KiIA4M5duiDTFOwyQCPZJ4+zZKOyjLkCQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=F6Wjim7ABkZMuZmkWslsUYfIjuqeMGoOQ5VHlSs7N4rpNsgE09DypCXPvJb51g3kt UoBg/grrCvrX7PT5SkbG/8O50M9pL0eIRFfrGY8TKPkeVduPouTL4t2a+AcI+mj7+Y +cgwyWZKKEaE3Njox0+uxrz5kIMd+r/AnF/n3bWnZE2feQquAY7bTxaZPTJ45uTYGS +c9YAe77T8hz9SvEtxtuv5ibtGbk+f8yIYJVSbPzh20nsi7XOeTScdv+xFA34iz/2Y 3mPkXf++5nxkgtDbHzvjuxAMetR3bQ4cqdhOfnF3T1vrdHM7IUz0u7jM8lsqsfI3Sb Mj5y4ewYMOIVg== Message-ID: Date: Mon, 3 Jun 2024 14:39:53 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] f2fs: use new ioprio Macro to get ckpt thread ioprio data To: Zhiguo Niu , jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, niuzhiguo84@gmail.com, ke.wang@unisoc.com References: <1717146645-18829-1-git-send-email-zhiguo.niu@unisoc.com> Content-Language: en-US From: Chao Yu In-Reply-To: <1717146645-18829-1-git-send-email-zhiguo.niu@unisoc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/5/31 17:10, Zhiguo Niu wrote: > Use new Macro IOPRIO_PRIO_LEVEL to get ckpt thread ioprio data(level), > it is more accurate and consisten with the way setting ckpt thread > ioprio(IOPRIO_PRIO_VALUE(class, data)). > > Signed-off-by: Zhiguo Niu > --- > fs/f2fs/sysfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c > index 72676c5..55d46da 100644 > --- a/fs/f2fs/sysfs.c > +++ b/fs/f2fs/sysfs.c > @@ -340,7 +340,7 @@ static ssize_t f2fs_sbi_show(struct f2fs_attr *a, > if (!strcmp(a->attr.name, "ckpt_thread_ioprio")) { > struct ckpt_req_control *cprc = &sbi->cprc_info; > int class = IOPRIO_PRIO_CLASS(cprc->ckpt_thread_ioprio); > - int data = IOPRIO_PRIO_DATA(cprc->ckpt_thread_ioprio); > + int data = IOPRIO_PRIO_LEVEL(cprc->ckpt_thread_ioprio); So, can you please use 'level' to instead 'data' in f2fs_sbi_show() and __sbi_store()? Thanks, > > if (class != IOPRIO_CLASS_RT && class != IOPRIO_CLASS_BE) > return -EINVAL;