Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2198869ybe; Sat, 7 Sep 2019 10:43:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwof0ea5KkkV6JV631Dr4Swtt7TreVWAy2Ttp8yLBayU4LwNLNdytETg4lRUjEHXlETevMT X-Received: by 2002:aa7:90c1:: with SMTP id k1mr17616272pfk.46.1567878188651; Sat, 07 Sep 2019 10:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567878188; cv=none; d=google.com; s=arc-20160816; b=TxjOU6738oY2ZmicafcVe5eg6N69JHFik1Noi3XULvwSOWvvxzkwBvwuxeKXr0tP41 OEyBRzM8JREVeK8De97sUBpKo2aVkZlK9BB/i3Hli+53bPt4LA4WoMj8ACHfPN6X+orW f0IbRpfV0QQQf5xC66J3mih/ssw/kIHEvpnRWjsKsg+ve/dYw9jIqmNKa0jGnuc/N+5m YXdGLi1xamAv7Gix1KxG7yBloFnaw3qQXQfLZGcKs2cM0mXO5HOVvFkfDRBoZxNavn5X cG141JR7NzlziEugtSzXLC1uDLR03P6zD2uYIQ9dc2tcZih8wYLFtSr6tazHIOO78Zej L1Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=ipo2D6z0gnLBacph9tAWGHP/GtINH38xaCHihdYZN1Q=; b=MSR2yiHgBYGoQhKmoRA//D6vfmloTejHPz6bV/mtVnEGyekaWGiUZegLSiRE7JfXj8 nTwTQbjapRyTGYwljC95HVDF0oAum06vTntu1VTZqyu7jcSHI1BRoBiRXBNCFxNS6wJK NKgnLj81lJfysbR2mV2gHws4IiwV1Ml514IQz7xcsJSf/z9vmEO3GXfFo5VDyaCzWaST gEOKjbMTTREJ8RNUvd1cG74PW3Ooqzvsm8cAKLV7E0cjjcthWV+KcW3K8DkBer6KCQxM QQwb173Gb5wu75I3p6UG4N7P7rBOvMCHfDiQ+vT8t2+OGW3dOjCWEPIqANbcLjxpiHz3 2jQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W5kuSzds; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13si7442424pgt.285.2019.09.07.10.42.37; Sat, 07 Sep 2019 10:43:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W5kuSzds; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392216AbfIFTqf (ORCPT + 99 others); Fri, 6 Sep 2019 15:46:35 -0400 Received: from mail-io1-f45.google.com ([209.85.166.45]:40218 "EHLO mail-io1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbfIFTqe (ORCPT ); Fri, 6 Sep 2019 15:46:34 -0400 Received: by mail-io1-f45.google.com with SMTP id h144so15380474iof.7 for ; Fri, 06 Sep 2019 12:46:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ipo2D6z0gnLBacph9tAWGHP/GtINH38xaCHihdYZN1Q=; b=W5kuSzdslNz+BXpqRUFfP27E2H8BMq9+JzzEC7y4eMXO0Ry1Le1in6eZIWBpr+g3DH NUCtsOH1QAWiY2r19q7LMcsqZeEfj2QZ+5Sl8/Wk345rsleQMQKdHsvaOxZroo7qRRcq 024Rf4URHF/XWqLKDOzt/i/fU7gUIHt99VUjKCm0I1o2ps3KamWqdo7vLXitRkCSzUsG xkMAReKLYiHdZ+1ss//TZxtnkAgUXSHfzoU9ZktRZNN03V0lEp+Ew2Xz8++KFt4U3Ai7 /1iC+//5DW/o8EhtCjiMaqiwe/TXi5XB/4tPpWkypZXb7QIUgzVQrwLX5r30fYIY49Ex mspQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ipo2D6z0gnLBacph9tAWGHP/GtINH38xaCHihdYZN1Q=; b=s7CmpR0den8sk1o3pm9pdL5fXCbupzUWePCtE2j1Cjydp4XlpriR9vYdUur6Rv6dMx IEhGnQjXXCwtOrYozuKJD+5ZT0uv0IqcWsg76RyTMxbNqlruvZCk2h/OnoUVpDIcAppk t6vYM6pbJdAxBPo7tO0KxjBqFpxh+Ytp1h1qhmfeGQk0mX2p+RwBawwWbSy7wMwXLTPw zM8YPDrGCUr8vP4zzp1yWEOkOu98Z5Ejgq5ixFiDnIs+5/S5hcsrIHJP3MrdUC7hnxLw 1KLcg34KQkZ8XJC0JHXdlu1LujD9e/vqWaLKqhUJJVPtfbbRGnUECHnxxt35u6nWJTgS LO2A== X-Gm-Message-State: APjAAAVGxnaZYrJCVFJiepfE6kFWPNT8YYHuQiVqYyIH3S/05wA5LpAe K4a4aUtizKfq3Eti12Lst8E= X-Received: by 2002:a5e:8c01:: with SMTP id n1mr4539636ioj.152.1567799194004; Fri, 06 Sep 2019 12:46:34 -0700 (PDT) Received: from Olgas-MBP-201.attlocal.net (172-10-226-31.lightspeed.livnmi.sbcglobal.net. [172.10.226.31]) by smtp.gmail.com with ESMTPSA id i14sm5118085ioi.47.2019.09.06.12.46.32 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 06 Sep 2019 12:46:33 -0700 (PDT) From: Olga Kornievskaia To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, bfields@redhat.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH v6 00/19] client and server support for "inter" SSC copy Date: Fri, 6 Sep 2019 15:46:12 -0400 Message-Id: <20190906194631.3216-1-olga.kornievskaia@gmail.com> X-Mailer: git-send-email 2.10.1 (Apple Git-78) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org As per Bruce's request submitting the client and server series together as there is a common patch that's needed by both. No client side changes were made since the previous submission v6 server-side changes --- removed global copy notify list and instead relying only on the idr list of stateids. Laundromat now traverses that list and if copy notify state wasn't referenced in a lease period, state is deleted. --- removed storing parent's stid pointer in the copy notify state. instead storing the parent's stateid and client id then using it to lookup the stid structure and client structure during validation of the stateid of the READ. --- added a refcount to the copy notify state to make sure only 1 will delete it (as it can be delete either by the nfs4_put_stid(), laundromat, or offload_cancel op. basically all access to the copy state is using just one global lock now (netd->s2s_cp_lock). --- added a type to the copy_stateid_t to distinguish copy notify state kept by the source server and copy state used by the destination server. --- previously with a global copy notify list, the check if client has state before unmounting checked if the list was empty, now the code traverses the idr list and looks for anything with a matching clientid (again under the global s2s_cp_lock). Olga Kornievskaia (19): NFS NFSD: defining nl4_servers structure needed by both NFS: add COPY_NOTIFY operation NFS: add ca_source_server<> to COPY NFS: also send OFFLOAD_CANCEL to source server NFS: inter ssc open NFS: skip recovery of copy open on dest server NFS: for "inter" copy treat ESTALE as ENOTSUPP NFS: COPY handle ERR_OFFLOAD_DENIED NFS: handle source server reboot NFS: replace cross device check in copy_file_range NFSD fill-in netloc4 structure NFSD add ca_source_server<> to COPY NFSD return nfs4_stid in nfs4_preprocess_stateid_op NFSD COPY_NOTIFY xdr NFSD add COPY_NOTIFY operation NFSD check stateids against copy stateids NFSD generalize nfsd4_compound_state flag names NFSD: allow inter server COPY to have a STALE source server fh NFSD add nfs4 inter ssc to nfsd4_copy fs/nfs/nfs42.h | 15 +- fs/nfs/nfs42proc.c | 193 ++++++++++++++++---- fs/nfs/nfs42xdr.c | 190 +++++++++++++++++++- fs/nfs/nfs4_fs.h | 11 ++ fs/nfs/nfs4client.c | 2 +- fs/nfs/nfs4file.c | 125 ++++++++++++- fs/nfs/nfs4proc.c | 6 +- fs/nfs/nfs4state.c | 29 ++- fs/nfs/nfs4xdr.c | 1 + fs/nfsd/Kconfig | 10 ++ fs/nfsd/nfs4proc.c | 440 ++++++++++++++++++++++++++++++++++++++++++---- fs/nfsd/nfs4state.c | 215 +++++++++++++++++++--- fs/nfsd/nfs4xdr.c | 154 +++++++++++++++- fs/nfsd/nfsd.h | 32 ++++ fs/nfsd/nfsfh.h | 5 +- fs/nfsd/nfssvc.c | 6 + fs/nfsd/state.h | 34 +++- fs/nfsd/xdr4.h | 39 +++- include/linux/nfs4.h | 25 +++ include/linux/nfs_fs.h | 3 +- include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_xdr.h | 17 ++ 22 files changed, 1431 insertions(+), 122 deletions(-) -- 1.8.3.1