From patchwork Tue Feb 6 20:18:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 197636 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1800446dyb; Tue, 6 Feb 2024 12:22:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4Cie34AUshl5wavpb+FL9xLWprPrqwG/02apsWhNlZsaeaComuQNc9kJJcRB7r52/SdfH X-Received: by 2002:a05:6e02:ed0:b0:363:6da9:2bc3 with SMTP id i16-20020a056e020ed000b003636da92bc3mr3663821ilk.11.1707250948553; Tue, 06 Feb 2024 12:22:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707250948; cv=pass; d=google.com; s=arc-20160816; b=elTOSTP4gaygZc6KDBZO5ETVodLoIkzAl4PIB6XKP6ax6YOsO/mRrjr8chzdUEV7jl 8z9XWjfAXFRIyvzoaORRG1ihuF6qDgFikFP1gwOWCyYy41PyUijxPA+rX7DJpiq96C+O KmhgW2HEKk68MU6E/Etn3qg0qs3jsL5R0O93nLkXJpJjAtCSyBrSQlB/xVif0Uw6e/l4 LsPVrUAixh2EXcr9uV7WPaqkNAnt32bIPgqEHtUsS4qlk/8bQ/n8OOwjeHS9sMnFKVBV bPCjZgb6hF0E5FOIfEXuvqIieHOhTvaZI0fBV6qrvi3C2PMfuuoth2d/RwhjthecaKxh Ev3Q== 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=ORZ3NxtyAsFtX+LQqgBHca7yU+LThn04BGVHp9Ql3Xo=; fh=vQVtohJShOuj69t7sy87o5REMyLYJZC7HwiZx+UZJEg=; b=xC7NP5bZx4difafzBChya83YYSYDeIfd/+m2EFfD8dc4xu0CwU4MaEP98OGFcXAnu2 Y/ZtF2YtNYbpFh2uHf1L/wIJ8f6SGg7byFcovfw7koRmQ1Q05H+x2kxGU+dwyx3JrXtw m3iNXhP5L2PRUynUEMi1U7DQufimdzFGEAJr7Md5TAlzwhmMoA0HCATGYC4AYQ+fqTBZ ibvyrsqUkVgP2woSdSNSK9rEK/XjKgNBg0Z5KU5Zjg4UQV60oADMTnjg+fEqeCYJMpnn /ysx40WLKBNM98bichTkzKT+7Q5rtEViKD7BbDGdMbSCqe6yLmaCWZwzsk8Bp5T5LEiS q0IQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=fwScqX0m; 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-55585-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55585-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=1; AJvYcCWX4FCVQmHBrY2m3pL2x6z2RUmqY2epMRwduoYDbRFtNxQtcqDe4w1xkS4UP8G7VIa4yM50carVF3wzybWiLCkP9TW2+g== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id w4-20020a63f504000000b005c680fbab19si2071857pgh.513.2024.02.06.12.22.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 12:22:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55585-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=fwScqX0m; 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-55585-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55585-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 932FDB22E68 for ; Tue, 6 Feb 2024 20:21:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A25617984; Tue, 6 Feb 2024 20:19:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="fwScqX0m" Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 CB8C71B597 for ; Tue, 6 Feb 2024 20:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707250755; cv=none; b=VvW/7TlsloSmJ9ekpr2E8QnSoSTffCSFLClgzv2lJslm1B/WRnJKkZ0e9aPG7veQXa52ZvXT85z8Fi9DVV5t04Zm/27FePN5A85qMXJjWf3tT6INRdWoL/kn+/X8PeG1HE+K8tobOSI33e9zeizOWYBDgV+DgHUVvuZ4EGGZy8E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707250755; c=relaxed/simple; bh=BmbZGsFxwakjn0IikUsjUWm3IXpJHfHD1/as7Xt9Pcw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cw/EBFZPJJ8mRim3UzHcuynp2xJcAuvxkIcWiYVTp9d949FKAr0N5duj4SBC/vDnE7cQ4Qqxgc2CyEArrmRCB0S8A4i0MfG4GiMEaN2pR4qAO69g6BUsHYXBhlnTBOlTt3GTHQvvu6OMHUblTOywCDpMkfAiUwB+y5boSMsh104= 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=fwScqX0m; arc=none smtp.client-ip=91.218.175.179 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=1707250751; 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=ORZ3NxtyAsFtX+LQqgBHca7yU+LThn04BGVHp9Ql3Xo=; b=fwScqX0mnWDNlYrU6EpWlu3bS17zj2d/+yx3GJV7H8mqYcnwQLUTmo0E3m/Lxpforau8JM O+M+wuxH0ZwvKEc+AP7mBE9c3gA2HhDVpS0NAZHr+sq1enlGS+NtJ+yDqcmeBxzVjNW5BR M6CJaUFkFsWGlVLN1DWOT3IYg+QzLKc= From: Kent Overstreet To: brauner@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Kent Overstreet Subject: [PATCH v2 4/7] fat: Hook up sb->s_uuid Date: Tue, 6 Feb 2024 15:18:52 -0500 Message-ID: <20240206201858.952303-5-kent.overstreet@linux.dev> In-Reply-To: <20240206201858.952303-1-kent.overstreet@linux.dev> References: <20240206201858.952303-1-kent.overstreet@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790182370432697193 X-GMAIL-MSGID: 1790182370432697193 Now that we have a standard ioctl for querying the filesystem UUID, initialize sb->s_uuid so that it works. Signed-off-by: Kent Overstreet --- fs/fat/inode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 1fac3dabf130..5c813696d1ff 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -1762,6 +1762,9 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, else /* fat 16 or 12 */ sbi->vol_id = bpb.fat16_vol_id; + __le32 vol_id_le = cpu_to_le32(sbi->vol_id); + super_set_uuid(sb, (void *) &vol_id_le, sizeof(vol_id_le)); + sbi->dir_per_block = sb->s_blocksize / sizeof(struct msdos_dir_entry); sbi->dir_per_block_bits = ffs(sbi->dir_per_block) - 1;