Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1817968lqt; Sun, 21 Apr 2024 10:38:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVBs0O/2EccDjVtW32uDDvZPKA2VYRSC++WVLVd/N9Vj+qgGtE3ya3Y65M1LTvMCxkZtISP7FqSzg+5ZOwpwN6R9QglTiYmg+tZpQnk+Q== X-Google-Smtp-Source: AGHT+IGgxwNT8csfq4h8u1Uj/cKIBIZB7s87Pa4epE/ATA5wU75J3zsXGjjIQiv7dxVIAL8/vXqG X-Received: by 2002:a17:902:e54d:b0:1e0:157a:846c with SMTP id n13-20020a170902e54d00b001e0157a846cmr8846528plf.55.1713721093898; Sun, 21 Apr 2024 10:38:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713721093; cv=pass; d=google.com; s=arc-20160816; b=P+cr7Wh8X6rt1wBeksVq9LcTr8tkb7qkJCe4bkpeeIioF9Ve0lW1dWjyVdVTOFTHfo gypGrYjOngOR43RwLvbcT66XY6HAQb7am9xfe7q/3aSX8f31hb/jtusrxqrFdG82TsC6 FdwXAFbyQztESPhNa4JDnkINImXvYUCOfikjFe22KS7A20SBb9m1ZZGu+tgXUkJUlU1E 45U3uILX4eQ4sX8kwDOP3hO3JgW3e5rzzlETzPFKJYfYLg+GdRb3EdbyE9T9ezSL3Ps8 /Sqkf4zSs3QGWw2ASS+JBFZv38u+nVGkd6nqGlPsPBfps7crsbmAVWM0iOmkrqCixA5C e45w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=U9AJwS6ZdJLTyDq730H5hbntIx3POOi7W8tGiTmxpoE=; fh=Mys3y4MwsHRytUQMpdfGBn3oGRYLcLloxNwkFYMYMmg=; b=qZjMAgyliRry/9NoSNPEIVpdqHSE1Uzc2VSxKEa2EOiWie6LwlOq5XKH/VHYqrZ0vf qnUaVMvkX/gAdOXdinN7Y8S48Rn/4++1Bb9GxviR1enohVy3J6fbWPzVGgW+lpCwjWuB hcFHunXb5h38ffuCb1gsDGZP6b6jV4dTCYqgiheaHtCAXTP21Ed74SxyCzx4vx3Qf/TF 6gnEhb+r1lkeXs/bFcB8o9sH8cp+z2zKouH+YAi3wCCRi+7fDul/AtgOndU1kScF8zvw DQI16bIZzhwQv8s5jkTdYeDdl93YZQBfo8ebVBcBZCE0RinRoByIFiwTkRDTrL2L+5Tl fvzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=miKZRurh; 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-2905-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2905-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id n8-20020a170902f60800b001e3fb40060asi6643973plg.279.2024.04.21.10.38.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 10:38:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2905-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=miKZRurh; 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-2905-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2905-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 65149B20C50 for ; Sun, 21 Apr 2024 17:37:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 794C729422; Sun, 21 Apr 2024 17:37:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="miKZRurh" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) (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 09AC018637 for ; Sun, 21 Apr 2024 17:37:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713721065; cv=none; b=mYrh3RXUUt7ieql85xqzKtJGWzQpvqw8MVT8DIbXWAzJKX2rRPMkWvsHf17D4fdd0Q+JRwyLNXTxrmE+IijXlHYeb/OJifkjKI3Uj9bWh6RcCc1F4DJa8Z1LkwgCkzIp6ku1T6qs5GGGyJaIovnEzMc86K2j/x2Nt7oMiVWbhXE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713721065; c=relaxed/simple; bh=U3pHr4BKThf3fFeo5ARl7AQV+RJh93tgCSfRe3eA7r4=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=dAQkdODLSRPTawxOS/dFxhsPe9i00qlkifvcNoa1zg9NbHjGLo4Nab1527cBJSN8obwRugYsF2OuILj8vpNBjEswe93SyUG7gVKGTXgmxmQLDbg5ENTtKhInk91XJPA4jfB8zEyu5w3Vtz6tZgJipk5Oi1E0ylYEPuRCGF0RmoA= 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=miKZRurh; arc=none smtp.client-ip=209.85.128.174 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-yw1-f174.google.com with SMTP id 00721157ae682-61804067da0so37374937b3.0 for ; Sun, 21 Apr 2024 10:37:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713721063; x=1714325863; darn=vger.kernel.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=U9AJwS6ZdJLTyDq730H5hbntIx3POOi7W8tGiTmxpoE=; b=miKZRurhj2xsg5RV2QVMf1mssdPz1y92g1LuMhXlmP+FmY0Es/e9sEb4xhdCQWvT2T GO34KM7xiemktPyjs+/yUSwoI9ZiHoQH6gY+COLJrkK/5itc7Z4fJiJlpXj6TJM+tjF8 Cr2GqP5HQ4PVy56OrxNiqbuPD8KddBH7dN3JDnoEoZXdqWxLb9d2uWEj7S6nttLc24r8 vMsi0bya+eUE+P3D/QObFacey8LTCVKzjujJoF4SUfjgVHRJpldTxqlUcSEYoaCsLkP8 qOdbgJKBTgXuLFxhKAT9O1jiicPtN/teCLgPxNaEydxEAeoRIP9KHt1EPL3OdIFdLGrm l47Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713721063; x=1714325863; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=U9AJwS6ZdJLTyDq730H5hbntIx3POOi7W8tGiTmxpoE=; b=hkFQjwLek+ESU9bE6ygWNCddZuJCngpMDu0mqOdoxU+R/rzk821uoMmQ2lWrA61so4 M4UvhsUChNxBbpSVCQG1Xe6vhYY30diMKyAHwA2gkYePHPT+5zR0cn7O/rNInnjA6Qra mU2TEAOy+bA9h6rp9XuChv0R5iHePIQNBbJotu3DBfZ+UHuKW8Cd2uLnGr9RrtVipc9q XcIfH/6aTxNK6FGbuMuP8GF008EKMH7KlWyaLP8hODXVJCogIP2XP/5tcgXZJVnVQEoN sGu3i2TfBZS+G5Zgp2hYV6LztYFBYEFJqGdNEk1dqHUO26EGmtbbNgzMxbwD3zcbSR4W IsCA== X-Gm-Message-State: AOJu0YzRohP8xfBC6TeeehnEtXSTK7JIIGYRB8K0EHlq4d52ZwBkWU1T 6dy/cfWlBadGFnK+GIu3EnCpEHcScLC9sG2jBmuNTCMIIeNvwJADt6Xu6n9lguYUKF5pGCUcUAE COP00asY12WuLXWWt6LL7Ep1WxT25Xo0= X-Received: by 2002:a05:690c:6f02:b0:61b:11d5:a675 with SMTP id jd2-20020a05690c6f0200b0061b11d5a675mr9573895ywb.32.1713721062776; Sun, 21 Apr 2024 10:37:42 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Robert Ayrapetyan Date: Sun, 21 Apr 2024 10:37:07 -0700 Message-ID: Subject: NFS server side folder copy To: linux-nfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Hello! Attempting to understand the implementation of server-side copying of folders mounted via NFS 4.2. Currently copying an entire folder (cp -r --reflink=always) produces: newfstatat(AT_FDCWD, "/mnt/source_file", {st_mode=S_IFREG|0644, st_size=2466, ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(3, "dest_file", {st_mode=S_IFREG|0644, st_size=2466, ...}, 0) = 0 openat(AT_FDCWD, "/mnt/source_file", O_RDONLY|O_NOFOLLOW) = 4 newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=2466, ...}, AT_EMPTY_PATH) = 0 openat(3, "dest_file", O_WRONLY|O_TRUNC) = 5 ioctl(5, BTRFS_IOC_CLONE or FICLONE, 4) = 0 close(5) = 0 close(4) sequence of operations for each file within the directory on the client side. Notably, the actual file copy occurs on the server side and is instantaneous (BTRFS_IOC_CLONE). But for TTLs around 50 ms (such as within intra-regional connections like US West/East), copying a 700MB directory containing 500 files takes about 4 minutes (while "true" server-side folder copy is almost instant). Exploring if there exists a Linux mechanism enabling the copying of an entire folder without individually accessing each file within the directory for server-side copy operation.