mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-18 20:35:24 +00:00
d4f4d7b76e
From the very beginning of free-space-tree feature, we allow mount option "space_cache=v2" to convert the filesystem to the new feature. But this is not the proper practice for new features (no matter if it's incompat or compat_ro). This is already making the clear_cache/space_cache mount option more complex. Thus this patch introduces the proper way to enable free-space-tree, and I hope one day we can deprecate the "space_cache=" mount option. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
/*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public
|
|
* License v2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public
|
|
* License along with this program; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 021110-1307, USA.
|
|
*/
|
|
|
|
#ifndef __BTRFS_CHECK_CLEAR_CACHE_H__
|
|
#define __BTRFS_CHECK_CLEAR_CACHE_H__
|
|
|
|
struct btrfs_fs_info;
|
|
struct btrfs_root;
|
|
struct task_ctx;
|
|
|
|
int btrfs_clear_v1_cache(struct btrfs_fs_info *fs_info);
|
|
int do_clear_free_space_cache(struct btrfs_fs_info *fs_info, int clear_version);
|
|
int validate_free_space_cache(struct btrfs_root *root, struct task_ctx *task_ctx);
|
|
int truncate_free_ino_items(struct btrfs_root *root);
|
|
int clear_ino_cache_items(struct btrfs_fs_info *fs_info);
|
|
|
|
#endif
|