From patchwork Mon Feb 5 20:05:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 197041 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1160237dyb; Mon, 5 Feb 2024 13:41:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5RpOmNZ8+IfjhqY2XExUHbfhS1Sm5pa3YqP7MYjMTOcFyGnWuLQVzRcMY4GR6/9gmAR+n X-Received: by 2002:a17:907:7704:b0:a35:9311:6c9b with SMTP id kw4-20020a170907770400b00a3593116c9bmr369618ejc.40.1707169262776; Mon, 05 Feb 2024 13:41:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707169262; cv=pass; d=google.com; s=arc-20160816; b=BCoeh4iZ5eqc1HP8ytzx0ZRVfmZVbhpssZ2FbqnXggRYDldW96jRpxhPNkgNJkvHU2 qu+pzg5nElewLmrPdu/V7Y5phkv0Ha81d+kWXeLVJIiM8fN2JDyjCAGQu8rvRK6xv8Dh HA572+R8mBJd9VZn0k3vQxfJwGHsAePn780zi5ru/k5ihwVlsZzyhDDZJLyGbatyurmC DsjeGUm9/ZO31ujzEFdjUdcd0VDn5u8vp4JsgR+4hgT4UVDGt4vYMMJYeIklnxP/FQr1 4npd+bvVVv7CNHrXIx8kacBMX5airaHfKMJIRDdk5/GqFELDSrfQYJHZxaGRUPxnxKH8 v9Rg== 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=LjLLoTR+ir1vHIuy3hXsUuRK7GJSfSeb1z1mFbcs/pM=; fh=QyCYBFXcB2pokAiYhnSjI73l6XBAnGnY9XA3iXwJlZU=; b=NefxQwjGRv5RFfmKg3G6KagloH7UsDNOiUFdu66Qgz9zryWCfd3xVOD3nLQ0EU74Gj p+hOpTWejMY7+o1+06apkMM1W4NyCN7x6oaHxrbsfCtI0vbqaGsewwj4zE98014PL/Db 32433DHG8S4idG4//lT90WPBg1m6ZDsRZRqo4ZAxvuy6YnoGC5hrsqOOHPUHqKPk8jrg qiBmXGObYRWz3DJpbqLsgvPyrPEjJqwDFBrpryILOQGhePUlc1gZTAilEY3PwiM2lywD Zj7MDnUSMq1HWAv78OgZO7xkbO/Y0+VIHJbL6AvfgF+/zgI37vyVbS3S/SJKQwUUTx47 3gsA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=xTYaLnhM; 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-53890-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53890-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=1; AJvYcCUKTc7kzMG31exYL7kIlj1dPvThVZ9/k8IpSLN2TEPyDNmpVZym9lMd93do47SBl+n431DFSJ43MDtm3BLkx6SvnQvrXw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k18-20020a1709061c1200b00a37eef53f41si265065ejg.125.2024.02.05.13.41.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 13:41:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53890-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=xTYaLnhM; 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-53890-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53890-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 5F0221F2B0FE for ; Mon, 5 Feb 2024 21:41:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AFDC12D77E; Mon, 5 Feb 2024 20:06:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="xTYaLnhM" Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 C60A712BEA4; Mon, 5 Feb 2024 20:06:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707163573; cv=none; b=OUpw88ANqNA7J4ZE3MTkS+StKRgudqL3kwSOjr7aYzv2FufBVMRAP0XYNfGa44hC1HTAsk6fpzR64SaW3c5ilKDDwA+ngdHeTrpuztsHZkYA7uvr+wB2xfLEp8nRe6S/leoTO2iS5bSJh/pQJEm0U0ZnGOcMDj8DA10qagMiwVI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707163573; c=relaxed/simple; bh=SpXRXuGnMtRwA2NcE51fX/znF3QwnMp2SZRjBoEEXhY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cTu5eequhJh5KGz0Xsz9s06HUDMEej03xJDPlFHSQo3M+eKceBoWH2A0DiPetgm/3+9+ty5tJKYRqMmkOGk13onFxDsTp90b/3nJWlxOid5l/ipTGuerDJ47vc5swu9Y6N9AmCQRLsGtjusKjoL1L+5CP6c/fPpO0MWxZWau4sM= 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=xTYaLnhM; arc=none smtp.client-ip=91.218.175.184 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=1707163570; 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=LjLLoTR+ir1vHIuy3hXsUuRK7GJSfSeb1z1mFbcs/pM=; b=xTYaLnhM62iIw9h5mlJHwn37PFD+85rp5V2iVlzDFkUm/hiGWhkq5JrHRt13ZXTLbc5Qqz cTHbzZadurpRL3NbkqdBkVzPCdxApb/tvOrNOsqUEmQ1SOFbq/dPloj4T6KJeTph2qziC+ Z0L+ka/B3oCSICX1qvb2qZpVQDiV1Zw= 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 5/6] xfs: add support for FS_IOC_GETSYSFSNAME Date: Mon, 5 Feb 2024 15:05:16 -0500 Message-ID: <20240205200529.546646-6-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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790096717086028564 X-GMAIL-MSGID: 1790096717086028564 Signed-off-by: Kent Overstreet --- fs/xfs/xfs_mount.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index aabb25dc3efa..6d16203d5c1c 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -711,6 +711,8 @@ xfs_mountfs( if (error) goto out; + strscpy(mp->m_super->s_sysfs_name, mp->m_super->s_id, sizeof(mp->m_super->m_sysfs_name)); + error = xfs_sysfs_init(&mp->m_stats.xs_kobj, &xfs_stats_ktype, &mp->m_kobj, "stats"); if (error)