Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp174880lqh; Mon, 6 May 2024 15:30:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVLDvN3lbq3wKiLRjAW7XXcd1g/oJyHqob89Fnp1IZ33Gz/5n66qE2z+kwEoLhWAaM1MZT7d6oda861JyUkXn1Iy7QsArMxAKRuvKl1sg== X-Google-Smtp-Source: AGHT+IF4vZxy5FzEyBE/RRWjdd1HsmpLwOsfSJo7Pc4yP3A8Tcc/J8WtSxqFNsooEkU4alsG52o7 X-Received: by 2002:ac8:5d09:0:b0:43a:9717:3056 with SMTP id f9-20020ac85d09000000b0043a97173056mr13397129qtx.43.1715034634303; Mon, 06 May 2024 15:30:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715034634; cv=pass; d=google.com; s=arc-20160816; b=l9bCaKYa1PF/QZ13AuEgJZ2P0xi5N/GzPmb+ZTgUuLk+wlvTdVC7r55SreIwXIYIwV +Rg9iEz6p7RRY6xA4L9m8VsgePgJYqLykI9WcR47Quu5awK+YGK385fXavsgiDziySJB qoJ//BmaVkaItLxERKryfh0WR1PmyWc5NUvkDj8yUnH0bIbLd2uJK5/bg4r2omix+Lyf 9YpD4s4K9VraDaIZ7IpCHCREYmgH6tRU/SNdCwKYePzML/UFow9XASSWFwvM5AxzpSJy QqNEWsk219FG3R5timVhWZHbAZCfejt+CBztYLD++adYkR1GnGeNWCDs/VyH3HCJ8OPt sa2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=SL8mhv2osU3THN541lB0ZFFcRSmEBSefnLk6zp3NcHY=; fh=J6ZAGzpPGSEPMwE1qFgXBgGS5voWko8T/Irp8bh/Xwg=; b=F9B4VC/EID2NBXVIQ3VWFJxOdj0gCKFOgsKapgFrCLLgWPC7FxrKq2a4U214mKxoaI kFdUpEobmx39dFhskTjCeY8Gky4aETB3aP0b2wg7XTKCoSjuvYKY/LH1r5cCYBI4+N1l miPx7avd2EP+IM9EH4TkEbBNcNbAc3QSgGJvUtLa/KbxGLGl1vY4mhOSq2IcibG8Mflv pVe3EwPC95HYSJeYX+lGZrQVrO20CLzq+bsxCrOCkb/udEYxPLNMUfoorwps0bth3asW HHEKeYBstrRXaQmY99fMqVEHnCOTsPYmPvE+F7QvTbAR+Pk07RqpjdC7E6uJfFVBLlj1 GYUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SFbI8poQ; 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-nfs+bounces-3185-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3185-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 20-20020ac85714000000b0043af9c55a7asi10817538qtw.687.2024.05.06.15.30.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 15:30:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3185-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=SFbI8poQ; 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-nfs+bounces-3185-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3185-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 F08151C22922 for ; Mon, 6 May 2024 22:30:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 024D04CB58; Mon, 6 May 2024 22:30:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SFbI8poQ" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (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 99C234438F for ; Mon, 6 May 2024 22:30:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715034632; cv=none; b=bYE/226bWUi3+Tv0O4fhTzz/sK2Itycc+2d/nkRWALSPSg65YXBrplbbVqdNkYfFygghkMx7L3qQShi8J8DXWvpu2ofMEcaOWLIVyyy0byrNDcEs6KAxH6UAqvYaKigPUEiFl4gRi2P0O2Zfi0/BFNQHGnERhnjIQIRCZ5L29RE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715034632; c=relaxed/simple; bh=bRWOsZwo04z6zRLIKWHN6QzI5yyn79spskI7WUDs56o=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MvwxuBjGH6HJu2WE0NIKO+2MzhNHsfPGOCMQ1LLJC5tJC4HTO9H4kcK6giY+xcqs12JCvsBKttPMkHgvi9JSuo6seaBmMt8hwFWD1fsj81Kg7u8eJvQeC4EvCfrAZTgvgTYywDPcWnJlO8HP1UuzTLDkOChw6vA0SIed/PN8rVA= 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=SFbI8poQ; arc=none smtp.client-ip=209.85.215.177 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-pg1-f177.google.com with SMTP id 41be03b00d2f7-5d81b08d6f2so1995280a12.0 for ; Mon, 06 May 2024 15:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715034630; x=1715639430; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SL8mhv2osU3THN541lB0ZFFcRSmEBSefnLk6zp3NcHY=; b=SFbI8poQXxND7tD19Ho2gZATOi1Q5xOokDRqmVZZRmQe4GtcZxH5lvNYDOlkykt07j nGu/NZiRhWIRZSrSQRo9sZuPlkkDNxW9X5wA4XzjRwlWtSJkTBLiP3ak6ad12TVAnp/M upddMuE72aQl12Ean/CVQohEU/+FQxRsUBS+S5VUNK1w8Kt46kRgb+LRVzNRtlIV5lwn ni+rg4KWHfL7iqMciC5I1F0xcuGehhbJMR/YWmvuDnbpmX+FcgEJrUNz6jrTlJcPkha3 1NGu5tPOiPScht/6KiWQyEaTKMgtpaolaYifv+lMUfsfQvS64aNR3ELzx+znVV2oeA2H 4raA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715034630; x=1715639430; h=content-transfer-encoding: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=SL8mhv2osU3THN541lB0ZFFcRSmEBSefnLk6zp3NcHY=; b=RAHtYtlYQbqQKhzvrdtRRxF07VC+NxnWG02gFc25py/AuxwzMwQgx/Q+c4QYadkXU5 IWWKCK/ZYDfFTXTRgSTgh0+wWO4qXp7z0B1HsGvA+hbgGM/2+zMAvspmqVRv6M/HGrDh C0JIYEfcw7cM41N//LsCeLReabmuXL7MZ91UWGv4Cbu45yKl4sW1bDbEtcZAWSRMN17S w2r9cRJApIzH0KU+ybCuM2a5WS1RPBwaY44nt+3VXcDug2ai8Pp2dMO39Cr1KuoXDhBj /rLT4ZobCECFS3SzHLi7wohiqeH+hYjklvE7OYQGfhkwnArxJ8R1LUrrxZwhcnRL2Ge5 oKaA== X-Gm-Message-State: AOJu0Yzg0AkTtuTgAyiGQPuMBbJn36iqFPqcuiDFdanYGFpISQ5wrAA7 CE2t+QSThl0Xe60W327Iote6nqaProUGDlQEvZmMz7tfdNs6OwwsNoVZIMU19yHTYuJxPWDXqf7 k4Ce+ul8605OODg1oIG9kFUaVI403 X-Received: by 2002:a17:90a:8b81:b0:2ad:f278:77b4 with SMTP id z1-20020a17090a8b8100b002adf27877b4mr11282090pjn.23.1715034629750; Mon, 06 May 2024 15:30:29 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240506210408.4760-1-cel@kernel.org> In-Reply-To: <20240506210408.4760-1-cel@kernel.org> From: Rick Macklem Date: Mon, 6 May 2024 15:30:18 -0700 Message-ID: Subject: Re: [RFC PATCH] NFSD: Force all NFSv4.2 COPY requests to be synchronous To: cel@kernel.org Cc: linux-nfs@vger.kernel.org, Chuck Lever Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, May 6, 2024 at 2:04=E2=80=AFPM wrote: > > From: Chuck Lever > > We've discovered that delivering a CB_OFFLOAD operation can be > unreliable in some pretty unremarkable situations, and the Linux > NFS client does not yet support sending an OFFLOAD_STATUS > operation to probe whether an asynchronous COPY operation has > finished. On Linux NFS clients, COPY can hang until manually > interrupted. > > I've tried a couple of remedies, but so far the side-effects are > worse than the disease. For now, force COPY operations to be > synchronous so that the use of CB_OFFLOAD is avoided entirely. Just a yellow warning light from my experience with the FreeBSD server (which always does synchronous Copy's). A large synchronous Copy can take a long time, resulting in a slow RPC response time. A user reported 25sec. The 25sec case turned out to be a ZFS specific issue that could be avoided via a ZFS tunable. I do not have a good generic solution, but I do have a tunable that can be used to clip the Copy len, which is a rather blunt and ugly workaround. (The generic copy routine internal to FreeBSD can accept a flag that indica= tes "return after 1sec with a partial copy done", but that is not implemented f= or file systems like ZFS.) Although there is no hard limit in the RFCs for RPC response times, I've typically assumed a max of 1-2sec is desirable. rick > > I have some patches that add an OFFLOAD_STATUS implementation to the > Linux NFS client, but that is not likely to fix older clients. > > Signed-off-by: Chuck Lever > --- > fs/nfsd/nfs4proc.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c > index ea3cc3e870a7..12722c709cc6 100644 > --- a/fs/nfsd/nfs4proc.c > +++ b/fs/nfsd/nfs4proc.c > @@ -1807,6 +1807,13 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_co= mpound_state *cstate, > __be32 status; > struct nfsd4_copy *async_copy =3D NULL; > > + /* > + * Currently, async COPY is not reliable. Force all COPY > + * requests to be synchronous to avoid client application > + * hangs waiting for completion. > + */ > + nfsd4_copy_set_sync(copy, true); > + > copy->cp_clp =3D cstate->clp; > if (nfsd4_ssc_is_inter(copy)) { > trace_nfsd_copy_inter(copy); > > base-commit: 939cb14d51a150e3c12ef7a8ce0ba04ce6131bd2 > -- > 2.44.0 > >