From patchwork Fri Aug 9 16:22:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13758981 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 73EB4168B8 for ; Fri, 9 Aug 2024 16:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723220559; cv=none; b=Haw4dy4vpq+3bACoblyfO93e0fcoB0vZObjMCsTeX4yxhmMqH9akclWNyWlCFVjcgKQsok7/9GxKjEm9UHbUJKJyKZeiZ/MuIeA2ccaxYYjqWy/ZlsRrTAVPzYfpDwXrWIsEidHhb52f9qb+o8Svwq91UY2Me9ta2mQjYBKCGZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723220559; c=relaxed/simple; bh=jRe2oXexqSximhCJ6OwueABMYyYWI0m1cYd/J7KV/Q0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GXUVn3d1M2lFNcbePM77OKxp9StgPrwPNhReM4ue60kBQfFh+gfQuSvZS9abecQemU0feXgBnGQXs3SRBWGWkiB8PUypbUyM8RPyxd0Skwv7yaegftbf8O38vuYz/4ClZXadoyVJdWa8JvFVWbOLXTqufvE+BKdhh9wR5J9fjxM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=lmsar3BG; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="lmsar3BG" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=xdLLmXTXY3NIVPPwRtex6MS+2C4N31oP3hOM1qLCR8g=; b=lmsar3BGC9iJXw98yAlsBrbvHj 1A1fxanF8yimpxVY5rcoJLzrLjpH/s9i/bUvjD+Yhy7i5t5Eeh8zJC7XJW5Dhw5vTU3OdeLHp3xVP p30kbnK6ky6g8CMi7HdHKY4RkcfXLdnmWwFfpvTEkiHO/soXyuTn98oajGjCdK/NODVOtG7Yoll64 w35FRTha0oWibFLZO3SyW3LbYzJ8dYutw+p7bqimiC21PN8qe1MZqJWGCDx1G8xCF+BzhxIqJL5SI x7oJSbxHX++NVPRzDgElZn3NHmXo1kXEoY28Xb72R2dsIIXjiiUJ19XmMMBlH9n9f/mcUh75oXRfd CwqqAHnA==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1scSNq-0000000Apoh-0bVM; Fri, 09 Aug 2024 16:22:30 +0000 From: "Matthew Wilcox (Oracle)" To: =?utf-8?q?J=C3=BCrg_Billeter?= Cc: "Matthew Wilcox (Oracle)" , Miklos Szeredi , linux-fsdevel@vger.kernel.org Subject: [PATCH 1/3] fuse: remove call to SetPageError Date: Fri, 9 Aug 2024 17:22:18 +0100 Message-ID: <20240809162221.2582364-1-willy@infradead.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 part one Signed-off-by: Matthew Wilcox (Oracle) --- fs/fuse/file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index b57ce4157640..4bf452d5ba9d 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -939,8 +939,6 @@ static void fuse_readpages_end(struct fuse_mount *fm, struct fuse_args *args, if (!err) SetPageUptodate(page); - else - SetPageError(page); unlock_page(page); put_page(page); } From patchwork Fri Aug 9 16:22:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13758979 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 89925168B8 for ; Fri, 9 Aug 2024 16:22:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723220554; cv=none; b=sdb0riU/XEtuZDAQTg+VwVfNWjF/lporxjhH71zb1XYEyeZWBgNv7nfUTBUrtqvdZVZVN5bLq2ZdjFI43qcgGZ27fR5sRrxAezN9QNpjGjD7UB5WeXKjk23l/oeuQerhZBNqscjiqdTlp0c2/38gpyLu6Kn5Q4GTLlCOPqp+St8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723220554; c=relaxed/simple; bh=O/gvwbAEv3Jm3XJ9mPRTXbtgnhUu38xOfeNWFNPDFGc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Sox+58xKSyGCkugSGn5rhxQKRdEhaibzVdQ8rPIyRQ5Rit2KpiF9/Q2iCOgh+I9WNJYizwINCo5H26c8xhs8Lfmq1gRbXanTmPcrDwKkBQ4oMBKlfSu7zSfI3Bb9nHO4rqWpeCyvINbE7kgX5OJIV/Fw9EAToZcWVPkE7YXfYSM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Veef+2gs; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Veef+2gs" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=6vrGMu6lrEHtXM6oaKmgXSYk9hVv6RyJn8fRBBSHz58=; b=Veef+2gsqyeXc8s9T3ZjSdLKwZ q9U/Fa1pi+hR0djsDc9gozd0EGzYXumu5rznsjExSi16k2e03Dltg94JhhkUi500pjRzoSXyUSovd k5w0GAk0uYQO8dHIlI0hAbpfPBN2Y1xY2DLANWkRzTDfeHN8uQ/z1QvctnOwHukwS6tGffBAMhFZq 72Ya3Km/lijU2DzAyBtY3OZES3dkD98u2k5stHNStLqoddBWCYKWhWnrKHRIq4oddhJSO7bzY4+EG 6qvH/kMRfNiX8Hc8vUQDjSSZw41G2s5e77cPn/NEn5QfuuSxaTfLcjwN+GK3GJ+iGe2BUSXbbj/8F QdIoY2qA==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1scSNq-0000000Apoj-16pf; Fri, 09 Aug 2024 16:22:30 +0000 From: "Matthew Wilcox (Oracle)" To: =?utf-8?q?J=C3=BCrg_Billeter?= Cc: "Matthew Wilcox (Oracle)" , Miklos Szeredi , linux-fsdevel@vger.kernel.org Subject: [PATCH 2/3] fuse: Use a folio instead of a page Date: Fri, 9 Aug 2024 17:22:19 +0100 Message-ID: <20240809162221.2582364-2-willy@infradead.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 part two Signed-off-by: Matthew Wilcox (Oracle) --- fs/fuse/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 4bf452d5ba9d..2b5533e41a62 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -935,12 +935,12 @@ static void fuse_readpages_end(struct fuse_mount *fm, struct fuse_args *args, } for (i = 0; i < ap->num_pages; i++) { - struct page *page = ap->pages[i]; + struct folio *folio = page_folio(ap->pages[i]); if (!err) - SetPageUptodate(page); - unlock_page(page); - put_page(page); + folio_mark_uptodate(folio); + folio_unlock(folio); + folio_put(folio); } if (ia->ff) fuse_file_put(ia->ff, false); From patchwork Fri Aug 9 16:22:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13758980 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 CC6C4168B8 for ; Fri, 9 Aug 2024 16:22:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723220557; cv=none; b=G5jNJH6zQaGKgwpeyTxu4R53s+QeWKJoIKrsnwA/mB+3IoDQZB8Oad5R8x6R4crjDOBgVVIhtkn4LKrt9LHhQhfqVr/phDvDomp8nns8gR1y8oV6NysVVEqhBaNAasMUbvZpgHHsi61c3BuNP5fEbIPAaFyiyfGy6cUHYTJZrxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723220557; c=relaxed/simple; bh=lBFip/OuPo4B2ewzZjk+bP83dKeM72UuwHF/Wz/6C+w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cZegmgP38LCpXZSmHxSCy33vKTNdlXQygVBIiiz/3sSE03fB1AGNt8S0lYvzS91+lc3wKf2uX7DeXqHFoEDidAKfnZx2JzG3xqwKcUkPvNotH6kkxGCsVDxGrWhUEgFRVwyAZP0eVEbj+sXrsLy9fsSkREkbqjwgd+MlrAyx2Dc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=jJYJBgzC; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="jJYJBgzC" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=53Rxo86R+BN2sFnnh2A5u1wr0g2YNpASVq0Z55mCL48=; b=jJYJBgzCPZ/hED2RhSYgD8wqHJ 1LDErYkDNHjt0gz+AP1s5EIBNmd0NEsCJ3KorBqSCPY9m+W4lxoRNkG7fIZnEFwkpvWqiTt9bqb1u 7BoMYVUvIbKSkghewXVQEGkkFHnkT/S1EhQ6hTEps2zLQDxljxJ2MsgL8eUbkdHVg2n2KdRzpTuPE 42xQXnXnLcbRJL6gyxQiOIe4fenN1IncxtzNJU2JLqghv6lz2XZKgSQDu6IU9JAuJObkDatmaI2Vp 2tfUntshWIfxbn1/ZfNRxGngdAfL5w83229webN7p1/dNvuYRGmIFokVgViTtWMFuQsOLprDjDtHZ S713Y/Jw==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1scSNq-0000000Apol-1ba6; Fri, 09 Aug 2024 16:22:30 +0000 From: "Matthew Wilcox (Oracle)" To: =?utf-8?q?J=C3=BCrg_Billeter?= Cc: "Matthew Wilcox (Oracle)" , Miklos Szeredi , linux-fsdevel@vger.kernel.org Subject: [PATCH 3/3] fuse: use folio_end_read Date: Fri, 9 Aug 2024 17:22:20 +0100 Message-ID: <20240809162221.2582364-3-willy@infradead.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 part three Signed-off-by: Matthew Wilcox (Oracle) --- fs/fuse/file.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 2b5533e41a62..f39456c65ed7 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -937,9 +937,7 @@ static void fuse_readpages_end(struct fuse_mount *fm, struct fuse_args *args, for (i = 0; i < ap->num_pages; i++) { struct folio *folio = page_folio(ap->pages[i]); - if (!err) - folio_mark_uptodate(folio); - folio_unlock(folio); + folio_end_read(folio, !err); folio_put(folio); } if (ia->ff)