Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp703283lqc; Fri, 8 Mar 2024 09:13:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW6o+g8hNKFkYZITJYBssYpqavO1zkDm9134tag4KUTvGAlSz1Fvcfio2O8bbOhNHSsajyNBXCW2qLFvgWEdZRjV1V/40x8dzuPKJbhVQ== X-Google-Smtp-Source: AGHT+IGPoHQYgJFpYFo0E2gPIudsdrFsaGQd/pQiP6eeoWo4kZ3IqRe9h21tuEufoC7eZ4eExBre X-Received: by 2002:a17:903:1209:b0:1dc:4199:a31d with SMTP id l9-20020a170903120900b001dc4199a31dmr13475648plh.53.1709918025643; Fri, 08 Mar 2024 09:13:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709918025; cv=pass; d=google.com; s=arc-20160816; b=05ojG4dRujsRR2c2lX0oupYsMVvIOtXRZcoVMQVSfBD/jbUwmIJSxv0EYJ2yzYb3ju MbsOcQlJ3vYXcEbNEuYKFChIA0TLDF+vbLJr9m6WtJhkCyesT0CkdIXUR+eW0RPhEyYU WU2CCv8Vt7umg1kyTI0Su63J4v/bLgFperSciDDdS6Z5M/zGC/et7YZy1zcwF3CX2cpO O3jim4eo9kkcY94nvCf7GxJ4hSw0//jU1OxpHO2xZb3VGXe12buuYj21ot1fEXP2iHaj 5rxwqBph3eZ+Wa5Je5MULESI6yw9zGDBiiI11YQcW/I0/aAx7qhrWsm1SrSc/WlRNoMJ B9MQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=n/ZGm97f9Vx3dMv4Q4ZF92Mt8t0Jy8x8fbbYpW0hUz0=; fh=xxpDLj/wwvmL3GLfvqB8ESDAuQ+FENu9qYpJDHN9eJ8=; b=CAO2yQ6/imuDjQQXxJfOOUf5XBtWfbGoMvKPz3Nid4GvU0yVYeMEdxy4UGRUxvh1xc GhlLPEodLQRsyBjH3Pa842f6SGwmZruhQW/MyHtawltHxs/w39rE12m52oBzRHYM3GaN 6/DMnzLdRzThmKDdPkuk4B9WwG5BSRICl9NG9QF9K4ZqR5nPRGrcW+LJF/aTCZ6gvMLl IchKU+MWGM8qu/eZhHeXWm2ldYm+ydSZPAYynz70g3HPeCEEmZnV/JlvT8BdO5VELl8N CKiHknI3Guq3kEQdYkY0yZQl1toaiAHMg3DIaf+G3Z7pDQzXbnVCFMQDzxFQS49mSbNT 3Odg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=gKgJaFyU; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-97359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y1-20020a170902700100b001dba53ce5c0si15610926plk.524.2024.03.08.09.13.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 09:13:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=gKgJaFyU; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-97359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 534872815C3 for ; Fri, 8 Mar 2024 17:13:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB0FE4085D; Fri, 8 Mar 2024 17:13:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="gKgJaFyU" Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E9E828DA4 for ; Fri, 8 Mar 2024 17:13:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709918006; cv=none; b=ibb703A3ocRiceFH3pfVWfu/8oDU5q7CMVZ/6BIdz8l1db1UDIWOAp7CrmfsKjFPwODA+iimk1k7B5hMdQENEyU0XIfAStPzBN7TRFTp8EmrrjJ3OP7A1ru3UkGlxaJSnCRqY4aZwWLL8+K4zRh4T6EiMccKuP/ndCtfmrmJOh4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709918006; c=relaxed/simple; bh=7Xu6eZCzCVliCAZZme0wZBJGDCt14tP5UMVuvQ4xw/8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UKhlI37AT/sjWObMAx2kGLXMMNNzLwgCyy3a7P7aCxjCSDYfXfi57BLuLamfEe4qWcXd6rryYtEDgLbYq92AaAlPD6NpDLcO4TJCVjEVdBjovSrtVjCB/9/KE4/K0moXhi6MEwZsYvFsGyN9ZzNK5rkPu+dLFyp2wuyINx86MGc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=gKgJaFyU; arc=none smtp.client-ip=91.218.175.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Fri, 8 Mar 2024 12:13:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1709918002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n/ZGm97f9Vx3dMv4Q4ZF92Mt8t0Jy8x8fbbYpW0hUz0=; b=gKgJaFyUdAaj+GtRl0l7T4brse8kJ+I5o8KpA1mSNxkFfrrXV1QQgh/thdpH4oqfVf4SOv UtJw92+UPgU2yOjM4cf2OIrZcQgZ1xK8Af+ReQADA7x8bPLG1aL1wl2eYsjRXDfsRpPD23 ojLZKJnsNZSjIpgStzoF/6saJH9xdJo= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: "Darrick J. Wong" Cc: Neal Gompa , linux-fsdevel@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Josef Bacik , Miklos Szeredi , Christian Brauner , David Howells Subject: Re: [PATCH v2] statx: stx_subvol Message-ID: <6czkpcm4gxcjik3drcy6eys6lannfk55oowdesem2qr3gfgobw@lblo3vzck43e> References: <20240308022914.196982-1-kent.overstreet@linux.dev> <2uk6u4w7dp4fnd3mrpoqybkiojgibjodgatrordacejlsxxmxz@wg5zymrst2td> <20240308165633.GO6184@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240308165633.GO6184@frogsfrogsfrogs> X-Migadu-Flow: FLOW_OUT On Fri, Mar 08, 2024 at 08:56:33AM -0800, Darrick J. Wong wrote: > On Fri, Mar 08, 2024 at 11:48:31AM -0500, Kent Overstreet wrote: > > It's a new feature, not a bugfix, this should never get backported. And > > I the bcachefs maintainer wrote the patch, and I'm submitting it to the > > VFS maintainer, so if it's fine with him it's fine with me. > > But then how am I supposed to bikeshed the structure of the V2 patchset > by immediately asking you to recombine the patches and spit out a V3? > > > > But, seriously, can you update the manpage too? yeah, where's that at? > Is stx_subvol a u64 > cookie where userspace mustn't try to read anything into its contents? > Just like st_ino and st_dev are (supposed) to be? Actually, that's up for debate. I'm considering having the readdir() equivalent for walking subvolumes return subvolume IDs, and then there'd be a separate call to open by ID. Al's idea was to return open fds to child subvolumes, then userspace can get the path from /proc; that's also a possibility. The key thing is that with subvolumes it's actually possible to do an open_by_id() call with correct security checks on pathwalking - because we don't have hardlinks so there's no ambiguity. Or we might do it getdents() style and return the path directly. But I think userspace is going to want to work with the volume identifiers directly, which is partly why I'm considering why other options might be cleaner. Another thing to consider: where we're going with this is giving userspace a good efficient interrface for recursive tree traversal of subvolumes, but it might not be a bad idea to do that for mountpoints as well - similar problems, similar scalability issues that we might want to solve eventually. > Should the XFS data and rt volumes be reported with different stx_vol > values? Maybe?