From nobody Wed Sep 20 22:07:45 2023 X-Original-To: freebsd-fs@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 4RrXhw56vkz4vFKx for ; Wed, 20 Sep 2023 22:08:00 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RrXhw0DZwz4VDc for ; Wed, 20 Sep 2023 22:08:00 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.217.45 as permitted sender) smtp.mailfrom=asomers@gmail.com; dmarc=none Received: by mail-vs1-f45.google.com with SMTP id ada2fe7eead31-4529d1238a9so180686137.3 for ; Wed, 20 Sep 2023 15:08:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695247677; x=1695852477; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uCLWHmV+gOeM1eg38m9ZuYEDsnxaCT5WcJs5MUK9/mo=; b=bg9MdV9Cb55V06isrTvjdikOUD7Gcnz4eTFVGLDnoDjofUNKAUtfVE3vk6M1fhsUMm 9rSsZ9bjjVfC4IdGz3f0zdkDgkcpHFQ8mk8AD2d/SCegIltiai2/fJVOPJ7Xtyh5Lzax iKNTaNFw+gtolPFzTQvX6z546h6otT3260s57+Zei9nqaXUvMLkg+IEd439SsB9kFfnN oa6UEZWS5s5Xdcq3ZGqHBMODHML1Dk5b8NTT/5cyZXNaIRWWezEn5qF5rEpQkMEyS7SA vvkfk6ZPh6BwmBW22QcqhYTBUHsieRD/+5sfIF+GRRyTMXWqJon8Pcgy7t1t09eX/pv/ pS6g== X-Gm-Message-State: AOJu0YxmeApMitPNoBx80kwrZvXa2B/YPUeFDyNYZAKfMY1Sn933KGxm ZA63AjFxBXSlaNCLRlPvcWIN0oMx+KiaKfZfMj4= X-Google-Smtp-Source: AGHT+IEOhBEzYFUHRqjB2D/vnX04wH9sODQ2GLjYTPCDEScRU6xOPc0u22teZewr65RZy5RlwNp2pc9x943+3ntrwwQ= X-Received: by 2002:a05:6102:3c7:b0:452:6d7b:a9e with SMTP id n7-20020a05610203c700b004526d7b0a9emr3618498vsq.19.1695247677316; Wed, 20 Sep 2023 15:07:57 -0700 (PDT) List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Wed, 20 Sep 2023 15:07:45 -0700 Message-ID: Subject: Re: RFC: Should copy_file_range(2) work for shared memory objects? To: Rick Macklem Cc: Freebsd fs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Spamd-Result: default: False [-0.90 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-0.96)[-0.962]; NEURAL_HAM_SHORT(-0.51)[-0.515]; NEURAL_HAM_MEDIUM(-0.43)[-0.427]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[209.85.217.45:from]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[freebsd.org]; TAGGED_RCPT(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEFALL_USER(0.00)[asomers]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_COUNT_ONE(0.00)[1]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-fs@freebsd.org]; FREEMAIL_TO(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.217.45:from] X-Rspamd-Queue-Id: 4RrXhw0DZwz4VDc On Wed, Sep 20, 2023 at 3:05=E2=80=AFPM Rick Macklem wrote: > > Right now (as noted by PR#273962) copy_file_range(2) > fails for shared memory objects because there is no > vnode (f_vnode =3D=3D NULL) for them and the code uses > vnodes (including a file system specific VOP_COPY_FILE_RANGE(9)). > > Do you think copy_file_range(2) should work for shared memory objects? > > This would require specific handling in kern_copy_file_range() > to work. I do not think the patch would be a lot of work, but > I am not familiar with the f_ops and shared memory code. > > rick This sounds annoying to fix. But I think we ought to. Right now programmers can assume that copy_file_range will work for every type of file. We don't document an EOPNOTSUP error code or anything like that. Does it work on sockets, too?