From nobody Wed Sep 20 20:47:29 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 4RrVwH6H6Sz4v8qm for ; Wed, 20 Sep 2023 20:47:43 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) (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 4RrVwG04LPz4LpW for ; Wed, 20 Sep 2023 20:47:42 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=GGoh6Cep; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2607:f8b0:4864:20::1036 as permitted sender) smtp.mailfrom=rick.macklem@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-276b9d5ce1dso111674a91.3 for ; Wed, 20 Sep 2023 13:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695242861; x=1695847661; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=PqKJ+fqQWYJJW17HCvsxvp9ekHv49QPOVAfjtFT9WvU=; b=GGoh6Cep+BBbrfc1HkjYh9BtZHnGatW2fdOTwxAql3NGeMePlwznMO8R7ntN11QW4Y n7SUfeklWNuNtgqoCTgsjBCYJozT23p/4YR1rGDkctos+WZF05H/ImqQ2G4Afe2AdMxq B9/UW3OPA8zEa5Ac9NTQkKciy2U/rfibCmDAkeDl77AXSt0QmJC/k/Mo///G/rIq+S2P o2AhdBOVuqdubH69B4rNwxeFzzoVQkkiLVNzTxvMqgFqrV38eOAcw/2dA66sDQ1jg51p QCS8Rlv2yQKdsVWh3Q34AVUEzgP6OeUo/FgNWBNNZCNYrnZ8gtWSqs1KcfOzCIuhYqMn fS7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695242861; x=1695847661; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PqKJ+fqQWYJJW17HCvsxvp9ekHv49QPOVAfjtFT9WvU=; b=N6MoIiiHv/xOkeDyXKwGGIre91OLIpgMy1IL7ExiHae8LUl/p09QgAO+0vnjH++1KQ h40dSLvoy7UItm0YnMCsSqu09UpdLWL5d6v9wswJcH/hwDvnQePOWGYrA0Yx9ZQT3vfA bfj+tVv5xa3EqVReJetRhZGJ/LATR/9RZUQO93czn6T5hUfrbTtf4wdnbkpp4R4AYksX Bm+uTj4/SXwkrtaT52Hh5nBkN4eVz8+At0ysez2XL53Se/QJrGDXM9whB95mumR+Yqz3 Z63jmTPtsbB96eJldO9ZaCJdaZnr0RHIijc3a32x1MONU+UMQTg2OZPuYqexpRc8DbSp ZMkg== X-Gm-Message-State: AOJu0YzISjJxQU9QIqywg/GFA7LlEMya4grxFhic9R3eLBjGLGlU9iJR 4k4Nc7lwd5FRqHq1uYMjhY8ktjc3l2vaKwVp1/e9RUM= X-Google-Smtp-Source: AGHT+IGEV/4EFG9BTdMbIa1PKwBRtGJuTVuuhH9zNt8HReg78YFKtq2Df/SF0lMe4MBALA45A8cTQgGFbAT92FkCwvI= X-Received: by 2002:a17:90b:f12:b0:26f:b733:6887 with SMTP id br18-20020a17090b0f1200b0026fb7336887mr3485471pjb.27.1695242860736; Wed, 20 Sep 2023 13:47:40 -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 From: Rick Macklem Date: Wed, 20 Sep 2023 13:47:29 -0700 Message-ID: Subject: RFC: Should copy_file_range(2) work for shared memory objects? To: Freebsd fs Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: / X-Spamd-Result: default: False [-0.37 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_SPAM_MEDIUM(1.00)[0.997]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_LONG(-0.36)[-0.363]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; BLOCKLISTDE_FAIL(0.00)[2607:f8b0:4864:20::1036:server fail]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; TAGGED_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1036:from]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-fs@freebsd.org] X-Rspamd-Queue-Id: 4RrVwG04LPz4LpW Right now (as noted by PR#273962) copy_file_range(2) fails for shared memory objects because there is no vnode (f_vnode == 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