Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp71890lqp; Tue, 21 May 2024 19:06:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSjzqBtUmhbdpHbCD6vwFz4+JOxknMR7cf/+xE4ZTXrSM7BM+WztCdWjPeKgYRSstnarE2L7B3jS7H86jSWXnNZq6p9LY1irSTizHnng== X-Google-Smtp-Source: AGHT+IE51MhsharE+8KO9hIj4d1RMOczLV0DyiLshhxEq4Sg+nSnMNcPIX7w+hO1QQAsnnQ8MG/j X-Received: by 2002:a05:620a:383:b0:793:24:ef45 with SMTP id af79cd13be357-79498f26390mr167876585a.6.1716343609883; Tue, 21 May 2024 19:06:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716343609; cv=pass; d=google.com; s=arc-20160816; b=UCSFdaNZ6p280qPxhA2AWlF7Z/2UZbQInMMXxBfSAX7gFMCJbRHmN3/V4WRa4AK7V+ XXjWBRXvUqVpfC8Ckby0vrwgAcoXYum7XCqmhWTpa0W74ra0aeXbFVADVPBLaDvkPUZt CwByL7Fw/zEOpP5uQ5SnOeOnXAowkR9VU6P7WT7HSSpuC4qCj+ocDf9gD8FX+SrsHxJT LwoyxfIQSmdsGNhKs2RDAdmIe9YbrFsdgEN/SgrmhWHc2uLuSLUAHDkHpTNjY4Jm3nEa vFYe3lFRSpMtdHJN1ljoBC2sYOIhNaU2nT9qk4xCbd0tHPJf9iqbANF51DNc2JAyl0a3 VQXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=kjc9sQnvaD8n/6XF+5odscZn0J1sIRPDWHQAxSfpUxU=; fh=Vw6DBzWCZtDqbarsP//ZU+ZjkXrO8VtZzYq3VVVsXQY=; b=huJnS1FZjKb4EItAGj7mCbNMvA53kGTYp3n1pD0RmppvLK3LX0DP6ffSt6cILPy/pi 6CwLgwVBu/TEvq3fyFw1whpOGA+XPoa4JQgrawi7GL5TFZOY8jNUcoPserzyepsfmAni WJkYEtc9Xq3Nre0YMaPb5l7BhqhTujZWGWe5x4oS0EcBff5HClr9bPa9OC2STwPTeOoA j0qyxpb1b+J+d8W4FsuPqUWkUCEo/KiOKykNSqzdKYbBz2i3Ter5sTSPs54C7rbWTABT qG3zXOF1UffmM1gtZ5jSvbxxdXzziWVEaWQ2xHxa3NmbsQyNk5eGcDclPZZ6G9oSSd9v xBEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CcEJYwLB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-185678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185678-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf30a54dsi567939685a.337.2024.05.21.19.06.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 19:06:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CcEJYwLB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-185678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185678-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8B6BA1C22933 for ; Wed, 22 May 2024 02:06:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8EA914265; Wed, 22 May 2024 02:06:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CcEJYwLB" Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62A2E17F3; Wed, 22 May 2024 02:06:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716343599; cv=none; b=LZAQpPMi+Uq2wuxFHUU28D3FIiNqAtEuak6EPxugT6qn658pivXnTwD/P7NhEleyemmstQ5gbHnDs29w+buLJ1QgjpXxxETHKY8AJoiLB2e9HL88ABMBCIXiYCaa5owqshAGPHew7kjEJVgNB+KV4EW7lqPZrMKIYHo5+vgejrA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716343599; c=relaxed/simple; bh=HOyOje05xOvnm1LzK2hiPdZdYL36rNfc8mgu4aPHMYo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=q5KkCW5gAQub2NIPoBA+JUkB6nkv/5+Ce7Ko+WuxOEeDBdMFnRIvBjeSdzdCS28OkD7ybDlzsHjHUdOFxawM8b4LLakpGSj7dXcQ8Ls/hb2XNu4+lonKsKgUx8Hn6ShoX0BOROaUroyUnumEiiTjrcPuLxUd3fvddTSwoAA9T30= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CcEJYwLB; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52449b7aa2bso3210372e87.3; Tue, 21 May 2024 19:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716343595; x=1716948395; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kjc9sQnvaD8n/6XF+5odscZn0J1sIRPDWHQAxSfpUxU=; b=CcEJYwLBaYpIINh/K736oKU+rw+qqR8FtfcOOdu3iMh+WZwvuFML5Vhu2QyitNQehb BgOAEqWOIDSGCbWYbbv2m9eWYF1UMb6h8ecp17PQooJR4jDy9YrGoJZX7GHWMc/6u2uS XaCVzJSjLm2atajVY8oeaPEObv8ATPOvYz4xD9RIAtm2sfkoVG70eVoWxdpfG7IoATNl 9Ak9fJe9jBrrHkFX1mKR6rgW2POLUuNsLTEQnqAp01qvbNnp9q5KjJsYJijkdYYqdl00 I3l3cPodKaiaI+4IZ+h7wtr1Jhr0VX86ZBXzI4SzYGcM+Fgd86P5ZvwU+I/SjR4qCWpu 7K7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716343595; x=1716948395; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kjc9sQnvaD8n/6XF+5odscZn0J1sIRPDWHQAxSfpUxU=; b=Z4vLwEJAfbHjXjXb33AbG1RDKwascD81MFm1TpXvBGz0973kR54Mixu3Yl2S4KN+Hl 5eD2QHVktqS1yEH1xDxtpx4jAB198ZQUjhVGhE2er1ieACqTW6Y5RahPL4u1GpnDazv6 foO+M/71rTpBIB8V3dxWhGpvpBatsxlpg0BdfJ0ERPuQ0/dTqLkhy5M1BTPfiFo4UE2e Lt/lafoUq5LktyoiLYw9bRynS6ThvSwuFW5CoSQOnj+HouFENTZPnR3f2BBhzEzm6xdN EmD0tFED6WS839OcaMgqR6GO1Q9CQ76v38kVDkFRmlDZElXtYZFP+7q32qFSUYepc3Hr t4nQ== X-Forwarded-Encrypted: i=1; AJvYcCW4cQ88qkRLkKu0clH6dsZUKhyITC979Zp7/0mh4f0tktnk+DoOpOH5LJA1eT6dpAmjq+9zwFW8QyRszIjJMHBZ8kMxXaA0KfUOjut17yQqzgw9E9K8wXNcRvJmpvZvEAS6kp30kWPHwczwa51SqxDoivSOCyA4sAGeRQ0sh/ooNSvjIbx0uiM= X-Gm-Message-State: AOJu0YyzcD+RFau6bS+aDMxGVFLpELeQJUh8vyyGzwiXKyoymlMWGHmd dudmuTBgmviyBkEDBy9I9iAvrSRpG3rIT7Ma7dQ82oPNTTtDk3YzYvsFGwOg/USqKpEkQ0OIHqw tPMSwd2coy0YOX+sVx0S6ZBhrRY8= X-Received: by 2002:ac2:5f56:0:b0:51f:452f:927b with SMTP id 2adb3069b0e04-526c0878924mr255832e87.45.1716343595198; Tue, 21 May 2024 19:06:35 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <351482.1716336150@warthog.procyon.org.uk> In-Reply-To: <351482.1716336150@warthog.procyon.org.uk> From: Steve French Date: Tue, 21 May 2024 21:06:23 -0500 Message-ID: Subject: Re: [PATCH v2] netfs: Fix io_uring based write-through To: David Howells Cc: Steve French , Jeff Layton , Enzo Matsumiya , Christian Brauner , netfs@lists.linux.dev, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: multipart/mixed; boundary="0000000000004e126c06190162ef" --0000000000004e126c06190162ef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable fixed minor checpatch warning (updated patch attached) On Tue, May 21, 2024 at 7:02=E2=80=AFPM David Howells = wrote: > > This can be triggered by mounting a cifs filesystem with a cache=3Dstrict > mount option and then, using the fsx program from xfstests, doing: > > ltp/fsx -A -d -N 1000 -S 11463 -P /tmp /cifs-mount/foo \ > --replay-ops=3Dgen112-fsxops > > Where gen112-fsxops holds: > > fallocate 0x6be7 0x8fc5 0x377d3 > copy_range 0x9c71 0x77e8 0x2edaf 0x377d3 > write 0x2776d 0x8f65 0x377d3 > > The problem is that netfs_io_request::len is being used for two purposes > and ends up getting set to the amount of data we transferred, not the > amount of data the caller asked to be transferred (for various reasons, > such as mmap'd writes, we might end up rounding out the data written to t= he > server to include the entire folio at each end). > > Fix this by keeping the amount we were asked to write in ->len and using > ->submitted to track what we issued ops for. Then, when we come to calli= ng > ->ki_complete(), ->len is the right size. > > This also required netfs_cleanup_dio_write() to change since we're no > longer advancing wreq->len. Use wreq->transferred instead as we might ha= ve > done a short read and wreq->len must be set when setting up a direct writ= e. > > With this, the generic/112 xfstest passes if cifs is forced to put all > non-DIO opens into write-through mode. > > Fixes: 288ace2f57c9 ("netfs: New writeback implementation") > Signed-off-by: David Howells > cc: Jeff Layton > cc: Steve French > cc: Enzo Matsumiya > cc: netfs@lists.linux.dev > cc: v9fs@lists.linux.dev > cc: linux-afs@lists.infradead.org > cc: linux-cifs@vger.kernel.org > cc: linux-fsdevel@vger.kernel.org > Link: https://lore.kernel.org/r/295086.1716298663@warthog.procyon.org.uk/= # v1 > --- > Changes > =3D=3D=3D=3D=3D=3D=3D > ver #2) > - Set wreq->len when doing direct writes. > > fs/netfs/direct_write.c | 5 +++-- > fs/netfs/write_collect.c | 7 ++++--- > fs/netfs/write_issue.c | 2 +- > 3 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/fs/netfs/direct_write.c b/fs/netfs/direct_write.c > index 608ba6416919..93b41e121042 100644 > --- a/fs/netfs/direct_write.c > +++ b/fs/netfs/direct_write.c > @@ -12,7 +12,7 @@ > static void netfs_cleanup_dio_write(struct netfs_io_request *wreq) > { > struct inode *inode =3D wreq->inode; > - unsigned long long end =3D wreq->start + wreq->len; > + unsigned long long end =3D wreq->start + wreq->transferred; > > if (!wreq->error && > i_size_read(inode) < end) { > @@ -92,8 +92,9 @@ static ssize_t netfs_unbuffered_write_iter_locked(struc= t kiocb *iocb, struct iov > __set_bit(NETFS_RREQ_UPLOAD_TO_SERVER, &wreq->flags); > if (async) > wreq->iocb =3D iocb; > + wreq->len =3D iov_iter_count(&wreq->io_iter); > wreq->cleanup =3D netfs_cleanup_dio_write; > - ret =3D netfs_unbuffered_write(wreq, is_sync_kiocb(iocb), iov_ite= r_count(&wreq->io_iter)); > + ret =3D netfs_unbuffered_write(wreq, is_sync_kiocb(iocb), wreq->l= en); > if (ret < 0) { > _debug("begin =3D %zd", ret); > goto out; > diff --git a/fs/netfs/write_collect.c b/fs/netfs/write_collect.c > index 60112e4b2c5e..426cf87aaf2e 100644 > --- a/fs/netfs/write_collect.c > +++ b/fs/netfs/write_collect.c > @@ -510,7 +510,7 @@ static void netfs_collect_write_results(struct netfs_= io_request *wreq) > * stream has a gap that can be jumped. > */ > if (notes & SOME_EMPTY) { > - unsigned long long jump_to =3D wreq->start + wreq->len; > + unsigned long long jump_to =3D wreq->start + READ_ONCE(wr= eq->submitted); > > for (s =3D 0; s < NR_IO_STREAMS; s++) { > stream =3D &wreq->io_streams[s]; > @@ -690,10 +690,11 @@ void netfs_write_collection_worker(struct work_stru= ct *work) > wake_up_bit(&wreq->flags, NETFS_RREQ_IN_PROGRESS); > > if (wreq->iocb) { > - wreq->iocb->ki_pos +=3D wreq->transferred; > + size_t written =3D min(wreq->transferred, wreq->len); > + wreq->iocb->ki_pos +=3D written; > if (wreq->iocb->ki_complete) > wreq->iocb->ki_complete( > - wreq->iocb, wreq->error ? wreq->error : w= req->transferred); > + wreq->iocb, wreq->error ? wreq->error : w= ritten); > wreq->iocb =3D VFS_PTR_POISON; > } > > diff --git a/fs/netfs/write_issue.c b/fs/netfs/write_issue.c > index acbfd1f5ee9d..3aa86e268f40 100644 > --- a/fs/netfs/write_issue.c > +++ b/fs/netfs/write_issue.c > @@ -254,7 +254,7 @@ static void netfs_issue_write(struct netfs_io_request= *wreq, > stream->construct =3D NULL; > > if (subreq->start + subreq->len > wreq->start + wreq->submitted) > - wreq->len =3D wreq->submitted =3D subreq->start + subreq-= >len - wreq->start; > + WRITE_ONCE(wreq->submitted, subreq->start + subreq->len -= wreq->start); > netfs_do_issue_write(stream, subreq); > } > > --=20 Thanks, Steve --0000000000004e126c06190162ef Content-Type: text/x-patch; charset="US-ASCII"; name="0001-netfs-Fix-io_uring-based-write-through.patch" Content-Disposition: attachment; filename="0001-netfs-Fix-io_uring-based-write-through.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lwh6niyi0 RnJvbSA3MzI2M2QyZTYwMjNlNGQ3ZWYyZGM2ZDkxN2UwMWQzOGZkMmExYTI4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEYXZpZCBIb3dlbGxzIDxkaG93ZWxsc0ByZWRoYXQuY29tPgpE YXRlOiBXZWQsIDIyIE1heSAyMDI0IDAxOjAyOjMwICswMTAwClN1YmplY3Q6IFtQQVRDSF0gbmV0 ZnM6IEZpeCBpb191cmluZyBiYXNlZCB3cml0ZS10aHJvdWdoCgpUaGlzIGNhbiBiZSB0cmlnZ2Vy ZWQgYnkgbW91bnRpbmcgYSBjaWZzIGZpbGVzeXN0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