Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp702582lqs; Fri, 14 Jun 2024 03:15:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXOMUZJx+pOgYjRzakzxLdJvbqHvF9UwTc55Ejj5nocXGqueMlfmhNA5DBA0d7+cEq5z5zcoVMWJCw5K1ktbvI46CZH+AdiIRAAVz8L+w== X-Google-Smtp-Source: AGHT+IHWX9fxf0hfTjcJIXvA5b7UliV+PKryTRetbX7jp8kaWUmkCfrTcqEaTffwRYD1Vasti+Dv X-Received: by 2002:a05:6402:230d:b0:57c:c171:2fb4 with SMTP id 4fb4d7f45d1cf-57cc1716992mr932203a12.30.1718360126975; Fri, 14 Jun 2024 03:15:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718360126; cv=pass; d=google.com; s=arc-20160816; b=jqWOE9DZPTCsLeK99r1O/ClV10hNbb50Tkhjy0IGlgYBYimDDrmxiQhPepVhvhWxyD Nn1Qb68k1/a9/Hef0MIFCStU48wDAqpw68Zlx4H+T4gpyyEuHXsQ0X6/yCQDhFwRkfdM jRgOQapH8EYoGSh9U4z0qdG9XRNoACuEqMpP7qNaK0P3UdC8OANKwprstY5X16AsIcjJ AhUGm38a/t6dc4DW+9dOxsDnxMR4NeqZ0V80tI+DViSZxafZ5h9vLJPJHJ9YRKt2NdfY /+I2ZtGp7s04VApY86kD2eCv/dut3FktGhVvQr2YomRLvNTw5gp5tiNkhrzgPBQbDlJN ayyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=FStQe0rOw4ovI+CUc36E/SQiQptY2BV5r14yvxvD/o8=; fh=LH9SGfd/VXRDpUc98ifTpkzQuXzjRqjh+xqAfuPVXxU=; b=tljXt1nZMdplPjpzNGbGJAngTDW5CfnbX2ir/E6jvPg3Oo3eAWQHP6SXdfg4wR1oA2 WGi3cz0Antei/417Sa1gGozxoLtbi0z8b55zNPOP35+QTm77TDM6FUKpab9+iepJoOZ0 HAEefdT2tTBtTWDunMJkNWrrjpvyDUaGJHK0iuFsJBdUWrLDx8zKKMa270V8QaNEoa+P wQY9VrmqReLHThP26d9vEet9DR8LCx44zWOIBpxjzMzvZtL/+f8JkLPdQ6E7qu5zCQ6b mQwJ5ikKcySmT5dlLahP3SSwW1mdYcxq6V2Edx9Pq7+kPIjTNOQUO76+AYAsz5n1CCaA 3a3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=wcjp3WhV; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-nfs+bounces-3822-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3822-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cbacca498si1301976a12.326.2024.06.14.03.15.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 03:15:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3822-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=wcjp3WhV; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-nfs+bounces-3822-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3822-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 42D811F2B71A for ; Fri, 14 Jun 2024 10:07:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6520B1946A7; Fri, 14 Jun 2024 10:03:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="wcjp3WhV" X-Original-To: linux-nfs@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1BA031946B9; Fri, 14 Jun 2024 10:03:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718359417; cv=none; b=G3pGarfBFbN+OEEtZ56qpTS2KfpvJyRo+MqMfows2Z/ejsiikqSGb+6EGpogG2aPeezGtAc5m/1UdJN56JjR8Sfy0MQZjrsuaS1T2szO09N00eA6TB9R4cbLEMLQRg2chJ+tKR4Nz5DNGdUhje7fjZLmP5Xszlwe+TThuBPg6H0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718359417; c=relaxed/simple; bh=LrtkEuvKffls++VLZGvU+odWuHFgeu13Obm1nGKPmcw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ebu0+9F0zkfXEhGBEbmXlUBMwId/l+dmZopncEeW5QfwC2naxGbRs+vJpKWeDdA1saacxq+bPxyV8QihumQkFYKIZW+cG83FhGqp9vu5d2J3FwOyOGiGuTbaVN2GMkCTWsEXZpwr2bibAVhskR11XDNteNBo6FWv9urHOqYwgsw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=wcjp3WhV; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=FStQe0rOw4ovI+CUc36E/SQiQptY2BV5r14yvxvD/o8=; b=wcjp3WhVk78M5sPQVxfA8WojUN z48Q4IpxtprJCyho9D71S9CReioWmnl7v2h9kyQHZXyrSHYnjIMFgmLnRFH3uMV+hX3fpZRyZ2f+7 kuKBR7gBriGaMAshc60VvfaoIFsrzU70w0OAGIy1V5HHLkuEiKHKa9Z+wlK1WpyNSIQ38b+IWR2Cl QdIG6+n6UgZWfquOXvYUL7xE1zgUToJula4U1pipmEwOhGlHWnHudJ1Y4x5FVuzf6VD9Kt6L8z9NQ oaT1kgD+PPdK5cPbdXJ5UAQjxigbvjCgZEb5Ra6lf16c21CxneLxOfRLBdcUZDdzKQIeaUNrFm9K1 FYbNi2uQ==; Received: from 2a02-8389-2341-5b80-6543-87c9-27d1-cd7c.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:6543:87c9:27d1:cd7c] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1sI3mQ-00000002Kh1-1Wya; Fri, 14 Jun 2024 10:03:34 +0000 From: Christoph Hellwig To: Trond Myklebust , Anna Schumaker Cc: Steve French , Andrew Morton , linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH] nfs: fix nfs_swap_rw for large-folio swap Date: Fri, 14 Jun 2024 12:03:25 +0200 Message-ID: <20240614100329.1203579-2-hch@lst.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240614100329.1203579-1-hch@lst.de> References: <20240614100329.1203579-1-hch@lst.de> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html As of Linux 6.10-rc the MM can swap out larger than page size chunks. NFS has all code ready to handle this, but has a VM_BUG_ON that triggers when this happens. Simply remove the VM_BUG_ON to fix this use case. Signed-off-by: Christoph Hellwig --- fs/nfs/direct.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index bb2f583eb28bf1..90079ca134dd3c 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -141,8 +141,6 @@ int nfs_swap_rw(struct kiocb *iocb, struct iov_iter *iter) { ssize_t ret; - VM_BUG_ON(iov_iter_count(iter) != PAGE_SIZE); - if (iov_iter_rw(iter) == READ) ret = nfs_file_direct_read(iocb, iter, true); else -- 2.43.0