Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp582430lqh; Thu, 28 Mar 2024 10:04:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvO8srqGtHq2ipjIKoz59MuInZ4wl4Hj2VXYWeCsIpBEMiO/3Kq1pPRE3sxgkZxu7hfS/xgjh/eV62v/RUsf6Fc1ip4u4iRfhzr8Ssyw== X-Google-Smtp-Source: AGHT+IG4b7NqJ4qbv/4S7GLqZ/wpPAp4IsN6LGZ5qkqzLdjvOQrmSaIW6Pn4X/VXbbXsQnMVMxNw X-Received: by 2002:a05:6a20:7f92:b0:1a5:6cc4:6aad with SMTP id d18-20020a056a207f9200b001a56cc46aadmr2959394pzj.6.1711645444737; Thu, 28 Mar 2024 10:04:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711645444; cv=pass; d=google.com; s=arc-20160816; b=sjqo6+cdDhdyYDbCwtnv+S3k9mro6HV2xFSckLB3J73ZQk/L4SmotXW5H8coO/QZeZ wT3fe2D2THA4pPg+pRnkCLgAYBhjtLQGQoeo2ZzE7+P1AwUuBvSxONTcY9oqMFqHANUi OzQRuZF4Ou/EtDA6TMzK/xv8yELwjrGXpN63tqt4j7DO6GnwqoeazLhKi3GKYSaugEER 9GiPC0BALYCJzF5fru2Wn6rwko7EhgFTT6YRoS/ar65FyV9pZzhmA2Uxp8c36hjthcfm j9520FzxSWOpDOfdFMv6OdqD9hgtqsc+8/7fsZ3KM12nwEQsxhbUL1ACALqZOCQtqMJH aiEw== 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=FP3I6/3Lail3PRtRjCFYUrK7RtWmkgk5AkVOW5arfmM=; fh=qGO61KcqD8nwg5doI1799cWr3E7eI1fHmScYq/qreMg=; b=CEVLCBPKviXV37IGsiPoPML7Zt3M+OENaxjg0tYdqZf2WnyGcIkB9XLtolm/bW4zSY yyURv33v6dFfzsNg8KgKmAWeRtE0up32oxcN+fX7apm5hyhUqgMjYD4GN6/3RsVX1q8t 9agzvCOf3uPBj8RHMRXOJmotZWra1JEv0DS2bKE582v0+3BC/UCSy/PUTY19a+sSL9xo RmDLe0vqyOUMdn3/dDzM9AcC6wmRchzLmIJI81ME8RHSqgZBxRQ3cwtgwBnaU3tPXoLa bAB4Df5Nz9GZAIMhonad3cBQjHqp2qHB00MYbAB/K1KhM2Re4LFobGdIHGxWHaMzlWD/ QfBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ierBdh1f; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-123322-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123322-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j38-20020a632326000000b005dc49a8c93fsi1785084pgj.764.2024.03.28.10.04.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 10:04:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123322-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ierBdh1f; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-123322-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123322-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DC46029ED87 for ; Thu, 28 Mar 2024 17:01:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DF58C13118C; Thu, 28 Mar 2024 16:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ierBdh1f" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 A280C130A4D for ; Thu, 28 Mar 2024 16:59:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711645191; cv=none; b=XkYfWrGIPtdBKNSqrPT26hDXhIMFr15+xKI0/gQqxcjB0Ejl1EqKof0qIzXXkYr+6WdYOjsb3tiVWTXjTbD5rQzrIV00k6+aUbi08JD7IoqvW+gAewXdwAjvqMs0pVWOTy5usSJMq64RS/MgqcgYkMp/yxm/oksjMJu4VEeLMM4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711645191; c=relaxed/simple; bh=NaiYCpKD/naLFX/mBnWa0fNHnJcl1Aa3tXqEyM0Fyuo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VnFW6yi5JPK7Aj8q24OmnLjG3p8VSg6vBmtiNtHOeYB+6DjabtPpK+dYtaDB5OsPGZ01iHzW/UmqW9Cv4mhFL7OMPfhWuKFce4NUEvk66sRRETDL5YslB7r6ulDtCvsHxWGCRn0SFn5J1R2O6Lnp/A/n/CbhF1sDSaIq4VBThuU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ierBdh1f; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1711645188; 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=FP3I6/3Lail3PRtRjCFYUrK7RtWmkgk5AkVOW5arfmM=; b=ierBdh1fE80SF34sNWGxdIY/MffgXOCXK7NMa5m8YWWPvNNfE+Lc1LYzLP/PRKwBLmrJkr pkQIs0meIDxhxyJF6ROBhaTIG5l54GSeJCpP2zg7+HD9b/EmsrgyWyIkdOpyOz/XpsIJte KP5e8uqUGZOSZaNn46RNDBsDuxo0Rvs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-130--_LPE4uLM_G2IXbLkWEMMQ-1; Thu, 28 Mar 2024 12:59:43 -0400 X-MC-Unique: -_LPE4uLM_G2IXbLkWEMMQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0A5680026D; Thu, 28 Mar 2024 16:59:42 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id C5C27C4C7A0; Thu, 28 Mar 2024 16:59:40 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Jeff Layton , Matthew Wilcox , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Christian Brauner , netfs@lists.linux.dev, linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Steve French , Shyam Prasad N , Rohith Surabattula Subject: [PATCH v6 05/15] cifs: Replace the writedata replay bool with a netfs sreq flag Date: Thu, 28 Mar 2024 16:57:56 +0000 Message-ID: <20240328165845.2782259-6-dhowells@redhat.com> In-Reply-To: <20240328165845.2782259-1-dhowells@redhat.com> References: <20240328165845.2782259-1-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 Replace the 'replay' bool in cifs_writedata (now cifs_io_subrequest) with a flag in the netfs_io_subrequest flags. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org --- fs/smb/client/file.c | 2 +- fs/smb/client/smb2pdu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c index 76bfefa9b669..6f6459b506d1 100644 --- a/fs/smb/client/file.c +++ b/fs/smb/client/file.c @@ -3246,7 +3246,7 @@ cifs_resend_wdata(struct cifs_io_subrequest *wdata, struct list_head *wdata_list if (wdata->cfile->invalidHandle) rc = -EAGAIN; else { - wdata->replay = true; + set_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags); #ifdef CONFIG_CIFS_SMB_DIRECT if (wdata->mr) { wdata->mr->need_invalidate = true; diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c index ddd69db1f0a8..2e29c6c2dca6 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -4819,7 +4819,7 @@ smb2_async_writev(struct cifs_io_subrequest *wdata) struct cifs_io_parms *io_parms = NULL; int credit_request; - if (!wdata->server || wdata->replay) + if (!wdata->server || test_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags)) server = wdata->server = cifs_pick_channel(tcon->ses); /* @@ -4904,7 +4904,7 @@ smb2_async_writev(struct cifs_io_subrequest *wdata) rqst.rq_nvec = 1; rqst.rq_iter = wdata->subreq.io_iter; rqst.rq_iter_size = iov_iter_count(&rqst.rq_iter); - if (wdata->replay) + if (test_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags)) smb2_set_replay(server, &rqst); #ifdef CONFIG_CIFS_SMB_DIRECT if (wdata->mr)