From owner-freebsd-fs@freebsd.org Thu Jun 20 02:08:14 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 370DC15D0A42 for ; Thu, 20 Jun 2019 02:08:14 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 297338CB24 for ; Thu, 20 Jun 2019 02:08:12 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f67.google.com with SMTP id d11so1172010lfb.4 for ; Wed, 19 Jun 2019 19:08:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1bZ7yoTDcVdMOaKyMVVHS9VvPl0V0roPIi5MFusPC8U=; b=UZ09M6uLlWeOsKR0pT9B6oQlPiP8JqQXRauqH/BvFGtO75w5joGn57BFtn4dPOTJTs e0gYSrg+dyaTvwOCaOOWWMN2E9wEH/dOdllShHV+COEhluv9FI2MP5qFNvqTzrlJ4vRI kP1w3qwz93gcb5Vv6tQM6TqB7CjxrbdppetruHsit4UREVW57lJsnI4gukR/rWoZ0p4u f1g3S4L3K2J1N4YUXum3Ts9XDezRySiJfAY3HvJt2WEqFkBpBwsNV2PjpvIdW+JhoLig L4sVfKT4Baun0gz0rk8tw3h73G3sQTjvOG5GfRIluwqGN7TE2JbULT2VfcmWskMYyFl1 d0Tw== X-Gm-Message-State: APjAAAWk+ZwGvh9QMvAybOpm2awyTV2ukZWNl0mxWnZYxkGgyBq61YWx iR3ZIpG2xLDqk7POzexSFX/NbelTuB6RPWTGfNeZaQ== X-Google-Smtp-Source: APXvYqzvJqJ9HtbLuHi1bfOqbyyZ08Y6MvpuBhS8xBHZQpYnaE8t9Pwt3ExQWKBye2dFs+kloSjwou7XqDFUUDPeHAM= X-Received: by 2002:ac2:5609:: with SMTP id v9mr6995880lfd.27.1560992118198; Wed, 19 Jun 2019 17:55:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Wed, 19 Jun 2019 18:55:06 -0600 Message-ID: Subject: Re: RFC: should a copy_file_range(2) syscall work across multiple file systems? To: Rick Macklem Cc: "freebsd-fs@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 297338CB24 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.67 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-3.16 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.89)[-0.892,0]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; IP_SCORE(-1.26)[ip: (-0.52), ipnet: 209.85.128.0/17(-3.43), asn: 15169(-2.31), country: US(-0.06)]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[67.167.85.209.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[67.167.85.209.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2019 02:08:14 -0000 On Wed, Jun 19, 2019 at 5:56 PM Rick Macklem wrote: > > I have been working on a copy_file_range(2) syscall for FreeBSD, which is meant > to be compatible with the Linux one. (Current patch is at > https://reviews.freebsd.org/D20584) > > One thing the current patch does do is allow the kernel copy to be done across > multiple file systems (ie. source and destination files on different file systems). > The Linux syscall *may* not allow this. The man page specifies EXDEV as an > error return, but discussion of the Linux syscall suggests that it may be (or has > already been) modified to work across multiple file systems. > > I thought that this would be a useful feature, but does require the default > code to be above the VOP_xxx() layer and *might* not be Linux compatible. > (The incompatibility would be working for cases where the Linux syscall might not.) > > So, should it work across multiple file systems? > rick I don't think there's anything wrong with it. Do it.