From patchwork Wed Jul 19 15:17:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Van Hensbergen X-Patchwork-Id: 12286 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2523172vqt; Wed, 19 Jul 2023 08:37:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlHPVaWLc/f8E6d7t/owHKyFFs8WQC+0UWqBJitfE8Zf+exvVplEHqQmgia91GbaC6evOHQm X-Received: by 2002:a05:6a21:6da8:b0:135:2eb2:14be with SMTP id wl40-20020a056a216da800b001352eb214bemr3054100pzb.58.1689781056018; Wed, 19 Jul 2023 08:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689781056; cv=none; d=google.com; s=arc-20160816; b=qgSje/b+PL8x9XJ5E8Ws6MAGgAIPpYnoz2dy2mgSpviaTB6U93bJmXjfjg5DCk5q69 tZKwGP1SZFlJ1qy2ujLk/POq6yr3y5lqd93EdWgTM4E5q5vHL+1u03fdajlg9L0ylmXm 5p1qT+t7mhHwHIB8Q2mWS+udzSejP+gdS6KJ5F6l6ZzWxJKlnRnsaEkyFCG5bSJdxSya c7I6fJRp6zQKHeit9X9+omwClEim9U8O8xmCCNdJsXqTQaXRAEE9cUV9ZdWDpzCfayKP vpZxOL2HATykjCPe/1OnI0EmfeJ2/rspZJhBRz3bBQyiz+o5GujxQc1NzR3msiA8nE2H bdmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=GAMelq/wpa83+OFaL5Ka4D83J6GhVfhtV253Nc27AyM=; fh=deCyYo6QkFncNtSlW+COYKWV+QHrPm0qFhnqufnpqmk=; b=H19L9Pn50bNNcq8+esCvW11cSNMAkjF/G9qmAqGqe5P6zbHLMZ2qDjvgxztTr6UFXy kZHQfc9TNGF/8Jlcg5vVdWuJiOaQaxws663YEZQ6UUaPyRbVVkfmMA/HEuFoRJA5VFri BTXArPHxmjLU1HbjLRu8WeFSX9DAznfPKr+jwdCrTlTpWRnvy3QJR9qRlZ60oBQosPTF iY+h94Apb0PaHkcBSDgTLdG2UHi+fehz5q+jda3Y4UOfz2uhwd9sFaZiyyALwAdz/fvv Vc82v4u3liW8YiDILgC8+nH6OKOO2ho1lADtGBPTY8hux+XEj64VAi6ctJ4Cm5mCvEi9 hPhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PlfNTQDW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f13-20020a63f10d000000b00541710a9d44si3650390pgi.114.2023.07.19.08.37.22; Wed, 19 Jul 2023 08:37:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PlfNTQDW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231327AbjGSPRY (ORCPT + 99 others); Wed, 19 Jul 2023 11:17:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbjGSPRW (ORCPT ); Wed, 19 Jul 2023 11:17:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96D0CC1; Wed, 19 Jul 2023 08:17:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1900B6173E; Wed, 19 Jul 2023 15:17:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DD20C433C7; Wed, 19 Jul 2023 15:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689779840; bh=ysLR5wobitKPf8JrxKamS+gYhvSQgQK2wwYl0cnu1PE=; h=From:Subject:Date:To:Cc:From; b=PlfNTQDW0Gmv1RaV4rPthVL3t4AOzNBSe2PJ0jVSvxy0kjIwITjPjKKJouIh1KU/e 9PfAGONXixqLgNcte3cw1giWGhzXYiuaK00okYWrYxum7nPVSHltp4Dgu+y71HT0Wl 480g1FRkkdVzHe2enOVkrtl9XXqfoDpMHZwLE7GYWAPtymS+hZ4Mc4vTUmNBXYeIhx TAwGqSwPljSqps0B3sl1hkiQWxS0/oAs99M30vQxitiXf3qK/FoIagDIQUofb6DMuL n+z7jOIDfKV2Bz3Z0Bs6EtXC2/1XRMXDeKIQpfj9fSKI6NcphUpPlEQZTsn13RoK42 H64ate9P+8CRw== From: Eric Van Hensbergen Subject: [PATCH v3 0/4] fs/9p: fix mmap regression Date: Wed, 19 Jul 2023 15:17:04 +0000 Message-Id: <20230716-fixes-overly-restrictive-mmap-v3-0-769791f474fd@kernel.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAHD+t2QC/5XOzQ6CMAwH8FcxO1vdh4J48j2MhwFFFmUjHVkgh He3cPOmhx7+bfNrZxGRHEZx3c2CMLnogudg9jtRtdY/EVzNWWipjcxVBo0bMUJISO8JCONArhp cQug624ORVpuzVJhfcsFGaSNCSdZX7arwrSq1xyYQeByHdaMn3Ege3x+cWxeHQNP2UFJr99fbS YEEmV1MqbkKo28vJI/vQ6CnWOmk/+I0c+qU1xlbTVYUX9yyLB8YSRoFPAEAAA== To: Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck Cc: v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, kernel@pengutronix.de, stable@vger.kernel.org, Robert Schwebel , Eric Van Hensbergen X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1438; i=ericvh@kernel.org; h=from:subject:message-id; bh=ysLR5wobitKPf8JrxKamS+gYhvSQgQK2wwYl0cnu1PE=; b=owEBbQKS/ZANAwAKAYj/1ftKX/+YAcsmYgBkt/5+El6+7oA1ENNSlafzPFG0wmMLyaf10zHKO KWsRc4dp4eJAjMEAAEKAB0WIQSWlvDRlqWQmKTK0VGI/9X7Sl//mAUCZLf+fgAKCRCI/9X7Sl// mO6xEACdcMUN6ZONVl6MaUH4zg1r7hs4oqp5fDM3fn8ui/ETaXv0yxqXw+83ZrrnnXSrBps8ZgR 1IfxSsVTKB9A99KTDMxmH05ONKLIQ15qKzBlU7EZV5H2dbr56ddxluJB8SyQbCFPbHHQWR1vAel rcj3wNMDwlc1+fp5KQ4q1w+guaAy9XttjbL1gmS57n+GHWKwHXrxJZO5HiKd/oZHNxq+AlkA21J xuQGN95iYlsCTSA0mD2e1kpdRapz5sQyjvV0E4SGSlcGoxWTon5fecCze0N7addPooP3k+B+xJL eYPXKXecjvUfMcTtJhyyBiCypXzIBKLvECpn6ZpINTY+iaQv6Ug56m7qtpJlTy0vvIyh4+MAPLo lsrpsOSvE3M/VDeYu47prGkPzao1l2ntCWtFByH36KVtfP1cBgd11HphNccsa7qhyxz7H8Dcv+V GaXMwlTDp5KUGCuL7NZ0LOa2xW0p4KmPF2qhIG94K+9+g7RbfMzkNgHqN+BsQRMH2e6tXNrWcPN yt71qf/Sfu4jcURrM+R+NdqzF/9q7j0HkHSgJLn/2gB2A+qg7cC/hXZe8iv90g8EvWC10zCchKh A1laxFV0o0iO2e3Dfn9v6CGCJyv82Jvvmo6GQfgNLS15jk7jJ8tUj5hvZuPCvhUE2yAgC3e8F77 HMR7H6s7Bpwim3w== X-Developer-Key: i=ericvh@kernel.org; a=openpgp; fpr=9696F0D196A59098A4CAD15188FFD5FB4A5FFF98 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771863860791613573 X-GMAIL-MSGID: 1771863860791613573 This series attempts to fix a reported exception with mmap on newer kernels. Fixes: 1543b4c5071c ("fs/9p: remove writeback fid and fix per-file modes") Link: https://lore.kernel.org/v9fs/ZK25XZ%2BGpR3KHIB%2F@pengutronix.de/ Reported-by: Robert Schwebel Signed-off-by: Eric Van Hensbergen Tested-by: Robert Schwebel --- Changes in v3: - Clarify debug print to read-only mmap mode versus no mmap mode in v9fs_file_mmap - Fix suggested regression tags and propagate across series - Link to v2: https://lore.kernel.org/r/20230716-fixes-overly-restrictive-mmap-v2-0-147d6b93f699@kernel.org Changes in v2: - fix requested changes in commit messages - add patch to remove unnecessary invalidate_inode_pages in mmap readonly path - Link to v1: https://lore.kernel.org/r/20230716-fixes-overly-restrictive-mmap-v1-0-0683b283b932@kernel.org --- Eric Van Hensbergen (4): fs/9p: remove unnecessary and overrestrictive check fs/9p: fix typo in comparison logic for cache mode fs/9p: fix type mismatch in file cache mode helper fs/9p: remove unnecessary invalidate_inode_pages2 fs/9p/fid.h | 6 +++--- fs/9p/vfs_file.c | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) --- base-commit: 95f41d87810083d8b3dedcce46a4e356cf4a9673 change-id: 20230716-fixes-overly-restrictive-mmap-30a23501e787 Best regards,