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: 13778240 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BCDFC5472D for ; Mon, 26 Aug 2024 17:14:39 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sidId-00052A-16; Mon, 26 Aug 2024 17:14:39 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sidIb-00051y-FO for linux-f2fs-devel@lists.sourceforge.net; Mon, 26 Aug 2024 17:14:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:Content-Type:Content-Transfer-Encoding: MIME-Version:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dvmnXluL763m/k/i9q5rrEgvQ+XYswDEKR5fFJwq0zY=; b=fx/mZS3TaRTXoWI4skzQfCcn6j OiRP9U7N1N4wMFoQD+7vHyGj5toMVKMzJZo1JdUc5CrL6oMoSfxvJhekAaAQ6ShQ5cOS/buhkxfd+ lGpoCIolr7fTC7As6oIGAG2mCRpj8Yz2EgD4+OGK4YBuF2961ygVHVI2ikpvZKfyiF/A=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:Content-Type:Content-Transfer-Encoding:MIME-Version: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dvmnXluL763m/k/i9q5rrEgvQ+XYswDEKR5fFJwq0zY=; b=CyyZABnJSBe+s9gEE8e+m5e7xl ksqtEDVJsDCLRVadtsYsV+V6NiQ7hX0EhcSjqn2H9A5dl6aOOeiV0X5KXRTr875aEY6cI3D9Z2J/f PTo+QENZ1n+kbaAJhmvSrdwXCqeDbTKdB5dAVCPc6xRr86cJxuJHf+tvRKaTh7Z8QGr8=; Received: from mailout1.samsung.com ([203.254.224.24]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1sidIW-0005IV-S7 for linux-f2fs-devel@lists.sourceforge.net; Mon, 26 Aug 2024 17:14:33 +0000 Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240826171420epoutp010997112718283edb68ccfad6b390d29b~vVqe27meG0148601486epoutp01v for ; Mon, 26 Aug 2024 17:14:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240826171420epoutp010997112718283edb68ccfad6b390d29b~vVqe27meG0148601486epoutp01v 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 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> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA01Te0xTVxjfubfcFmPNHS9PukzwRk2AgXSWejCUjUHmTWBJo4uZ4gKFXgqh tLWPbSK6GpxxRWBW8IFusNkVLZFnN1AsMBgqhMVN2HiMlwxkg2F5SnAIa2nd/O/3/b7f933n 951zOLjXnwSPk67QMmqFRE4RG1jftwYGhUzWdaaGzS6zUflgAYGmWucAujCzjKO1wQkM9TXf wtCN8jYMXbmYg6GxymIcVRdw0B8D82y0bLawUdvaNIGMLb8BZOsPRg+/2Yvu2NpZqMQ8zka5 PfUEKru3iqGKKTsLPSi+yn7bl+7qjqMfDFWz6AvGDoLu+klH11g+J+ha06d0Q+k8Rjf06Ql6 dryfRedbLYDuLP2RTc/XbBFvPJQRmcZIpIw6gFGkKKXpCpmIitufGJMYLgzjh/Aj0G4qQCHJ ZERUbLw45N10ucMpFfCRRK5zUGKJRkPtjIpUK3VaJiBNqdGKKEYllasEqlCNJFOjU8hCFYx2 Dz8s7M1whzApI+3W7R/YqifkJ/3TvYQedHMNwJMDSQGsHjYAA9jA8SLvANjzuJFwBXMArpqL 2K7gKYALPSXEi5LFbquHK2ED8Jepk27VPID9dT2ODIdDkIHw5/M6J+9D5mCw+uaz9b44acTg 7MhNwinyJqNhlUno7Moit8NnV+0sJ+aSEdCWOwdc0/zh5YdLbCf2JPfAtRk726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DREXl2i+9oMdwhaWWPnvOTtEzUdGiedf+bsYOTjYBDQlLkwu7WLk4hARmMwk0fRwCwuIwyww h0lieed2ZpAiYQFHiQ1LzEB6WQRUJX7Nec8CYvMKWErs7f7ECDFfXmLmpe9g8zkFrCT+f3gP tctSYuWZ5ewQ9YISJ2c+AetlBqpv3jqbeQKjwCwkqVlIUgsYmVYxSqYWFOem5xYbFhjmpZbr FSfmFpfmpesl5+duYgRHppbmDsbtqz7oHWJk4mA8xCjBwawkwit3+WSaEG9KYmVValF+fFFp TmrxIUZpDhYlcV7xF70pQgLpiSWp2ampBalFMFkmDk6pBqaI361bzdYefGvotaUs0pcxS1Zz 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> X-Headers-End: 1sidIW-0005IV-S7 Subject: [f2fs-dev] [PATCH v4 2/5] fcntl: rename rw_hint_* to rw_life_hint_* X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vishak.g@samsung.com, linux-scsi@vger.kernel.org, gost.dev@samsung.com, linux-nvme@lists.infradead.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, javier.gonz@samsung.com Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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;