Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3848751ybc; Thu, 14 Nov 2019 15:50:06 -0800 (PST) X-Google-Smtp-Source: APXvYqz0bzYLL/GoPqFmScz7IKUCA7KL8Gqf9iYReYfpdR2PivcsHjrs92uOY9BbAk5VdKEtsWyZ X-Received: by 2002:a1c:2dd0:: with SMTP id t199mr10924799wmt.58.1573775405868; Thu, 14 Nov 2019 15:50:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573775405; cv=none; d=google.com; s=arc-20160816; b=a+/UcdGWAMMQxXtQed5lrvBEEO23uLx5P/KICaMBxdYUryM5MjdY2VeDwpmKm254w1 +kI8dfKdAUzSwRHaXkChPWggzO24PHLG4I57NfIEHBjnd9YX8sp5u7EkAoiCVd1dmDzu Ti7nF/PMRhdk+TWU1qEmxifaRdRqgTeoMa2cDvzk0RyXvBvzXOuaCRuWHiky83DEHNuv MSRVlcPOAbXPXg8CoJbFblAUPLkZDbyK+0kdZHGVKgyxnE/VYjH7qzPIBvDS4vTcg8ZX 6qgsCvkpZTqCasG8p5IJeyW4QbP0bAsSyeeOJehlDNIth1kX6CFtfUkujzHMqkPHr7WQ Ku7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ceG9ml+Rs1uGCMAooN7ZsnzQalWi2rMOImyM2zP6ZjM=; b=vfTAmCGbgby2eEwO1wlbJqd/uF+6+VSI4BAg6r9u/r9O87X/7HVK8j+iUYo2RPPrcx tgqjAquSP7vBbsqEKbW1cEZj2oU8ZDETliNjKT0+u5Hgt6CasPFgkByQMzvI7uowjQbv ElYPWazZlXKokA5sh0OCP6weltKaDupWos8XA/HTo76PdQSGr3KoYenTkduHkZ755bKb hgs9CsyD0KnjVK45AcgimvsjrmTVgsYO4whTIzp8AxWxKePF18/C4kdeIumAEBP5wkAp dNphJeTRICcMQWfQ1okZoz3bWtolH59AMz+1oXCKUp/iO4Ve+Ri9kml3vi6br6SKdyv7 hRfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si5615501edj.380.2019.11.14.15.49.30; Thu, 14 Nov 2019 15:50:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727077AbfKNXtK (ORCPT + 99 others); Thu, 14 Nov 2019 18:49:10 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:49010 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726852AbfKNXtK (ORCPT ); Thu, 14 Nov 2019 18:49:10 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVOrJ-0006Oi-Cr; Thu, 14 Nov 2019 23:49:05 +0000 Date: Thu, 14 Nov 2019 23:49:05 +0000 From: Al Viro To: Amir Goldstein Cc: Miklos Szeredi , linux-fsdevel , Linux NFS Mailing List , "J. Bruce Fields" , overlayfs Subject: Re: [RFC] is ovl_fh->fid really intended to be misaligned? Message-ID: <20191114234905.GL26530@ZenIV.linux.org.uk> References: <20191114154723.GJ26530@ZenIV.linux.org.uk> <20191114195544.GB5569@miu.piliscsaba.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Fri, Nov 15, 2019 at 01:13:15AM +0200, Amir Goldstein wrote: > See attached. > IMHO it looks much easier to verify that these changes are correct > compared to your open coded offset shifting all over the place. > > It even passed the exportfs tests first try. > Only some index tests are failing. > > If you like this version, I can fix up the failures and add Al's > suggestions to simplify code with OVL_FH_MAX_SIZE > memory allocations. Huh? Correct me if I'm wrong, but doesn't that patch make it reject all old fhandles just on the type check? That includes anything sent over the wire, or stored in xattrs, or represented as names in indexdir... _If_ we can change the fhandle layout at will, everything's easy - you can add padding in any way you like. But fhandles are a lot more permanent than this approach would require - mere rebooting the server into a new kernel must not make the clients see -ESTALE on everything they'd imported from it! And then there's implied "you can throw indexdir contents at any time", which is also not a good thing to do. Sure, introducing a variant with better layout would be nice, and using a new type for it is pretty much required, but you can't just discard old-layout fhandles you'd ever issued. I'm afraid it's a lot stickier than you think; decisions on fhandle layout are nearly as permanent as those on the storage layouts for a filesystem. Especially in case of overlayfs, where they are literally a part of the storage layout - the names in indexdir and the contents of trusted.overlay.upper xattr on subdirectories in there...