From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DD98C63697 for ; Thu, 19 Nov 2020 14:18:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4673C22226 for ; Thu, 19 Nov 2020 14:18:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728000AbgKSOSb (ORCPT ); Thu, 19 Nov 2020 09:18:31 -0500 Received: from lilium.sigma-star.at ([109.75.188.150]:58086 "EHLO lilium.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727624AbgKSOS3 (ORCPT ); Thu, 19 Nov 2020 09:18:29 -0500 Received: from localhost (localhost [127.0.0.1]) by lilium.sigma-star.at (Postfix) with ESMTP id 898CF181C8900; Thu, 19 Nov 2020 15:18:26 +0100 (CET) Received: from lilium.sigma-star.at ([127.0.0.1]) by localhost (lilium.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 7yQ7veX_WR98; Thu, 19 Nov 2020 15:18:26 +0100 (CET) Received: from lilium.sigma-star.at ([127.0.0.1]) by localhost (lilium.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Dx73T873WR7e; Thu, 19 Nov 2020 15:18:26 +0100 (CET) From: Richard Weinberger To: miklos@szeredi.hu Cc: miquel.raynal@bootlin.com, vigneshr@ti.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Richard Weinberger Subject: [PATCH 1/5] fuse: Rename FUSE_DIO_CUSE Date: Thu, 19 Nov 2020 15:16:55 +0100 Message-Id: <20201119141659.26176-2-richard@nod.at> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201119141659.26176-1-richard@nod.at> References: <20201119141659.26176-1-richard@nod.at> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MUSE needs to use this flag too, rename it to FUSE_DIO_NOFS to denote that the DIO operation has no FUSE backed inode. Signed-off-by: Richard Weinberger --- fs/fuse/cuse.c | 4 ++-- fs/fuse/file.c | 4 ++-- fs/fuse/fuse_i.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c index 45082269e698..55744430b0f0 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c @@ -96,7 +96,7 @@ static ssize_t cuse_read_iter(struct kiocb *kiocb, stru= ct iov_iter *to) struct fuse_io_priv io =3D FUSE_IO_PRIV_SYNC(kiocb); loff_t pos =3D 0; =20 - return fuse_direct_io(&io, to, &pos, FUSE_DIO_CUSE); + return fuse_direct_io(&io, to, &pos, FUSE_DIO_NOFS); } =20 static ssize_t cuse_write_iter(struct kiocb *kiocb, struct iov_iter *fro= m) @@ -108,7 +108,7 @@ static ssize_t cuse_write_iter(struct kiocb *kiocb, s= truct iov_iter *from) * responsible for locking and sanity checks. */ return fuse_direct_io(&io, from, &pos, - FUSE_DIO_WRITE | FUSE_DIO_CUSE); + FUSE_DIO_WRITE | FUSE_DIO_NOFS); } =20 static int cuse_open(struct inode *inode, struct file *file) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index c03034e8c152..697e79032c73 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1409,7 +1409,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, str= uct iov_iter *iter, loff_t *ppos, int flags) { int write =3D flags & FUSE_DIO_WRITE; - int cuse =3D flags & FUSE_DIO_CUSE; + int nofs =3D flags & FUSE_DIO_NOFS; struct file *file =3D io->iocb->ki_filp; struct inode *inode =3D file->f_mapping->host; struct fuse_file *ff =3D file->private_data; @@ -1430,7 +1430,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, str= uct iov_iter *iter, return -ENOMEM; =20 ia->io =3D io; - if (!cuse && fuse_range_is_writeback(inode, idx_from, idx_to)) { + if (!nofs && fuse_range_is_writeback(inode, idx_from, idx_to)) { if (!write) inode_lock(inode); fuse_sync_writes(inode); diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index d51598017d13..637caddff2a8 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -1140,8 +1140,8 @@ int fuse_do_open(struct fuse_mount *fm, u64 nodeid,= struct file *file, /** If set, it is WRITE; otherwise - READ */ #define FUSE_DIO_WRITE (1 << 0) =20 -/** CUSE pass fuse_direct_io() a file which f_mapping->host is not from = FUSE */ -#define FUSE_DIO_CUSE (1 << 1) +/** CUSE and MUSE pass fuse_direct_io() a file which f_mapping->host is = not from FUSE */ +#define FUSE_DIO_NOFS (1 << 1) =20 ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, loff_t *ppos, int flags); --=20 2.26.2