mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
1723270f0c
The btrfs_defrag_root() function does not really belong in the transaction.{c,h} module and as we have a defrag.{c,h} nowadays, move it to there instead. This also allows to stop exporting btrfs_defrag_leaves(), so we can make it static. Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> [ rename info to fs_info for consistency ] Signed-off-by: David Sterba <dsterba@suse.com>
23 lines
751 B
C
23 lines
751 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef BTRFS_DEFRAG_H
|
|
#define BTRFS_DEFRAG_H
|
|
|
|
int btrfs_defrag_file(struct inode *inode, struct file_ra_state *ra,
|
|
struct btrfs_ioctl_defrag_range_args *range,
|
|
u64 newer_than, unsigned long max_to_defrag);
|
|
int __init btrfs_auto_defrag_init(void);
|
|
void __cold btrfs_auto_defrag_exit(void);
|
|
int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,
|
|
struct btrfs_inode *inode, u32 extent_thresh);
|
|
int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info);
|
|
void btrfs_cleanup_defrag_inodes(struct btrfs_fs_info *fs_info);
|
|
int btrfs_defrag_root(struct btrfs_root *root);
|
|
|
|
static inline int btrfs_defrag_cancelled(struct btrfs_fs_info *fs_info)
|
|
{
|
|
return signal_pending(current);
|
|
}
|
|
|
|
#endif
|