Merge tag 'x86_microcode_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-block.git] / fs / btrfs / defrag.h
CommitLineData
59b818e0
JB
1/* SPDX-License-Identifier: GPL-2.0 */
2
3#ifndef BTRFS_DEFRAG_H
4#define BTRFS_DEFRAG_H
5
6int btrfs_defrag_file(struct inode *inode, struct file_ra_state *ra,
7 struct btrfs_ioctl_defrag_range_args *range,
8 u64 newer_than, unsigned long max_to_defrag);
9int __init btrfs_auto_defrag_init(void);
10void __cold btrfs_auto_defrag_exit(void);
11int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,
12 struct btrfs_inode *inode, u32 extent_thresh);
13int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info);
14void btrfs_cleanup_defrag_inodes(struct btrfs_fs_info *fs_info);
15int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, struct btrfs_root *root);
16
17static inline int btrfs_defrag_cancelled(struct btrfs_fs_info *fs_info)
18{
19 return signal_pending(current);
20}
21
22#endif