Message ID | 20240205200529.546646-4-kent.overstreet@linux.dev |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-53889-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1159946dyb; Mon, 5 Feb 2024 13:40:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGiRglz/7jN2BtKYi90MCU8tu+FIwV16HdfBn0ZsdOOetc9laVaV0qfJW7wL66tb05qoB64 X-Received: by 2002:ac2:5b08:0:b0:50e:7c70:f8da with SMTP id v8-20020ac25b08000000b0050e7c70f8damr559543lfn.16.1707169217658; Mon, 05 Feb 2024 13:40:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707169217; cv=pass; d=google.com; s=arc-20160816; b=MvRXX4JglPhDrSxFTv1IvHv8m3Ww7pNZt/Rt+3yMcsSp94VUCxHffTxZ3WqwQpTSym UP25FVyJX9rPoqyNRyrPjQsoWzBcvkNeQV5MtRuLHwAqT4aHF4TyOCqDF7P7ZVq1rAbT lEPCA62WP/i3wwZ0Yyj/Lj8ZeVDrADMStaRm5V1mxwFqCEagEUUwo+Ba20izQ2/OtIQh Viex2dIiEPP0mfdWgTOzg8r2r1qXQcJUhWLb+IHSob8q2jlUkTVb3zGw0gphIaCMXCY0 k3sGcQ7q84skZWXT4L8RquyjOvBgo0krEspkw+Dd6LjxVKf6q17YZj5gwIFsJXo0F1Nm Fz0A== 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=+Y3gjAfbNTQAYItYsU5COE7+yozdE8QNyrcmsyi3W+A=; fh=5Q5U7H9vlJ8CcYb2txp7aIdekD8+Clm681tGSuS4Cz4=; b=M/bzv7MLQSJtvN1yq5KJ8q2Ilwuu60hVcE23wb6G2zEMwkp5aKSRGmWBXsSS0ATmhu Nx2vMqkLaqq4oeUCoBJtf3yUoH6V7yHkPXFY5WRbWSFjpz8RoXErSsg79xxYsWSS7SHN T5IQX1D28ZQzyRdgthhawuSnD8iLVwF5dLx8aGzeZJcYDihqZrHViG5t4M3gno6n/dDk VJsRney5VVEU3QKigbJYRHUI9P3qYp+6NepF3Wh3FA9ibEDCMQBPs6UTIcWN2B+0qF33 +hdPII8ODNKbuNPxjAxZ0ooZL745IysIztn5k+db9mWCmuk78N+FF2cyruAL1r7/Pcnx YItw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Dg8R9kdj; 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-53889-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53889-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=1; AJvYcCWBM0N474zLt7bAiEJiBg9xTnEej4nF81h0rxphD43wBAxlkaiURsbETuTdfsPMfZtz7mkOJLu2xwGL2s0DAvuGQbykxg== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q20-20020a170906361400b00a376d1b700csi254875ejb.736.2024.02.05.13.40.17 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 13:40:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53889-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Dg8R9kdj; 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-53889-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53889-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 359DE1F2B1F0 for <ouuuleilei@gmail.com>; Mon, 5 Feb 2024 21:40:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9034412D14B; Mon, 5 Feb 2024 20:06:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Dg8R9kdj" 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 66FC012AAEF for <linux-kernel@vger.kernel.org>; Mon, 5 Feb 2024 20:06:09 +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=1707163571; cv=none; b=vBgGmoRHPUM4uUTvCQPsktRltC/eGG0PGqAcfgqITID7rRNbHHST96t3kRFPNaHFO+Og1qafFevV7EgzYvA0eQuAipQlDbJSkrZNswJTJU3I/WDkdRQ5JrqJ+Cm1pJJE+7HJmDupOJUYV3PKfIhwT8yUKz0Vcdvw8Blnt1VskMM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707163571; c=relaxed/simple; bh=e2lTROAYcoM/HDLzlNIvyaAd2xWkASoCHOPzvyTKoeY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gH92YWGnOqRXVcTNiyS/XUYsDPYqKdYfcJHUqhhDuwJ9VmUhZXmxHRzkc7DTVza5CAFwbqpF8++4TK6eO5TmyP/jyhAtYe11i3zypad47wKwyObLlsfGcj2C/Lv4q3R/JEr8jp08rIcJXJHAYo1mN2BXm9OdxJawrigjIFdv63c= 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=Dg8R9kdj; 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 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=1707163567; 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=+Y3gjAfbNTQAYItYsU5COE7+yozdE8QNyrcmsyi3W+A=; b=Dg8R9kdj58O0ZqQd8Z7H3MJ/Xo+17XcsMUPoyC294HD/6wNiULMRl/SvP5MfWcctiuI5Io t6CsU8lFKiS3p/H+xykTaZ3BnRI4WQGh1bEXwdtcL+5YOwxMPZjB8OrKC4sytClnNQmBdQ OH6F7iJCR/fZItMA4ZecGTa8HqOC7p4= From: Kent Overstreet <kent.overstreet@linux.dev> 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 <kent.overstreet@linux.dev> Subject: [PATCH 3/6] fat: Hook up sb->s_uuid Date: Mon, 5 Feb 2024 15:05:14 -0500 Message-ID: <20240205200529.546646-4-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-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790096669745428013 X-GMAIL-MSGID: 1790096669745428013 |
Series | filesystem visibility ioctls | |
Commit Message
Kent Overstreet
Feb. 5, 2024, 8:05 p.m. UTC
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 <kent.overstreet@linux.dev>
---
fs/fat/inode.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 1fac3dabf130..a3d3478442d1 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -1762,6 +1762,10 @@ 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); + memcpy(&sb->s_uuid, &vol_id_le, sizeof(vol_id_le)); + sb->s_uuid_len = 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;