btrfs: Remove all sysfs entries
PATCH v2 1/1 btrfs: Remove all sysfs entries
Seems that currently none of the sysfs are created any more, so just remove sysfs support entirely.
Fixes compiling warnings in 3.0rc3
--
Oops, forgot to amend the compiling fix
fs/btrfs/Makefile +1 -1
@@ -4,7 +4,7 @@ obj-$(CONFIG_BTRFS_FS) := btrfs.o btrfs-y += super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \ file-item.o inode-item.o inode-map.o disk-io.o \ transaction.o inode.o file.o tree-defrag.o \ - extent_map.o sysfs.o struct-funcs.o xattr.o ordered-data.o \ + extent_map.o struct-funcs.o xattr.o ordered-data.o \ extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \ export.o tree-log.o acl.o free-space-cache.o zlib.o lzo.o \ compression.o delayed-ref.o relocation.o delayed-inode.o scrub.o
fs/btrfs/ctree.h +0 -5
@@ -1181,7 +1181,6 @@ struct btrfs_root {struct btrfs_key defrag_max;int defrag_running;char *name; -int in_sysfs;/* the dirty list is only used by non-reference counted roots */ struct list_head dirty_list;
@@ -2604,10 +2603,6 @@ int btrfs_dirty_pages(struct btrfs_root *root, struct inode *inode,int btrfs_defrag_leaves (struct btrfs_trans_handle *trans,struct btrfs_root *root,int cache_only); -/* sysfs.c */ -int btrfs_init_sysfs (void ); -void btrfs_exit_sysfs (void ); -/* xattr.c */ ssize_t btrfs_listxattr (struct dentry *dentry,char *buffer,size_t size);
fs/btrfs/disk-io.c +0 -1
@@ -1044,7 +1044,6 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, root->last_trans =0 ; root->highest_objectid =0 ; root->name =NULL ; - root->in_sysfs =0 ; root->inode_tree =RB_ROOT ;INIT_RADIX_TREE (&root->delayed_nodes_tree,GFP_ATOMIC ); root->block_rsv =NULL ;
fs/btrfs/super.c +1 -8
@@ -1228,13 +1228,9 @@ static int __init init_btrfs_fs(void) {int err; - err =btrfs_init_sysfs (); -if (err) -return err; - err =btrfs_init_compress ();if (err) - goto free_sysfs; +return err; err =btrfs_init_cachep ();if (err)
@@ -1275,8 +1271,6 @@ free_cachep:btrfs_destroy_cachep (); free_compress:btrfs_exit_compress (); -free_sysfs: -btrfs_exit_sysfs ();return err; }
@@ -1288,7 +1282,6 @@ static void __exit exit_btrfs_fs(void)extent_io_exit ();btrfs_interface_exit ();unregister_filesystem (&btrfs_fs_type); -btrfs_exit_sysfs ();btrfs_cleanup_fs_uuids ();btrfs_exit_compress (); }
fs/btrfs/sysfs.c deleted +0 -192
192 lines not on this page · raw message
Quoted 4 lines · Maarten Lankhorst
Seems that currently none of the sysfs are created any more, so just remove sysfs support entirely.
Fixes compiling warnings in 3.0rc3
I would actually like to retain sysfs support -- the current
entries may not be used (or useful, or in the right place, or even visible these days), but there's plenty of things that could and should go in sysfs from btrfs.
So, please do remove the unwanted/unused file entries, but could
you leave the sysfs file itself, and the (limited) bits that create the btrfs subdir? Otherwise, I'm going to be putting it all back in this weekend when I get the time to revisit Goffredo's old sysfs patch...
Thanks,
Hugo.
Quoted 3 lines
Signed-off-by Maarten Lankhorst <[email protected]>--
(I think this should be three - signs, not two: my signature-
cropping script removed the whole patch)
Signature · 3 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- What's a Nazgûl like you doing in a place like this? --- Quoted 20 lines · Hugo Mills
Quoted 4 lines · Maarten Lankhorst
Seems that currently none of the sysfs are created any more, so just remove sysfs support entirely.
Fixes compiling warnings in 3.0rc3
=A0 I would actually like to retain sysfs support -- the current entries may not be used (or useful, or in the right place, or even visible these days), but there's plenty of things that could and should go in sysfs from btrfs.
=A0 So, please do remove the unwanted/unused file entries, but could you leave the sysfs file itself, and the (limited) bits that create the btrfs subdir? Otherwise, I'm going to be putting it all back in this weekend when I get the time to revisit Goffredo's old sysfs patch...
=A0 Thanks,
=A0 Hugo.
Quoted 7 lines
Quoted 3 lines
Signed-off-by Maarten Lankhorst <[email protected]>--
=A0 (I think this should be three - signs, not two: my signature- cropping script removed the whole patch)
I'm not sure if Goffredo is following this thread, but I think you'll need a missing patch to provide a fs/btrfs/sysfs.h file in order to use his sysfs patch.
Quoted 18 lines · Mitch Harder
Quoted 11 lines · Hugo Mills
Quoted 4 lines · Maarten Lankhorst
Seems that currently none of the sysfs are created any more, so just remove sysfs support entirely.
Fixes compiling warnings in 3.0rc3
I would actually like to retain sysfs support -- the current entries may not be used (or useful, or in the right place, or even visible these days), but there's plenty of things that could and should go in sysfs from btrfs.
Quoted 5 lines
So, please do remove the unwanted/unused file entries, but could you leave the sysfs file itself, and the (limited) bits that create the btrfs subdir? Otherwise, I'm going to be putting it all back in this weekend when I get the time to revisit Goffredo's old sysfs patch...
Quoted 3 lines
I'm not sure if Goffredo is following this thread, but I think you'll need a missing patch to provide a
fs/btrfs/sysfs.hfile in order to use his sysfs patch.
OK, thanks for the warning. I'm not expecting Goffredo's patch to
be a complete drop-in turn-key solution -- he did warn that it was only a first draft when he originally posted it.
Hugo.
Signature · 4 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- Anyone using a computer to generate random numbers is, of ---
course, in a state of sin. Op 15-06-11 12:34, Hugo Mills schreef:
Quoted 10 lines · Maarten Lankhorst
Quoted 4 lines
Seems that currently none of the sysfs are created any more, so just remove sysfs support entirely.
Fixes compiling warnings in 3.0rc3
I would actually like to retain sysfs support -- the current
entries may not be used (or useful, or in the right place, or even visible these days), but there's plenty of things that could and should go in sysfs from btrfs.
Quoted 5 lines
So, please do remove the unwanted/unused file entries, but could
you leave the sysfs file itself, and the (limited) bits that create the btrfs subdir? Otherwise, I'm going to be putting it all back in this weekend when I get the time to revisit Goffredo's old sysfs patch...
Currently sysfs.c is just 2 function calls, rest is unused, so I'll wait then.
Will in_sysfs in struct btrfs_root be used again? Currently it's not used but only assigned zero.
~Maarten