Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2663428rdb; Mon, 5 Feb 2024 13:38:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEL3tZdPPmvpawVDoFtIcPbSdtK0B/qQg+WtuX1pxN616L7JXTqFczoVSTbeEZKPhTGtZh6 X-Received: by 2002:ac8:7e95:0:b0:42c:1c9e:9291 with SMTP id w21-20020ac87e95000000b0042c1c9e9291mr531110qtj.3.1707169125860; Mon, 05 Feb 2024 13:38:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707169125; cv=pass; d=google.com; s=arc-20160816; b=KZvJIcEeqGpBa0FS7P5jCu7c30s/UdDDQrQiAMzJEaeHyfgRNbaqhFmrU78RU9tV7q hzaz0udglbAvyDz5EvbmuLXIAdcUOJctgajbuiN9XojbqeHDIM8CC/5KdwBIAvZpXnUW m+D4rMetfMmHGQGCPWJAvsvpmBoNGUFywYFGzmHxRKc8pmN1aG7nYiBBFA3W6Za656+J Un79pczv4egXtn1pkN9sQ4BPueGemYmENBEb4xAL59Bpekx+xmTTPtd3mbW/hDDrdvJ0 RDm0Zoge5W4dvA5kw99wqvIWaTqnwsoxHG/oSF6PRCq97CNDCXtq4iYhi8golP6UVEhO F3/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mxk7XRZEL0snESkDWwhfb1zBoSWiW2T8Lz3o6KIMn8M=; fh=vrbNoxsp/GP/YgPhhiVN5kYbarE15mFuSor5heg2kS0=; b=WHLdnGgqDiwrz4rNN69FQPC91uOFBF/cVsZSt26OuN7g4cEZIoUxO69tfSo5CM6D6F cKtjbg8vBVTCz6JBmn3oRwG323Dfog3h9Yaf6V+gZdZpeogulhOspkAQ8A3xSZ5pUrhs IN6hCrjd/CbunG+sCns0W+8/6gKr4sLCtFt7NzmNLcjNCG7BgGsBXKx3DreocTXTy+ZR Nmf1N/TKI3xhk0g8Hsv30CC8+b5S1Q4IvR+I2OPXVxnfAalaAMxg4vAPLIcQip+HlFXw uolocSNnnrXPxTjFiNyScVJH/FjciPgHTCth9g+07xGvDzMzQYnaOTB/oVade4Flbxks NeaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="uob/dDzx"; 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-ext4+bounces-1115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1115-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=1; AJvYcCW4fatGrNCvuZZfHTD4Nj6PUKXA+5xm4hzNQizT7yqfVJuoS3WR3IDsexz8yag3rg2vAJO41YyXAqdYZDswNso0CW2a4TFAshcuOB5f4Q== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a15-20020a05622a064f00b0042c268a9666si808260qtb.799.2024.02.05.13.38.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 13:38:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1115-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=@linux.dev header.s=key1 header.b="uob/dDzx"; 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-ext4+bounces-1115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1115-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4405D1C27895 for ; Mon, 5 Feb 2024 21:38:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60DE012AAE7; Mon, 5 Feb 2024 20:06:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="uob/dDzx" X-Original-To: linux-ext4@vger.kernel.org Received: from out-176.mta0.migadu.com (out-176.mta0.migadu.com [91.218.175.176]) (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 E455A12A14A for ; Mon, 5 Feb 2024 20:06:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707163568; cv=none; b=U/+cr3kd6xGs0WvH5KeidpwSnnati2PJ/nMvFQVMZxuiZmmY4w58nmPTe/5c61kX/2172Wm/tCaFYjYQhqf+XmaBXV5sWGshROJ+ynX6p4HPGRzH2B9txWye6RaTxoKU8mSmdBhT9yh3iLzID84XesE4jElTp81/ZoKUd8sApEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707163568; c=relaxed/simple; bh=sT0YhdGMz+E9RZmaN5yZSWMd1g+aYCrhSj7fqmLAo7o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iojZrQAi08dpdEkl+Iau1yW5TSwjo7Pp1GOhe//l2BFPdMLj4NrYQE7XXZ7sEfaHQqvLOzp1n8JybIeAmeqFpTPZyBwIIY3AeoxQBUY4wUfm8IjYYFOHqYppIfq2Y+KnG2Xj76VtCVyQSzrfhzi+EpE2P7xtYOjR0a9qSFOWvMQ= 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=uob/dDzx; arc=none smtp.client-ip=91.218.175.176 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 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1707163564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mxk7XRZEL0snESkDWwhfb1zBoSWiW2T8Lz3o6KIMn8M=; b=uob/dDzxQcIREDsMEM9g/iWBuz0YPHzPTzop+cY2f31oBhFBJpCrXqtQ7KCYfdmuorHek/ 3BdFAyeJ8xmW3cVWSpJ8jwVBKqrGw114zEAqI1kXcx6EbAAY7oyS1MVSqTQRGZeWGiMh3T 67MIwynAHlE/7CcJzvVvZxLHj5EuROc= From: Kent Overstreet To: 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 Cc: Kent Overstreet Subject: [PATCH 1/6] fs: super_block->s_uuid_len Date: Mon, 5 Feb 2024 15:05:12 -0500 Message-ID: <20240205200529.546646-2-kent.overstreet@linux.dev> In-Reply-To: <20240205200529.546646-1-kent.overstreet@linux.dev> References: <20240205200529.546646-1-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-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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); s->s_shrink = shrinker_alloc(SHRINKER_NUMA_AWARE | SHRINKER_MEMCG_AWARE, "sb-%s", type->name); diff --git a/include/linux/fs.h b/include/linux/fs.h index ed5966a70495..ff41ea6c3a9c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1257,6 +1257,7 @@ struct super_block { char s_id[32]; /* Informational name */ uuid_t s_uuid; /* UUID */ + u8 s_uuid_len; /* Default 16, possibly smaller for weird filesystems */ unsigned int s_max_links; -- 2.43.0