Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3269201pxb; Fri, 12 Feb 2021 13:52:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/5V01jqVStnhtGKtk/gBYI4e7EuhTWCGNZhWTo8o02BgnJVsKftJgw9wNPZxB5wNfiO+3 X-Received: by 2002:a05:6402:5207:: with SMTP id s7mr5201609edd.311.1613166766980; Fri, 12 Feb 2021 13:52:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613166766; cv=none; d=google.com; s=arc-20160816; b=QOaD8Yhhc91KAaozPz2rcM8p6Ukd9zLCtWddRrE1/SdAu+LMUb8QGrJkGckoLRUW04 07TUb4PIlbfotLis17WvBUtNyv/elLYd60bOy0jWSwU4xOCXifNeg9USAQWEQYbucU7a /yn18A3lfa8uqFv6wEPU2TtAJ5d5avkmZZczK2Ir9bHm5TKp+GThwhHoOQyoyyfKS7Se MKYEepRPHjMmGr3DoE6HEsRxtmimUusLEjb9YdELzYO0LxhKqPGNtx3sve/Hl7NNNKTt oNRwLx2iDt7l6WO3ToE6VAgjQQf6gNYVZwXFz9vVkbqvaTPwZtMwevJkwudh6rgMFgdi R1Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=y6zjcq5mLqpIhE/TPpdbeT/ixNKNBOxUVc1bXkHgfNY=; b=e/sgPD2sD9pxC7LkTZlPIpl9RRwl6y1GJGTonQCpfqSQUAb0vy7/2dJ0zrvBkMBgue 6PcJCqjln5WxJVwLlRTMrqopc/gNcuHs63WGHhlaEMwvrOme7yaXVf5O3JGPxHYnud/G cVLAwx5YOs06f64JKIEsxV/e4stCCz4wgRmlRoAsJCoyR34lE8RLObQcHmV6Yh2/4AfZ t/dfMtGz5kGAhkahCdzjVBqa+NZeJIPlWtFwILTyFSwdkzcW1JBfe2jg0giPTTDTuHh5 xqXSyFgXbqdHY0NGTh056Mnn/JDxdvG9NRjbKP5363mAoXGFvK4hM8PKGIHMNpU6Uo0h gICA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fgvTonH5; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j22si8168471eds.507.2021.02.12.13.52.14; Fri, 12 Feb 2021 13:52:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fgvTonH5; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbhBLVug (ORCPT + 99 others); Fri, 12 Feb 2021 16:50:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:36306 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbhBLVue (ORCPT ); Fri, 12 Feb 2021 16:50:34 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D477064DC3; Fri, 12 Feb 2021 21:49:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613166594; bh=m+fwjh51Us2Om+mXfTMMSZ2vuJ+HGOAS0/aM8AE0OwY=; h=From:To:Cc:Subject:Date:From; b=fgvTonH5UJBEnTaPwaboO3oGWQpfY22CuBZsybasXVmPLk1wS7k6dp5K+t4JlbsND YxQFa5D1RhDpp80xk3CEvV07TI8p2wXBk4exPiQHYTz7gxVmBgVGQqfREPS29OIJsF V+IQAQKXf1KavzkRDL9+FbVpsnxbTPxG669l5h/q5wb5iTGqjxpoXVsCblxYp0hakf 6O+OWWtH0hj+71UuCmUQ1xuD+L0dcAB0CosgL4/+nwFpuDIFD6WAgmDZZMWLWQR5S7 7bpG120eDSUSO+qTcqewf9pjlz3OiEO7rcG4nTLRmj3s8j4PgeujJVn9Uc1tqZ/43C v3SICxyeXVccQ== From: trondmy@kernel.org To: Anna Schumaker Cc: linux-nfs@vger.kernel.org Subject: [PATCH 0/3] Add a mount option to support eager writes Date: Fri, 12 Feb 2021 16:49:46 -0500 Message-Id: <20210212214949.4408-1-trondmy@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust The following patch series sets up a new mount option 'writes=lazy/eager/wait'. The mount option basically controls how the write() system call works. - writes=lazy is the default, and keeps the current behaviour - writes=eager means we send off the write immediately as an unstable write to the server. - writes=wait means we send off the write as an unstable write, and then wait for the reply. The main motivator for this behaviour is that some applications expect write() to return ENOSPC. Setting writes=wait should satisfy those applications without taking the full overhead of a synchronous write. writes=eager, on the other hand, can be useful for applications such as re-exporting NFS, since it would allow knfsd on the proxying server to immediately forward the writes to the original server. Trond Myklebust (3): NFS: 'flags' field should be unsigned in struct nfs_server NFS: Add support for eager writes NFS: Add mount options supporting eager writes fs/nfs/file.c | 19 +++++++++++++++++-- fs/nfs/fs_context.c | 33 +++++++++++++++++++++++++++++++++ fs/nfs/write.c | 17 ++++++++++++----- include/linux/nfs_fs_sb.h | 4 +++- 4 files changed, 65 insertions(+), 8 deletions(-) -- 2.29.2