From patchwork Tue Mar 22 22:27:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Krisman Bertazi X-Patchwork-Id: 12789327 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5FB3C433F5 for ; Tue, 22 Mar 2022 22:27:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 74F976B007D; Tue, 22 Mar 2022 18:27:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 700BE6B0085; Tue, 22 Mar 2022 18:27:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C72C6B0089; Tue, 22 Mar 2022 18:27:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0078.hostedemail.com [216.40.44.78]) by kanga.kvack.org (Postfix) with ESMTP id 4DE476B007D for ; Tue, 22 Mar 2022 18:27:52 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id F0F2BA5658 for ; Tue, 22 Mar 2022 22:27:51 +0000 (UTC) X-FDA: 79273460742.21.72FD0C0 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf10.hostedemail.com (Postfix) with ESMTP id 83D81C002A for ; Tue, 22 Mar 2022 22:27:51 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 63B681F442B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647988070; bh=zfBsf2RUnAkmYRtu6lmk/b8dTq1cQYpREmaCwhUzUEE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X4k6b5bLVXjtZTrPIpWLz2AWGVv7H7OYcYfgaVsJx4oNWe7mRga0FGDXi7+1fMjWy NnX7BipMzkyu5J7kHhVMw5nhrsIgqyMFPQ4vijQUcmeTARFbjzWDYrC26fifjn/U23 yRbMJrFwWKG/YDF76xyOMP+OKBqYMbk7i16uNiQtpIz9Mi5/EnUnWo844IhMjNssZy X7vEgi5MjjIiAZv18ekhgN6PJFGShAVr90c0iMR2thJYYzlLcRcNo5co4qFonaUqHz KT0RiBrkSUmqLSZG7JMCJtKm1aisGmS82Onv/gHesXFy7B3E9SfvV/D5bWBDGT9z7B 6XQg5x7mNA84A== From: Gabriel Krisman Bertazi To: hughd@google.com, akpm@linux-foundation.org, amir73il@gmail.com Cc: khazhy@google.com, linux-mm@kvack.org, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH 1/3] shmem: Keep track of out-of-memory and out-of-space errors Date: Tue, 22 Mar 2022 18:27:36 -0400 Message-Id: <20220322222738.182974-2-krisman@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220322222738.182974-1-krisman@collabora.com> References: <20220322222738.182974-1-krisman@collabora.com> MIME-Version: 1.0 X-Stat-Signature: 7o4kzsj88dg4bqjpudzdy47wri3ixg5z X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 83D81C002A Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=X4k6b5bL; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf10.hostedemail.com: domain of krisman@collabora.com designates 46.235.227.227 as permitted sender) smtp.mailfrom=krisman@collabora.com X-Rspam-User: X-HE-Tag: 1647988071-206565 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Keep a per-sb counter of failed shmem allocations for ENOMEM/ENOSPC to be reported on sysfs. The sysfs support is done separately on a later patch. Signed-off-by: Gabriel Krisman Bertazi --- include/linux/shmem_fs.h | 3 +++ mm/shmem.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index e65b80ed09e7..1a7cd9ea9107 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -44,6 +44,9 @@ struct shmem_sb_info { spinlock_t shrinklist_lock; /* Protects shrinklist */ struct list_head shrinklist; /* List of shinkable inodes */ unsigned long shrinklist_len; /* Length of shrinklist */ + + unsigned long acct_errors; + unsigned long space_errors; }; static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) diff --git a/mm/shmem.c b/mm/shmem.c index a09b29ec2b45..c350fa0a0fff 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -212,8 +212,10 @@ static inline bool shmem_inode_acct_block(struct inode *inode, long pages) struct shmem_inode_info *info = SHMEM_I(inode); struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb); - if (shmem_acct_block(info->flags, pages)) + if (shmem_acct_block(info->flags, pages)) { + sbinfo->acct_errors += 1; return false; + } if (sbinfo->max_blocks) { if (percpu_counter_compare(&sbinfo->used_blocks, @@ -225,6 +227,7 @@ static inline bool shmem_inode_acct_block(struct inode *inode, long pages) return true; unacct: + sbinfo->space_errors += 1; shmem_unacct_blocks(info->flags, pages); return false; } From patchwork Tue Mar 22 22:27:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Krisman Bertazi X-Patchwork-Id: 12789328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8E70C433EF for ; Tue, 22 Mar 2022 22:27:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4B7B36B0085; Tue, 22 Mar 2022 18:27:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 43EBC6B0089; Tue, 22 Mar 2022 18:27:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E0F16B008A; Tue, 22 Mar 2022 18:27:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id 1F7A26B0085 for ; Tue, 22 Mar 2022 18:27:56 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D5BEBA5658 for ; Tue, 22 Mar 2022 22:27:55 +0000 (UTC) X-FDA: 79273460910.16.77708B8 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf21.hostedemail.com (Postfix) with ESMTP id F3C7E1C001B for ; Tue, 22 Mar 2022 22:27:54 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id D9C951F442B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647988074; bh=YxlD4pKbjYfFieAPsszS75Zdc2phBkHyCnybdtTEx1A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C+XC9cAyTOUV0cCdI9gkhq6QEENUGA7UY36fUmvw+CIl2lr7Qj6JJYE2NXLKmj5Eb 0CU2Xem+OkOL53lB67VnRwu6ZnyhBhw+p88EBAC2tpgegisxHD3E1ZEiEUnQA38pkd gXdZZP7orn0Kcrbdj5e4S9Dl3TjmaEaUD4bbbqHUdKGHurgmKFZ9L0p/Upr1gw7hwg XIohw2PPfoXBw0wb3WtBNKXIdY+jOpzMi+jUrJBDmJx/2tptfEHAUY8IzhmnF5M389 E5rDecQpUeu3fKsXgOdxXd3irzqDY6sDT74YKgGzq3idx727I0ZlvOrZE2v6Um0W1b Ftx0gHGNTvwkQ== From: Gabriel Krisman Bertazi To: hughd@google.com, akpm@linux-foundation.org, amir73il@gmail.com Cc: khazhy@google.com, linux-mm@kvack.org, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH 2/3] shmem: Introduce /sys/fs/tmpfs support Date: Tue, 22 Mar 2022 18:27:37 -0400 Message-Id: <20220322222738.182974-3-krisman@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220322222738.182974-1-krisman@collabora.com> References: <20220322222738.182974-1-krisman@collabora.com> MIME-Version: 1.0 X-Stat-Signature: 43addzc7f8tcd87hgaa17arw8jun9cng X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: F3C7E1C001B Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=C+XC9cAy; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf21.hostedemail.com: domain of krisman@collabora.com designates 46.235.227.227 as permitted sender) smtp.mailfrom=krisman@collabora.com X-Rspam-User: X-HE-Tag: 1647988074-867956 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: In order to expose tmpfs statistics on sysfs, add the boilerplate code to create the /sys/fs/tmpfs structure. Other filesystems usually do /sys/fs//, but since this is a nodev filesystem, I'm proposing to use fsid as . This takes care of not exposing SB_NOUSER mounts. I don't think we have a usecase for showing them and, since they don't appear elsewhere, they might be confusing to users. Signed-off-by: Gabriel Krisman Bertazi --- include/linux/shmem_fs.h | 4 +++ mm/shmem.c | 73 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index 1a7cd9ea9107..c27ecf0e1b3b 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -47,6 +47,10 @@ struct shmem_sb_info { unsigned long acct_errors; unsigned long space_errors; + + /* sysfs */ + struct kobject s_kobj; /* /sys/fs/tmpfs/ */ + struct completion s_kobj_unregister; }; static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) diff --git a/mm/shmem.c b/mm/shmem.c index c350fa0a0fff..5e8973664b7f 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -250,6 +250,7 @@ static const struct inode_operations shmem_dir_inode_operations; static const struct inode_operations shmem_special_inode_operations; static const struct vm_operations_struct shmem_vm_ops; static struct file_system_type shmem_fs_type; +static struct kobject *shmem_root; bool vma_is_shmem(struct vm_area_struct *vma) { @@ -3584,6 +3585,57 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root) #endif /* CONFIG_TMPFS */ +#if defined(CONFIG_TMPFS) && defined(CONFIG_SYSFS) +#define TMPFS_SB_ATTR_RO(name) \ + static struct kobj_attribute tmpfs_sb_attr_##name = __ATTR_RO(name) + +static struct attribute *tmpfs_attrs[] = { + NULL +}; +ATTRIBUTE_GROUPS(tmpfs); + +static void tmpfs_sb_release(struct kobject *kobj) +{ + struct shmem_sb_info *sbinfo = + container_of(kobj, struct shmem_sb_info, s_kobj); + + complete(&sbinfo->s_kobj_unregister); +} + +static struct kobj_type tmpfs_sb_ktype = { + .default_groups = tmpfs_groups, + .sysfs_ops = &kobj_sysfs_ops, + .release = tmpfs_sb_release, +}; + +static void shmem_unregister_sysfs(struct super_block *sb) +{ + struct shmem_sb_info *sbinfo = SHMEM_SB(sb); + + kobject_del(&sbinfo->s_kobj); + kobject_put(&sbinfo->s_kobj); + wait_for_completion(&sbinfo->s_kobj_unregister); +} + +static int shmem_register_sysfs(struct super_block *sb) +{ + int err; + struct shmem_sb_info *sbinfo = SHMEM_SB(sb); + __kernel_fsid_t fsid = uuid_to_fsid(sb->s_uuid.b); + + init_completion(&sbinfo->s_kobj_unregister); + err = kobject_init_and_add(&sbinfo->s_kobj, &tmpfs_sb_ktype, shmem_root, + "%x%x", fsid.val[0], fsid.val[1]); + if (err) { + kobject_put(&sbinfo->s_kobj); + wait_for_completion(&sbinfo->s_kobj_unregister); + return err; + } + + return 0; +} +#endif /* CONFIG_TMPFS && CONFIG_SYSFS */ + static void shmem_put_super(struct super_block *sb) { struct shmem_sb_info *sbinfo = SHMEM_SB(sb); @@ -3591,6 +3643,12 @@ static void shmem_put_super(struct super_block *sb) free_percpu(sbinfo->ino_batch); percpu_counter_destroy(&sbinfo->used_blocks); mpol_put(sbinfo->mpol); + +#if IS_ENABLED(CONFIG_TMPFS) && IS_ENABLED(CONFIG_SYSFS) + if (!(sb->s_flags & SB_NOUSER)) + shmem_unregister_sysfs(sb); +#endif + kfree(sbinfo); sb->s_fs_info = NULL; } @@ -3673,6 +3731,13 @@ static int shmem_fill_super(struct super_block *sb, struct fs_context *fc) sb->s_root = d_make_root(inode); if (!sb->s_root) goto failed; + +#if IS_ENABLED(CONFIG_TMPFS) && IS_ENABLED(CONFIG_SYSFS) + if (!(sb->s_flags & SB_NOUSER)) + if (shmem_register_sysfs(sb)) + goto failed; +#endif + return 0; failed: @@ -3889,11 +3954,15 @@ int __init shmem_init(void) goto out2; } + shmem_root = kobject_create_and_add("tmpfs", fs_kobj); + if (!shmem_root) + goto out1; + shm_mnt = kern_mount(&shmem_fs_type); if (IS_ERR(shm_mnt)) { error = PTR_ERR(shm_mnt); pr_err("Could not kern_mount tmpfs\n"); - goto out1; + goto put_kobj; } #ifdef CONFIG_TRANSPARENT_HUGEPAGE @@ -3904,6 +3973,8 @@ int __init shmem_init(void) #endif return 0; +put_kobj: + kobject_put(shmem_root); out1: unregister_filesystem(&shmem_fs_type); out2: From patchwork Tue Mar 22 22:27:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Krisman Bertazi X-Patchwork-Id: 12789329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D7BEC433EF for ; Tue, 22 Mar 2022 22:27:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 134E86B0089; Tue, 22 Mar 2022 18:27:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E3FF6B008A; Tue, 22 Mar 2022 18:27:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E9FB26B008C; Tue, 22 Mar 2022 18:27:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id DD2426B0089 for ; Tue, 22 Mar 2022 18:27:58 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A191221EF6 for ; Tue, 22 Mar 2022 22:27:58 +0000 (UTC) X-FDA: 79273461036.12.B7FFB1F Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf08.hostedemail.com (Postfix) with ESMTP id 29A4A16001F for ; Tue, 22 Mar 2022 22:27:58 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 017411F442B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647988077; bh=nTaoenOuqzpgqOrtNvCOWhFin87BwHGqDc6wxVcAw0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m6DVNb8f/AmLL4bXkaA5ZQuduMsG7KOq98BWPgpiOlC9s9mMxFpEUfvymxqcuqcO2 DlOuJeqVFc3jdlnwdpKhg7vOHzGeW0mD6tM/PeqXFmxSoCuVfc+L/s0SKrCYz+mycj +eKvK5QIVkW03h0Ki3z7c6TgBasGQmxWe/p/50YCny3Tj/n6c/171/kiS1rEFxK0Je /PkpS6nC8lLTeo15HmyeObGL11Jc2/rhbHVXxGBgr5HmbTtWEiQlTEDCMnBMLuVK/y sMs8+z5tBRviRS5HInHoA6hyMZ5/MH5BKkQmcA+GGvhne/JLHIme+jIdBWwFc/CiXX Nd9j6+vm6oBOg== From: Gabriel Krisman Bertazi To: hughd@google.com, akpm@linux-foundation.org, amir73il@gmail.com Cc: khazhy@google.com, linux-mm@kvack.org, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH 3/3] shmem: Expose space and accounting error count Date: Tue, 22 Mar 2022 18:27:38 -0400 Message-Id: <20220322222738.182974-4-krisman@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220322222738.182974-1-krisman@collabora.com> References: <20220322222738.182974-1-krisman@collabora.com> MIME-Version: 1.0 X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=m6DVNb8f; spf=pass (imf08.hostedemail.com: domain of krisman@collabora.com designates 46.235.227.227 as permitted sender) smtp.mailfrom=krisman@collabora.com; dmarc=pass (policy=none) header.from=collabora.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 29A4A16001F X-Stat-Signature: 4ud97nbnq48dfu1fc76rhi3ohnwbxht7 X-HE-Tag: 1647988078-260749 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Exposing these shmem counters through sysfs is particularly useful for container provisioning, to allow administrators to differentiate between insufficiently provisioned fs size vs. running out of memory. Suggested-by: Amir Goldstein Suggested-by: Khazhy Kumykov Signed-off-by: Gabriel Krisman Bertazi --- Documentation/ABI/testing/sysfs-fs-tmpfs | 13 ++++++++++++ mm/shmem.c | 25 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-fs-tmpfs diff --git a/Documentation/ABI/testing/sysfs-fs-tmpfs b/Documentation/ABI/testing/sysfs-fs-tmpfs new file mode 100644 index 000000000000..d32b90949710 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-fs-tmpfs @@ -0,0 +1,13 @@ +What: /sys/fs/tmpfs//acct_errors +Date: March 2022 +Contact: "Gabriel Krisman Bertazi" +Description: + Track the number of IO errors caused by lack of memory to + perform the allocation of a tmpfs block. + +What: /sys/fs/tmpfs//space_errors +Date: March 2022 +Contact: "Gabriel Krisman Bertazi" +Description: + Track the number of IO errors caused by lack of space + in the filesystem to perform the allocation of a tmpfs block. diff --git a/mm/shmem.c b/mm/shmem.c index 5e8973664b7f..b6db8e5b1ec5 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -214,6 +214,7 @@ static inline bool shmem_inode_acct_block(struct inode *inode, long pages) if (shmem_acct_block(info->flags, pages)) { sbinfo->acct_errors += 1; + sysfs_notify(&sbinfo->s_kobj, NULL, "acct_errors"); return false; } @@ -228,6 +229,7 @@ static inline bool shmem_inode_acct_block(struct inode *inode, long pages) unacct: sbinfo->space_errors += 1; + sysfs_notify(&sbinfo->s_kobj, NULL, "space_errors"); shmem_unacct_blocks(info->flags, pages); return false; } @@ -3586,10 +3588,33 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root) #endif /* CONFIG_TMPFS */ #if defined(CONFIG_TMPFS) && defined(CONFIG_SYSFS) +static ssize_t acct_errors_show(struct kobject *kobj, + struct kobj_attribute *attr, char *page) +{ + struct shmem_sb_info *sbinfo = + container_of(kobj, struct shmem_sb_info, s_kobj); + + return sysfs_emit(page, "%lu\n", sbinfo->acct_errors); +} + +static ssize_t space_errors_show(struct kobject *kobj, + struct kobj_attribute *attr, char *page) +{ + struct shmem_sb_info *sbinfo = + container_of(kobj, struct shmem_sb_info, s_kobj); + + return sysfs_emit(page, "%lu\n", sbinfo->space_errors); +} + #define TMPFS_SB_ATTR_RO(name) \ static struct kobj_attribute tmpfs_sb_attr_##name = __ATTR_RO(name) +TMPFS_SB_ATTR_RO(acct_errors); +TMPFS_SB_ATTR_RO(space_errors); + static struct attribute *tmpfs_attrs[] = { + &tmpfs_sb_attr_acct_errors.attr, + &tmpfs_sb_attr_space_errors.attr, NULL }; ATTRIBUTE_GROUPS(tmpfs);