All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 01/13] btrfs: move sysfs declarations out of ctree.h
Date: Fri,  2 Aug 2019 15:40:03 +0200	[thread overview]
Message-ID: <153556e369e93da23de32eebe56418ac5142ae9c.1564752900.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1564752900.git.dsterba@suse.com>

As the header for sysfs code already exists, use it to clean up ctree.h.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/ctree.h | 13 -------------
 fs/btrfs/super.c |  1 +
 fs/btrfs/sysfs.h | 12 ++++++++++++
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 1110bbd4bffb..894a249b2182 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -397,13 +397,6 @@ struct btrfs_dev_replace {
 	wait_queue_head_t replace_wait;
 };
 
-/* For raid type sysfs entries */
-struct raid_kobject {
-	u64 flags;
-	struct kobject kobj;
-	struct list_head list;
-};
-
 /*
  * free clusters are used to claim free space in relatively large chunks,
  * allowing us to do less seeky writes. They are used for all metadata
@@ -3265,12 +3258,6 @@ loff_t btrfs_remap_file_range(struct file *file_in, loff_t pos_in,
 int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
 			struct btrfs_root *root);
 
-/* sysfs.c */
-int __init btrfs_init_sysfs(void);
-void __cold btrfs_exit_sysfs(void);
-int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info);
-void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info);
-
 /* super.c */
 int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
 			unsigned long new_flags);
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 10bc7e6cca75..69eaa198e51e 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -43,6 +43,7 @@
 #include "free-space-cache.h"
 #include "backref.h"
 #include "space-info.h"
+#include "sysfs.h"
 #include "tests/btrfs-tests.h"
 
 #include "qgroup.h"
diff --git a/fs/btrfs/sysfs.h b/fs/btrfs/sysfs.h
index 40716b357c1d..f9fc7101e696 100644
--- a/fs/btrfs/sysfs.h
+++ b/fs/btrfs/sysfs.h
@@ -40,6 +40,13 @@ struct btrfs_feature_attr {
 	u64 feature_bit;
 };
 
+/* For raid type sysfs entries */
+struct raid_kobject {
+	u64 flags;
+	struct kobject kobj;
+	struct list_head list;
+};
+
 #define BTRFS_FEAT_ATTR(_name, _feature_set, _feature_prefix, _feature_bit)  \
 static struct btrfs_feature_attr btrfs_attr_features_##_name = {	     \
 	.kobj_attr = __INIT_KOBJ_ATTR(_name, S_IRUGO,			     \
@@ -91,4 +98,9 @@ void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs);
 void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
 		u64 bit, enum btrfs_feature_set set);
 
+int __init btrfs_init_sysfs(void);
+void __cold btrfs_exit_sysfs(void);
+int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info);
+void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info);
+
 #endif
-- 
2.22.0


  reply	other threads:[~2019-08-02 13:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 13:40 [PATCH 00/13] Sysfs cleanups David Sterba
2019-08-02 13:40 ` David Sterba [this message]
2019-08-02 13:40 ` [PATCH 02/13] btrfs: move btrfs_add_raid_kobjects to sysfs.c David Sterba
2019-08-02 13:40 ` [PATCH 03/13] btrfs: factor sysfs code out of link_block_group David Sterba
2019-08-02 13:40 ` [PATCH 04/13] btrfs: sysfs: unexport btrfs_raid_ktype David Sterba
2019-08-02 13:40 ` [PATCH 05/13] btrfs: factor out sysfs code for creating space infos David Sterba
2019-08-02 13:40 ` [PATCH 06/13] btrfs: sysfs: unexport space_info_ktype David Sterba
2019-08-02 13:40 ` [PATCH 07/13] btrfs: sysfs: replace direct access to feature set names with a helper David Sterba
2019-08-02 13:40 ` [PATCH 08/13] btrfs: factor out sysfs code for sending device uevent David Sterba
2019-08-02 13:40 ` [PATCH 09/13] btrfs: factor out sysfs code for deleting block group and space infos David Sterba
2019-08-02 13:40 ` [PATCH 10/13] btrfs: factor out sysfs code for updating sprout fsid David Sterba
2019-08-02 13:40 ` [PATCH 11/13] btrfs: cleanup kobject.h includes David Sterba
2019-08-02 13:40 ` [PATCH 12/13] btrfs: sysfs: move helper macros to sysfs.c David Sterba
2019-08-02 13:40 ` [PATCH 13/13] btrfs: sysfs: move type conversion helpers " David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=153556e369e93da23de32eebe56418ac5142ae9c.1564752900.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.