* [PATCH] btrfs: Cleanup the unused btrfs_check_super_valid.
@ 2013-12-18 3:14 Qu Wenruo
2013-12-19 12:34 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Qu Wenruo @ 2013-12-18 3:14 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
Since in David's commit 1104a8855, there is nothing really check the
super block now, the btrfs_check_super_valid function can be removed if
no one else needs the function.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: David Sterba <dsterba@suse.cz>
---
fs/btrfs/disk-io.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 8072cfa..3bda365 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -56,8 +56,6 @@
static struct extent_io_ops btree_extent_io_ops;
static void end_workqueue_fn(struct btrfs_work *work);
static void free_fs_root(struct btrfs_root *root);
-static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info,
- int read_only);
static void btrfs_destroy_ordered_operations(struct btrfs_transaction *t,
struct btrfs_root *root);
static void btrfs_destroy_ordered_extents(struct btrfs_root *root);
@@ -2354,13 +2352,6 @@ int open_ctree(struct super_block *sb,
memcpy(fs_info->fsid, fs_info->super_copy->fsid, BTRFS_FSID_SIZE);
- ret = btrfs_check_super_valid(fs_info, sb->s_flags & MS_RDONLY);
- if (ret) {
- printk(KERN_ERR "btrfs: superblock contains fatal errors\n");
- err = -EINVAL;
- goto fail_alloc;
- }
-
disk_super = fs_info->super_copy;
if (!btrfs_super_root(disk_super))
goto fail_alloc;
@@ -3705,15 +3696,6 @@ int btrfs_read_buffer(struct extent_buffer *buf, u64 parent_transid)
return btree_read_extent_buffer_pages(root, buf, 0, parent_transid);
}
-static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info,
- int read_only)
-{
- /*
- * Placeholder for checks
- */
- return 0;
-}
-
static void btrfs_error_commit_super(struct btrfs_root *root)
{
mutex_lock(&root->fs_info->cleaner_mutex);
--
1.8.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: Cleanup the unused btrfs_check_super_valid.
2013-12-18 3:14 [PATCH] btrfs: Cleanup the unused btrfs_check_super_valid Qu Wenruo
@ 2013-12-19 12:34 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2013-12-19 12:34 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs
On Wed, Dec 18, 2013 at 11:14:28AM +0800, Qu Wenruo wrote:
> Since in David's commit 1104a8855, there is nothing really check the
> super block now, the btrfs_check_super_valid function can be removed if
> no one else needs the function.
>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> Cc: David Sterba <dsterba@suse.cz>
> ---
> -static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info,
> - int read_only)
> -{
> - /*
> - * Placeholder for checks
The comment should motivate to add more tests, not to remove the
supporting code. Please keep it.
> - */
> - return 0;
> -}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-19 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-18 3:14 [PATCH] btrfs: Cleanup the unused btrfs_check_super_valid Qu Wenruo
2013-12-19 12:34 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).