Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2678348rdb; Mon, 5 Feb 2024 14:14:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IG50/rXBU1Jaxm/TZ9C9w35kNjMcrDgXMITu5ePak2mQqeQ+PFiOTcxiIMdYRUnK95iCqjt X-Received: by 2002:a05:6102:370a:b0:46d:2fcd:3522 with SMTP id s10-20020a056102370a00b0046d2fcd3522mr380971vst.22.1707171259301; Mon, 05 Feb 2024 14:14:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707171259; cv=pass; d=google.com; s=arc-20160816; b=M4DkNQx8FDleE+xxQc/M+OsyOgZndE8eiJrJZiNJwb4PVzezslES7O5+w8fPNO8+UO NjONJMrYXdT6xewcBvp3ExrCoH8sv8r9CegZpv62DfqqzukxVhy2Ae2dTT+vWwMc14cO pjG42pmc+GqkxUwr7r28T8RSWDLn5QocGhoY1AWlirosyMFQ3q2sRtjHYXwHRxPbgX/Q jcMC1QL2l8vYn/0TiiATLINu6MlwXj8gost9kttJ7MKAIhY4Iseg2LGeaZTbnDbUlQkl 2XKcdHhEpJU4JpD4QeMkvY0sApszVyQ70Cn90Kmiwlt9rY0wMxIBz1iXlawWBeSFZvy5 VMEw== 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:date:dkim-signature; bh=RCce4pV3xPOpa0Za3QiaoPauzc6TdqvdOGmTYYs8YWk=; fh=Rd7bDsy7WoYVizOkDQarEitylpeqI75/1/Q4M8OHyPw=; b=UOw4JsX0gjEoKtjzfZMXCNIztq1/KVIg/UOmgSh+8A5KXmI8+kj5UCozJChxLGR7qr 0QRiASEz3vL1+c+j+uT062bdOvyUpFu3fbXA3WCKrG0C6awue48vcXxT1XzquN5eYmXr f65w67tuPcnCnM/539qO9DJmXS6YSMqFNG6qEWLCGBnrF2j4IsPNQH2Hs+eTQqmh1iEX ffhHqdkoRBX+PccpcVL/hWoqr4jlIa47bCfTpp3HgbNVLqu/VK/9id9C1ICT02vng/tA ubTQReUk1g07uY/K6btNXYpJFVJcFhj+99rc8IItjOTxBX6ppfZY0w6U6b/Y2TnoCR1K MV6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b=rIPn0sI7; arc=pass (i=1 spf=pass spfdomain=fromorbit.com dkim=pass dkdomain=fromorbit-com.20230601.gappssmtp.com dmarc=pass fromdomain=fromorbit.com); spf=pass (google.com: domain of linux-ext4+bounces-1121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com X-Forwarded-Encrypted: i=1; AJvYcCWCZVWHNPjEJOwcoT1DVCnaffGNNPAkBLfichgUiRyBTyj2QmYFFWNQKFNQonFkBN6QNc3QtYWeaB5C1I/KKurxANCqsjP/Pmu7ZRFZnQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t13-20020a05620a0b0d00b00783448147c8si831180qkg.292.2024.02.05.14.14.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 14:14:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b=rIPn0sI7; arc=pass (i=1 spf=pass spfdomain=fromorbit.com dkim=pass dkdomain=fromorbit-com.20230601.gappssmtp.com dmarc=pass fromdomain=fromorbit.com); spf=pass (google.com: domain of linux-ext4+bounces-1121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0F0D91C2603B for ; Mon, 5 Feb 2024 22:14:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CD9E5EE7B; Mon, 5 Feb 2024 21:58:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fromorbit-com.20230601.gappssmtp.com header.i=@fromorbit-com.20230601.gappssmtp.com header.b="rIPn0sI7" X-Original-To: linux-ext4@vger.kernel.org Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31BC45DF2E for ; Mon, 5 Feb 2024 21:58:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707170335; cv=none; b=Bcx7MuIjKoqPQ/lz62KYnjR7k2KBy1c6xOjuxffxLY3qwF5FsA2X9otGbab3FpUGRMvI/c10bZeJMTL7wyGwabqM/G6jkfkXzHQQkmLRPsrKczOgPbldj8SWTKnoo4lGGojDcoyUJYwpPp5XkKHEeTomxZoRJOSu3c2l6AVQlcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707170335; c=relaxed/simple; bh=fXqCZbcBxU+Dl9zb7VwlQjoseiraK8MLA3UaXDw+Sok=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HQW0oRDvG+pYl5jXGPY5fKYsSLmQbnU1n5EGyRTyRojcOxwOeFiJGlo8mqIp0n7XPNGbCOgti51ePySVLhPm0mXATnM4ce5EV9USclMh8sJwGK535I1XdtbiWU/YiDTCy4OwAli1vpFqGm88Qpo03Sonn/AmhtKSyjZVvLFJbd4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fromorbit.com; spf=pass smtp.mailfrom=fromorbit.com; dkim=pass (2048-bit key) header.d=fromorbit-com.20230601.gappssmtp.com header.i=@fromorbit-com.20230601.gappssmtp.com header.b=rIPn0sI7; arc=none smtp.client-ip=209.85.215.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fromorbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fromorbit.com Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-5d4d15ec7c5so4531056a12.1 for ; Mon, 05 Feb 2024 13:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20230601.gappssmtp.com; s=20230601; t=1707170332; x=1707775132; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=RCce4pV3xPOpa0Za3QiaoPauzc6TdqvdOGmTYYs8YWk=; b=rIPn0sI79mq7NbQHmPpQHNbDU/oLqETMyhOmKVtTBSYBQVoANMs26Zk8TshTBczon0 l+PlJJSDx13Qr5uwkSFvaUlYnLj9zTKg26ePCdBecAUqAv8Dk+uAg8vyQMEGZ6oNRZmY RaVAqacTClXWft6fohsAstnbk158fvRfixCWqs/HpYEfBbfQk5LxzCbANso7QvtaWNg2 i/18jdpKq/GhuLDpaxBMjnOQl+Dyg0VbpxyA7yRvX6PnORKdrs0YnszefY2l/DeVZCCB ykiHjmAPFJCnpu4+yj7M1aCSAe0DFSstdchSrb4HGyDKDovEinWLpy1CQzJW6bZvhSm3 RVfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707170332; x=1707775132; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RCce4pV3xPOpa0Za3QiaoPauzc6TdqvdOGmTYYs8YWk=; b=s/QsC6cUBeBx7GHGkcb/6g40R5xdZeKwJO0Pkf9VHnEVAbWjWhtTLucq6vkWJdHlcv hzBn1QPS2uDdSuasxAjXHgirYQWAeQ6bFx65a4RmDxlM6NVlOYOqtklhuBPWvqnWor/7 6JxwM3J7LZs/HEjGSogqZumtTbgRlieZT2Zs41A2cvSV6tv9W6cl3gvBIdUb6CgpvNCX 8jVXkskzCqwmMkbNBieMst3Gv19vK6odchsSDQv+PhfbKE03tIWeI34LlBW9cZI/E+40 DoXyR7Yd5gMA3OzuN0RYw6Qqwq6EsHpxpT1gXUtgUJthv7wKtu0CVBsdyTRGbZfjaOzE HCew== X-Gm-Message-State: AOJu0Yw/6rYah85EVB1I26+Hb7wEEofw4yheAJSakzNIJ4SEMGR+BLav IFq3jVxCKAxFFDJroiEmu+ITkULTwCjF+qIyUP/MgRKPbAeD+s6NEw8AkIQ5sY4= X-Received: by 2002:a05:6a21:2d0a:b0:19c:7e6f:85f2 with SMTP id tw10-20020a056a212d0a00b0019c7e6f85f2mr462782pzb.1.1707170332483; Mon, 05 Feb 2024 13:58:52 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXfoiv3knB/SSXG8SVBFwzWWBW4atkK43PqHLEoHiySTJ+YmhaUJU2ngxDwfMe1JDaMdpi99UM1XuPBYwlaQ6iz/O4Ya9QxhbGcev8Glr4wO6FK7+kIXHO7pwT7pPg+Qa7JdbDAekq+oL0HJO6+26rNLubU31yvhucCTe387Ccm85s2D6KKw0vSfRvXCPoyHA/qD8PYXTJEKvr/YyRooerssQ== Received: from dread.disaster.area (pa49-181-38-249.pa.nsw.optusnet.com.au. [49.181.38.249]) by smtp.gmail.com with ESMTPSA id m22-20020aa78a16000000b006e035133b72sm350032pfa.134.2024.02.05.13.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 13:58:51 -0800 (PST) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1rX6zJ-002Ypp-0V; Tue, 06 Feb 2024 08:58:49 +1100 Date: Tue, 6 Feb 2024 08:58:49 +1100 From: Dave Chinner To: Kent Overstreet Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH 1/6] fs: super_block->s_uuid_len Message-ID: References: <20240205200529.546646-1-kent.overstreet@linux.dev> <20240205200529.546646-2-kent.overstreet@linux.dev> Precedence: bulk X-Mailing-List: linux-ext4@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: <20240205200529.546646-2-kent.overstreet@linux.dev> On Mon, Feb 05, 2024 at 03:05:12PM -0500, Kent Overstreet wrote: > Some weird old filesytems have UUID-like things that we wish to expose > as UUIDs, but are smaller; add a length field so that the new > FS_IOC_(GET|SET)UUID ioctls can handle them in generic code. > > Signed-off-by: Kent Overstreet > --- > fs/super.c | 1 + > include/linux/fs.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/fs/super.c b/fs/super.c > index d35e85295489..ed688d2a58a7 100644 > --- a/fs/super.c > +++ b/fs/super.c > @@ -375,6 +375,7 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags, > s->s_time_gran = 1000000000; > s->s_time_min = TIME64_MIN; > s->s_time_max = TIME64_MAX; > + s->s_uuid_len = sizeof(s->s_uuid); So if the filesystem doesn't copy a uuid into sb->s_uuid, then we allow those 16 bytes to be pulled from userspace? Shouldn't this only get set when the filesystem copies it's uuid to the superblock? And then in the get uuid ioctl, if s_uuid_len is zero we can return -ENOENT to indicate the filesystem doesn't have a UUID, rather that require userspace to determine a filesystem doesn't have a valid UUID somehow... -Dave. -- Dave Chinner david@fromorbit.com