From nobody Tue Dec 14 02:59:17 2021 X-Original-To: freebsd-current@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 79EA418ED0E8 for ; Tue, 14 Dec 2021 02:59:25 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (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 4JCjlK2rJWz3R1g; Tue, 14 Dec 2021 02:59:25 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-qk1-x72c.google.com with SMTP id 193so15684649qkh.10; Mon, 13 Dec 2021 18:59:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=i7KzN+8vqE2zcbMGsLaGSyVxCjA75urUUw9h7tcYsak=; b=GR9JAkf+ET5Xuu/kuvWnoN40+UYAhRs8dis6nLZcWDY60tDELwf7s7E8S3HYbpfQBg SdAt1/8QlOrR3PgPj7tLwzFpOXDYunwAI+vy4j6RDQ2bV9NufXFEMDYKYdUXSd7ermXT jtilerNeHaPi1/hC9M6M/XX90SoRoPC0JdyR77/+i/jNlUCWTKf8NSaEBJdyhq3kzHjl SSRzcENPsohQQznqYnrgcuNCO09f7I8rgWDMm6FS29AJ2SvWp1TGhwgpuynbkTCq9nHb tocYsHik2ra51RwdfzPiKdU8sWyX530PE+waHl73F2f6Rvud4fglDNtw6gcVmInKoJ82 /LVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=i7KzN+8vqE2zcbMGsLaGSyVxCjA75urUUw9h7tcYsak=; b=8KIgm1oJYv8+5z2TZ8FWDkXXQref3wnJWQaLPkoTOld0znweR+f12C9n6QMnSeo7nh Fx8Xz/iAZZVIxKeS1a8WkOou9BSBbZoXBBOSh4bMqoho+J1CzDF9azCX5BjjiZzsTrTT nEcm+8le+h969QA5QUGKJjpSCej4qQzapMYdmsXzh+11JMEQDlSyeyLnTDFjfN2ybzop qTV+W0kgoRSs7KzSmYa5KBElZtuXO2sc2h/7BSsiRqXzZOVr/fqdRz2Xl3wDb8IjlMPr gKWE7SZ+f/xkF+neZ2h/V49dTmB03NItb9jfUp3X9lpehJTZnWTpxMhFVfjXVYft9azh /SpA== X-Gm-Message-State: AOAM533zMzwYRJ2ER6X537hTV5Q3IQ2DbYj6iu5AYDxqs1suu16rydF/ 7MyWaxBw6T1WIx6ekfRYLrvf2PUQDR8= X-Google-Smtp-Source: ABdhPJwwQnpbB8AnI7/LtObXm24an8U5jwuPfMnLQh2WVUoK6YycLEkb7Q2QgSlHtqNxt71+XanbWw== X-Received: by 2002:a05:620a:4103:: with SMTP id j3mr1922211qko.737.1639450758857; Mon, 13 Dec 2021 18:59:18 -0800 (PST) Received: from spectre.mavhome.dp.ua (104-55-12-234.lightspeed.knvltn.sbcglobal.net. [104.55.12.234]) by smtp.gmail.com with ESMTPSA id 196sm6784852qkd.61.2021.12.13.18.59.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Dec 2021 18:59:18 -0800 (PST) Subject: Re: Fixing VOP_READDIR for 64-bit directory cookies To: Alan Somers , FreeBSD CURRENT References: From: Alexander Motin Message-ID: <95f70cff-e02e-7f05-f529-1978667f651e@FreeBSD.org> Date: Mon, 13 Dec 2021 21:59:17 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4JCjlK2rJWz3R1g X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 13.12.2021 21:47, Alan Somers wrote: > tldr; this change allows the NFS server to export file systems that > use 64-bit directory cookies > https://reviews.freebsd.org/D33404 > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260375 > > Long story: > NFSv2 included a 32-bit directory cookie with each readdir entry. > NFSv3 widened it to 64-bits, and FreeBSD's SVN r22521 raised > VOP_READDIR's cookies argument to a u_long. That's 64-bits on some > architectures, but 32-bits on others. But since the NFS server is the > only caller that uses cookies, VOP_READDIR really ought to use a > 64-bit type on all architectures. For NVSv2-exported file systems, > the NFS server will ignore the top 32-bits of the cookie. > > There are no in-tree file systems that use more than 32 bits for their > directory cookies, but it matters for some FUSE file systems. > > Does anybody have any opinions about this change, or about whether/how > to MFC it? Since changing the VOP_READDIR argument type will probably break external file system modules I'd say it is not acceptable for MFC. But merge of the NFS part only should fix the issue for the 64-bit machines, which should be good enough for the most people. -- Alexander Motin