From patchwork Wed Nov 6 12:35:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13864634 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B76DCD44D58 for ; Wed, 6 Nov 2024 12:37:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 50C026B00B9; Wed, 6 Nov 2024 07:37:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4BBF96B00BA; Wed, 6 Nov 2024 07:37:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 383576B00BB; Wed, 6 Nov 2024 07:37:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 171D16B00B9 for ; Wed, 6 Nov 2024 07:37:24 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 935DC1C53B9 for ; Wed, 6 Nov 2024 12:37:23 +0000 (UTC) X-FDA: 82755620430.14.5698718 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf25.hostedemail.com (Postfix) with ESMTP id 1A968A0011 for ; Wed, 6 Nov 2024 12:36:56 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Qj+P1Xhj; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf25.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730896473; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=X3twVFG043O59vporSoGB49KW0yXOb7j0HiRw4sYWo4=; b=GuiBilXxJqZ+SNICyxksu73l1Vq/Gi+dGGNB0svMIgX4V9KMPUybzR3N/DzvPecdIOjDwS MZrie1niQZNhM1OkcHAW+jEUKcVjis5RciaiKuUscJ4RmQv7kMSsAq49LG2yivMX7GZukH NzGeuChpLJjdL2cGtb2A+3N7fl4SKCo= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Qj+P1Xhj; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf25.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730896473; a=rsa-sha256; cv=none; b=b0PFv+cQRrzigYCRGJqqlsh21fQravQJRgEug9zVFg5quw6obkTvqFCLBBry/PGTXaOl5K iGKsApPuKAfQmFYlTgnK45wevrp2eNmFPN0w50WQHiPgcFfTYk4yOSpLZfH49XgwEOcV+w aXIuOg/Y1obOsIoNJGq+WH5CWgCI/zI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730896641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X3twVFG043O59vporSoGB49KW0yXOb7j0HiRw4sYWo4=; b=Qj+P1Xhj92MPM0sxGC94FjTLbBACwdJq2YZoLGkVjIbsV3gfY1H/2I+iumz39CKf/2JDQ+ NBbxE6eO2OOb1fNOOhFOy2UHpnOKqI16xsLPY6W771vw86hKP6UubySMnscMRN1KwrGG6B UGSDo0kbxs7fB1l1GOOegHouEQyubVE= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-471--vc-UjHAN7GH84QOk_v9DA-1; Wed, 06 Nov 2024 07:37:17 -0500 X-MC-Unique: -vc-UjHAN7GH84QOk_v9DA-1 X-Mimecast-MFC-AGG-ID: -vc-UjHAN7GH84QOk_v9DA Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3A0371955D91; Wed, 6 Nov 2024 12:37:14 +0000 (UTC) Received: from warthog.procyon.org.uk.com (unknown [10.42.28.231]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C38391956088; Wed, 6 Nov 2024 12:37:07 +0000 (UTC) From: David Howells To: Christian Brauner , Steve French , Matthew Wilcox Cc: David Howells , Jeff Layton , Gao Xiang , Dominique Martinet , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Eric Van Hensbergen , Ilya Dryomov , netfs@lists.linux.dev, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cachefs@redhat.com Subject: [PATCH v3 08/33] netfs: Make netfs_advance_write() return size_t Date: Wed, 6 Nov 2024 12:35:32 +0000 Message-ID: <20241106123559.724888-9-dhowells@redhat.com> In-Reply-To: <20241106123559.724888-1-dhowells@redhat.com> References: <20241106123559.724888-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 1A968A0011 X-Stat-Signature: 9yd47nbkfnixsna1w9naaoa18kiat8z4 X-Rspam-User: X-HE-Tag: 1730896616-881569 X-HE-Meta: U2FsdGVkX18b6v+sUSG4Qdq/AQFh68V+O08oiJflxz7h8Lod2/PY+/NGwwIFpM35sgaK47IEeWNh856KtQmVM4ZjYceMnHqq1pP96cbZ4cZ+c0K2AFmJ9weg6W/KNhIr2r6x7kI4sKFsXJgQ31kVROx5GRbxfDxepbA2UApAumNkETD50U4gDX8isMRXF/aZKyzO0vNdhrMkwecGAP+VsbsGDYAyWR182FlKQBtRuhW/Wgb3p/ygrTlLPYWjkBbTUfFRA8JCny8jVoMcyhUBcsZe481MKKGEoQLO8XlNoXAFJDcLMpVbcLMD+/PiJD2WwkpspRm96ddcHvtMTUPUss5js/usP0VJD3aVd9GtpWUYB2HQ88d+VuDCcczr8h9o3yvVJlUNBDv8K8eYQvUFzGY8lathNjfUeajcG7t5p7XglHNDxCWlV8IbTLIpCQNnG+uJXscgNOCJ36h6/E8H9t1+YNlBy3qOstQZth6O0abdINtaRP+9/TkFJBllt1occjdCik/aaJ/g0zTtm3iqVLENNcs99Ys5ILOCNNyFvdcdNxgHmOL6NTaijz7c7v9EfQeHZebZHQzwt/Wbl6HUyG9FCSBgxWKdYCclPfYPJDmzSzEgSFIERNjtcgQSx6hbXBtzU0x223+4H1mtkw2wpe10i/pprWsNMMl4ZSuczpqrv0Ai6bC89DsaC2hPfBypo2t18XviyTmLIMVnkumiadkCXK7FpPEMqRwBVzsDAAN/gec0EqxRGpBEcOQiR7R90sSM0ejOH+kbAVa8tu/GVxmDEqsyrzstiB7IsBwDRBcbcZY1mTpEn33r5cSpOrOn42q4PEB9wmqhk+Nm8HdsB3iaTp7vN1i/lRLOxUbrSXHcg1QRhgIgrwrV2MV1YSQvvd+Z7CxxslKp15AfRExLP9YfO1WSHOjcx1/w8oYEdKkjbWrI5WWEULzwxz+ajlfn29meqtulwyaq3r/AzUw v9jZYmfH SQpDH3fhoaRL0KaSOQLU5H1L1GLfldXC0nnRK2/xu8R4r1GYeI6Cio2RLChu2Aq2iDzW0AicBVsWj4YfOjfOag75wdM3ugcH250C7hY8tmfPq5tVKZiSlXvenfYw8Z4NIrfaBEDpQsETvv1wJ+MqiW6rKvKpcRbTfEmJsSdbrVU0EQkonxfoUW7mvsEDsd3+kFGjEFv3kzUqm/Bad5kU3dXWfZkrbS7RoJbl8fmL+lcBl3aMCXbdrW3FxbJ6UeJDHOciVU/Qj8ahQwHnEfMhCyu45R6JerEYvN9DJy5ymuYEi9mI7mI5L69xDDgOehKOmVpqL05P25shm6YVqyQ9u9G17R3ilLqiIi2RKmdyGhZ+XtlmTpnDxwERxzeDj8pMhgxVcaIYyGZuEGnmdvYAAWGNmuR39mlZARViwiGY1KravbLL8/8hJ6k5uCnxRh5uX0YceoZy6O3wrG5hlN/o76a4vttI4WjNBH8mfcsHPxJYeZTO50XkcnGz4u0ulf8yMJlUnYCBMNiqsrjDJwCPuyMdfDw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: netfs_advance_write() calculates the amount of data it's attaching to a stream with size_t, but then returns this as an int. Switch the return value to size_t for consistency. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org --- fs/netfs/internal.h | 6 +++--- fs/netfs/write_issue.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/netfs/internal.h b/fs/netfs/internal.h index ccd9058acb61..6aa2a8d49b37 100644 --- a/fs/netfs/internal.h +++ b/fs/netfs/internal.h @@ -178,9 +178,9 @@ void netfs_reissue_write(struct netfs_io_stream *stream, struct iov_iter *source); void netfs_issue_write(struct netfs_io_request *wreq, struct netfs_io_stream *stream); -int netfs_advance_write(struct netfs_io_request *wreq, - struct netfs_io_stream *stream, - loff_t start, size_t len, bool to_eof); +size_t netfs_advance_write(struct netfs_io_request *wreq, + struct netfs_io_stream *stream, + loff_t start, size_t len, bool to_eof); struct netfs_io_request *netfs_begin_writethrough(struct kiocb *iocb, size_t len); int netfs_advance_writethrough(struct netfs_io_request *wreq, struct writeback_control *wbc, struct folio *folio, size_t copied, bool to_page_end, diff --git a/fs/netfs/write_issue.c b/fs/netfs/write_issue.c index 993cc6def38e..c186221b45c0 100644 --- a/fs/netfs/write_issue.c +++ b/fs/netfs/write_issue.c @@ -271,9 +271,9 @@ void netfs_issue_write(struct netfs_io_request *wreq, * we can avoid overrunning the credits obtained (cifs) and try to parallelise * content-crypto preparation with network writes. */ -int netfs_advance_write(struct netfs_io_request *wreq, - struct netfs_io_stream *stream, - loff_t start, size_t len, bool to_eof) +size_t netfs_advance_write(struct netfs_io_request *wreq, + struct netfs_io_stream *stream, + loff_t start, size_t len, bool to_eof) { struct netfs_io_subrequest *subreq = stream->construct; size_t part;