From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEA9AC433E6 for ; Tue, 1 Sep 2020 15:15:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B987E20BED for ; Tue, 1 Sep 2020 15:15:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729194AbgIAPPS (ORCPT ); Tue, 1 Sep 2020 11:15:18 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:38846 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729187AbgIAPPL (ORCPT ); Tue, 1 Sep 2020 11:15:11 -0400 Received: from callcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 081FEsBC021203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 1 Sep 2020 11:14:54 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id CE622420128; Tue, 1 Sep 2020 11:14:53 -0400 (EDT) Date: Tue, 1 Sep 2020 11:14:53 -0400 From: "Theodore Y. Ts'o" To: Dave Chinner Cc: Matthew Wilcox , Miklos Szeredi , Al Viro , "Dr. David Alan Gilbert" , Greg Kurz , linux-fsdevel@vger.kernel.org, Stefan Hajnoczi , Miklos Szeredi , Vivek Goyal , Giuseppe Scrivano , Daniel J Walsh , Chirantan Ekbote Subject: Re: xattr names for unprivileged stacking? Message-ID: <20200901151453.GC558530@mit.edu> References: <20200829192522.GS1236603@ZenIV.linux.org.uk> <20200830191016.GZ14765@casper.infradead.org> <20200831113705.GA14765@casper.infradead.org> <20200831132339.GD14765@casper.infradead.org> <20200831142532.GC4267@mit.edu> <20200901033405.GF12096@dread.disaster.area> <20200901145205.GA558530@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200901145205.GA558530@mit.edu> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Sep 01, 2020 at 10:52:05AM -0400, Theodore Y. Ts'o wrote: > On Tue, Sep 01, 2020 at 01:34:05PM +1000, Dave Chinner wrote: > > > > But, unlike your implication that this is -really complex and hard > > to do-, it's actually relatively trivial to do with the XFS > > implementation I mentioned as each ADS stream is a fully fledged > > inode that can point to shared data extents. If you can do data > > manipulation on a regular inode, you'll be able to do it on an ADS, > > and that includes copying ADS streams via reflink. > > Is the reflink system call on a file with ADS's atomic, or not? What > if there are a million files is ADS hierarchy which is 100 > subdirectories deep in some places, comprising several TB's worth of > data? Is that all going to fit in a single XFS transaction? What if > you crash in the middle of it? Is a partially reflinked copy of an > ADS file OK? Or a reflinked ADS file missing some portion of the > alternate data streams? Oh, and if the answer is that the ADS inodes should be reflinked individually in userspace, wonderful! An ADS inode could then just be a directory, like it was in the NeXT operating system, and copying an ADS file could *also* be done in userspace, as a cp -r. :-) That's fine too, and keeps the file system completely out of it. :-) - Ted