From nobody Mon Oct 17 22:33:07 2022 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 4MrsG00Mbcz4fw7b for ; Mon, 17 Oct 2022 22:33:12 +0000 (UTC) (envelope-from bakul@iitbombay.org) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (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 4MrsFz24PSz4JDn for ; Mon, 17 Oct 2022 22:33:11 +0000 (UTC) (envelope-from bakul@iitbombay.org) Received: by mail-qt1-x82d.google.com with SMTP id cr19so5418946qtb.0 for ; Mon, 17 Oct 2022 15:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iitbombay-org.20210112.gappssmtp.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AeAYBitEidrB36GI8XYTy+Sn4BADB/+AvsV165b42+o=; b=FHI9Ry+TYbzSOt9gjCjM0m2m/8vDnQtnsi3kbz4dzwd9Vw+j5pyVzBNArdAQS4opFg IXywr3gXYdmsH3nQc4oJvC107qsvhLhjYT0NmXgxaEeXE8jAG23xgNH6C7cmLX3xSHzJ vEK/KkF3UOl2DGcI6o4DrzmPCdO563K/RoIxq03DFeF8599axbtzoHKDv46ySvqsHWKw z52yjzQ3pTkbEKAptYy46txgrUtA+Eg/ohuIInxE//jjUF0jW9SfCn0WHFOJAwK0B/bl heAofNuGQnYIQHxerXssqHmOxwkcV1T1uzt/G7tZRjDfHzZxOUJf5+UG7rsCFvqItixL jfMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AeAYBitEidrB36GI8XYTy+Sn4BADB/+AvsV165b42+o=; b=QMA6nP1n2jOFNn3BzwOJdd9E5KOVl0qxZmhyTN1nCM5EgGZTQgQMPHnO9Kp9QePIAn Dfd9BXuwrShCNhdWq1XXhvZp9j2fvNZOKQoWwvv4faLq9kvYc7e13sbVpflRkjSLAU4/ Ekz5VX6hbru1zpcdCfOi45MtZnhAGL5NLn2JKZWIbly1h73effSFs4PWWTFreBykq26d dSc6qSdT2EvLEkB71dxiDTRc5TKKjtYQUgT/T1bW2TuOCn2i+jc1J3v5Oj7D4f5n/ojw qGvfjmHkmqu8R9QfBVHP2XD2vkzHrmURrZerGmtR9ELe6rfMudamg4j+3u49The3jvW4 tLfw== X-Gm-Message-State: ACrzQf0XeeoVzfi2g4RT8s/j678XYUoXWWercdFZ/9QKH6yZMPESm8Dn rA/tsKyKd+OJgReiykAU7RZtXxBMXf346w== X-Google-Smtp-Source: AMsMyM6CtkNzhfpnILOjgpX60Rg4stE1+vcKzPCBbfYvHiVAolyJv2W01DcbeicoBgiDf8u/X/jpaQ== X-Received: by 2002:ac8:7f06:0:b0:35c:f532:3346 with SMTP id f6-20020ac87f06000000b0035cf5323346mr10797683qtk.316.1666045990072; Mon, 17 Oct 2022 15:33:10 -0700 (PDT) Received: from smtpclient.apple (107-215-223-229.lightspeed.sntcca.sbcglobal.net. [107.215.223.229]) by smtp.gmail.com with ESMTPSA id v21-20020a05620a441500b006cbe3be300esm899104qkp.12.2022.10.17.15.33.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Oct 2022 15:33:09 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: VFS mount rollback for virtio 9pfs From: Bakul Shah In-Reply-To: <3E450927-1932-412E-A568-A2F84582BD26@dons.net.au> Date: Mon, 17 Oct 2022 15:33:07 -0700 Cc: Felix Palmen , freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0C98D486-6A8F-4DF6-8AFF-F3B84E631A84@iitbombay.org> References: <75ACE8B8-A41F-4742-95DA-3CFB3B97746A@dons.net.au> <20220714101214.sju2rpsngqjyuvsb@nexus.home.palmen-it.de> <20220715131656.f2epy732npgbgrf5@nexus.home.palmen-it.de> <20220715151509.d2v6kqkjsnrxtprj@nexus.home.palmen-it.de> <45451C7B-7A12-420F-B6B0-19F2FA98D056@dons.net.au> <20220718065304.cx2o24tshzgpxmqw@nexus.home.palmen-it.de> <3E450927-1932-412E-A568-A2F84582BD26@dons.net.au> To: Daniel O'Connor X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4MrsFz24PSz4JDn X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=iitbombay-org.20210112.gappssmtp.com header.s=20210112 header.b=FHI9Ry+T; dmarc=none; spf=pass (mx1.freebsd.org: domain of bakul@iitbombay.org designates 2607:f8b0:4864:20::82d as permitted sender) smtp.mailfrom=bakul@iitbombay.org X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[iitbombay-org.20210112.gappssmtp.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82d:from]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[iitbombay-org.20210112.gappssmtp.com:+]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[bakul]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[iitbombay.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Oct 13, 2022, at 6:01 PM, Daniel O'Connor wrote: >=20 > It's come to my attention that someone else also ported this: > https://github.com/swills/virtfs-9p-kmod >=20 > I was wondering if you would be interesting in trying and seeing how = it fairs. Unfortunately I am not in a position to do a test poudriere = with it as yet. FWIW I played with swills port a few months ago. It worked on -12 but failed on -13 and -current (panics on kldload). I didn't investigate it further. Tested in bhyve. Note that bhyve on 13.1-stable does work with a linux guest: ubuntu# mount -t 9p -o trans=3Dvirtio,version=3D9p2000.L,rw,cache=3Dmmap = sharename /opt ubuntu# dd < largefile >/dev/null bs=3D1M count=3D1000 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB, 1000 MiB) copied, 3.65227 s, 287 MB/s I took your port & copied relevant files to a -current tree (8cee2ebac54a). I had to hack a few things to compile[1]. kldload doesn't crash as with swills port but mount fails: # mount -t virtio -o trans=3Dvirtio sharename /mnt mount: sharename: Operation not supported by device Note that the same line works fine on -12, with swill's changes. Relevant bhyve line: -s 8,virtio-9p,sharename=3Dmydir \ Given that mount on ubuntu works seems the problem must be elsewhere and not 9p2000.L vs 9p2000.u (as you surmised in the original msg in this thread). I even changed code in the driver to unconditionally pass 9p2000.L but that didn't help. [1] Fixed up module Makefiles and had to add=20 #define SAVENAME 0x00000400 /* save pathname buffer */ to 9pfs/virtiofs_vnops.c As only this define from namei.h seemed to be somehow lost.