From patchwork Mon Aug 26 17:06:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kanchan Joshi X-Patchwork-Id: 13778258 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (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 8CA6E198A2F for ; Mon, 26 Aug 2024 17:14:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724692465; cv=none; b=tztRVe03Pchq9IsA+S1BsGzbHUrSQl6UADHlRbo8Nb/s7jIZsddVd8f/JUypCBF0a4NPT4PJ8lAJcoDDT7N9C1wYawZGn4FvRBlrAolg7XYsk0LHkcXZRJSdKHWBIpftBW33J5JC11r/9C5t28aSLGmaaSGOEd+hawVSsObBsdw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724692465; c=relaxed/simple; bh=Qs+0/eghBwmI0+lDjMQ599piAQB0g7zovPudUM+h4To=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=HCzA2OA9PVLHsncrf3UeweNGLsnqJd+aoMeE3k5+wrsQ72SwWfzYgEgBOKpJabf7DKx0HMbdxFaOiI3xbny7tFb6XNLueblApLKk+GBxanBSb7k6Rv5kv/u6a2oG0O+PQ+OOdfd+hZpDbyj9gdzOkB3i9vyQHOkq0ma01to0xWw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=WFfY1jcw; arc=none smtp.client-ip=203.254.224.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="WFfY1jcw" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20240826171420epoutp023554a78016e58a2fd9ac48a59aacf99c~vVqe9ecLd2048020480epoutp02v for ; Mon, 26 Aug 2024 17:14:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20240826171420epoutp023554a78016e58a2fd9ac48a59aacf99c~vVqe9ecLd2048020480epoutp02v DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1724692460; bh=dvmnXluL763m/k/i9q5rrEgvQ+XYswDEKR5fFJwq0zY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WFfY1jcwoJQ7QQ43GdoomZSnARi7RvDtwJOeywCslMObHyPHu/+S7VeWrF4zzNEKN zB6FNbCioR14iuWC+EXawfBAf97MIuUSdlftEMo2Mc0r6UBrkhMcC6npg3RokJbnsB f5+Rr5WaasQVzwCfYYfMzq9tJuLp2atyTlSPskp0= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20240826171419epcas5p23cc7ff5eeadbd876a1ae23a70d292612~vVqeOcWQv0605906059epcas5p2q; Mon, 26 Aug 2024 17:14:19 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.178]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4Wsy2f1scRz4x9Pt; Mon, 26 Aug 2024 17:14:18 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 09.67.19863.AE7BCC66; Tue, 27 Aug 2024 02:14:18 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20240826171417epcas5p1c6dbe318c43324116647dae2129b7eb3~vVqcNuU9j0392603926epcas5p1p; Mon, 26 Aug 2024 17:14:17 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240826171417epsmtrp2d498a352e437e2c14cc2c22ecf314eff~vVqcMys6o3048030480epsmtrp2i; Mon, 26 Aug 2024 17:14:17 +0000 (GMT) X-AuditID: b6c32a50-ef5fe70000004d97-80-66ccb7ea69f1 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 5C.3E.08964.9E7BCC66; Tue, 27 Aug 2024 02:14:17 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240826171413epsmtip2407f4dc023aef06fcca161d1f824ce43~vVqYlY3Pe0834608346epsmtip2O; Mon, 26 Aug 2024 17:14:13 +0000 (GMT) From: Kanchan Joshi To: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, brauner@kernel.org, jack@suse.cz, jaegeuk@kernel.org, jlayton@kernel.org, chuck.lever@oracle.com, bvanassche@acm.org Cc: linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, gost.dev@samsung.com, vishak.g@samsung.com, javier.gonz@samsung.com, Kanchan Joshi Subject: [PATCH v4 2/5] fcntl: rename rw_hint_* to rw_life_hint_* Date: Mon, 26 Aug 2024 22:36:03 +0530 Message-Id: <20240826170606.255718-3-joshi.k@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240826170606.255718-1-joshi.k@samsung.com> Precedence: bulk X-Mailing-List: linux-scsi@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7xF70pQgLpiSWp2ampBalFMFkmDk6pBqaI361bzdYefGvotaUs0pcxS1Zz X6zrROkJOuGZtVszXeapXojrEYj2upp1teTdynKVzLKYa3o/lrAcedEWaHdJ/HLAJ59nXCmz xTYZP3345lLWgsVzXp8Snez4WvDx72/vtjTfEJPT+bdoZ+rjhwwrg/fM85hv90L0cs2NT34K pfq8em++RTv+vs8Z7H45UtnC6cPnXi+2dqfP2iekMu0X2/dfzUxq2CvvMCVLeT1HtNXVlze4 AiSyF4i6/NucvXyB5Ro5Y5EZ0tOVXL0X+rlG2h6eF2djdiDoRmLDvqrKdfucV6bu9FW7fKp6 +dPqHpGia0t+W374HKJ1w2ndooVXRc/fPpe9/E+seVRvpLsSS3FGoqEWc1FxIgAB0w2bOwMA AA== X-CMS-MailID: 20240826171417epcas5p1c6dbe318c43324116647dae2129b7eb3 X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240826171417epcas5p1c6dbe318c43324116647dae2129b7eb3 References: <20240826170606.255718-1-joshi.k@samsung.com> F_GET/SET_RW_HINT fcntl handlers query/set write life hints. Rename the handlers/helpers to be explicit that write life hints are being handled. This is in preparation to introduce a new interface that supports more than one type of write hint. Signed-off-by: Kanchan Joshi --- fs/fcntl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/fcntl.c b/fs/fcntl.c index 300e5d9ad913..46cf08f67278 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -269,7 +269,7 @@ static int f_getowner_uids(struct file *filp, unsigned long arg) } #endif -static bool rw_hint_valid(u64 hint) +static bool rw_life_hint_valid(u64 hint) { BUILD_BUG_ON(WRITE_LIFE_NOT_SET != RWH_WRITE_LIFE_NOT_SET); BUILD_BUG_ON(WRITE_LIFE_NONE != RWH_WRITE_LIFE_NONE); @@ -291,7 +291,7 @@ static bool rw_hint_valid(u64 hint) } } -static long fcntl_get_rw_hint(struct file *file, unsigned int cmd, +static long fcntl_get_rw_life_hint(struct file *file, unsigned int cmd, unsigned long arg) { struct inode *inode = file_inode(file); @@ -303,7 +303,7 @@ static long fcntl_get_rw_hint(struct file *file, unsigned int cmd, return 0; } -static long fcntl_set_rw_hint(struct file *file, unsigned int cmd, +static long fcntl_set_rw_life_hint(struct file *file, unsigned int cmd, unsigned long arg) { struct inode *inode = file_inode(file); @@ -312,7 +312,7 @@ static long fcntl_set_rw_hint(struct file *file, unsigned int cmd, if (copy_from_user(&hint, argp, sizeof(hint))) return -EFAULT; - if (!rw_hint_valid(hint)) + if (!rw_life_hint_valid(hint)) return -EINVAL; WRITE_ONCE(inode->i_write_hint, hint); @@ -449,10 +449,10 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, err = memfd_fcntl(filp, cmd, argi); break; case F_GET_RW_HINT: - err = fcntl_get_rw_hint(filp, cmd, arg); + err = fcntl_get_rw_life_hint(filp, cmd, arg); break; case F_SET_RW_HINT: - err = fcntl_set_rw_hint(filp, cmd, arg); + err = fcntl_set_rw_life_hint(filp, cmd, arg); break; default: break;