From nobody Sat Jun 08 05:36:45 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vx6JH1jQ1z5NPyg for ; Sat, 08 Jun 2024 05:36:47 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vx6JH0b4cz4LGJ; Sat, 8 Jun 2024 05:36:47 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717825007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=htArBxmRrkC0W/QYAqYG0J6WqUKpVX9j8b5QtEAPV7M=; b=ZVXp3FdhJBIcvqIgYzjRhgItsFWMASP/b8q+Gy32cwISjIsa5gQbV0hR2v5KSJhhl3QjPR SwTpDXVvqfuFyobLnLnj24Cfim7C7KqujHt2VBsx+6Lgkhucaau1zoA/UAiMyqJrsvqeMF mXSLjqAzm6J4lQIW0XhSckSIxy6NpqR/91m5EZf46ON6fls21Mp+h8Ron/Lji9Yx09SpRU u33W/cN8Exmd/nxk/vTg0v4K08t17u1xKEf7Aa+7MBAb3XPLvj0m1zukIS1d/1y+0U62zC KjDZ9Wyw8SgsHj/PxlzFTs3d1IlCb8h/dsSk06Lrf3fJtye4qbxyBTXaLGWDkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717825007; a=rsa-sha256; cv=none; b=hrci9V+9dqoa/tJ4q73IWfcQmWlEZwnQAoD+Unkrybp5H008NXbmy4C5uqByzXHzrn9RTm ISVyncn6hrA0pX/4rdqWIWFB7AqqWWqx/ej/ftzAPWJbRk1GiWeQDrb2R0AJYKzsi1Dp/T XFWNryxi/K2ywR4wxYMSsNh2bpsFQsTfrUwpnC+9VQvb7359ZCjFXWtxSrjkia+sP1f09O 7yt4vyYBiwN106561zb63UTS2SyolYytyMn0XM/lmHv0Any5yNGZ904FsXfSPTU4G7gSb6 tdrJOgkQE+skQ+3+tgoe28d/IGMpDV/MwuZAf1rwrns3zXvd4YPWdIJXUaeJYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717825007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=htArBxmRrkC0W/QYAqYG0J6WqUKpVX9j8b5QtEAPV7M=; b=a+RyxYRByTxETsOE+wNrV1iVOTMAAEoQiO9M2Tyro+I/EMyLHgEBa7KtECihaKl29cbx2F plUHBqQObEwakNBUCrpj5f26oNkNKqPcUBaBE2Mb0AvX4BYuqXpGl+fABgPQ/ZvgSiONou YZj/b1o8Qm87tI/VHoFfVw7iQbrg0PI37LObRBMCJSfcOnmUaCIMvH515t/b7bC516oKRy o8KNH8bb8WpZFEgj/sJCtoCYWrn8kP7zQpD6tNqApJAu5HGIIJA4m8GEmbBN94ehPeeeq8 D5ZV9ugcNeBUk6NzZGaV6i+RooqGUkILozkeUgeIjg1bTcddbDCmyvWB2pqMFw== Received: from ltc.des.dev (unknown [IPv6:2a01:e0a:386:9c20:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vx6JG6ZVCz11Rs; Sat, 8 Jun 2024 05:36:46 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id DE7C13630B; Sat, 08 Jun 2024 07:36:45 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Stefan Esser Cc: Yuri Victorovich , freebsd-hackers@freebsd.org Subject: Re: What are equivalents of Linux ioctl functions FICLONE and FICLONERANGE ? In-Reply-To: <1406f7e7-63a9-4f9a-a2e6-2de71bac65cb@FreeBSD.org> (Stefan Esser's message of "Fri, 7 Jun 2024 11:48:47 +0200") References: <2bcfb025-b639-4696-82e6-bfeb1a291294@FreeBSD.org> <1406f7e7-63a9-4f9a-a2e6-2de71bac65cb@FreeBSD.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sat, 08 Jun 2024 07:36:45 +0200 Message-ID: <86o78c2dxu.fsf@ltc.des.dev> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Stefan Esser writes: > Yuri Victorovich writes: > > On Linux files can be copied with: > > ioctl(destFd, FICLONE, srcFd) > > What would be the equivalent of this on FreeBSD? > That would be copy_file_range(), but as on Linux, it does only > offer any benefit on filesystems that support copy-on-write or > potentially on network attached storage. Even without filesystem support, it still avoids copying the contents of the file out to user space, so it's faster than a regular copy. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org