.. | .. |
---|
17 | 17 | __u64 eof_min_file_size; |
---|
18 | 18 | }; |
---|
19 | 19 | |
---|
20 | | -#define SYNC_WAIT 0x0001 /* wait for i/o to complete */ |
---|
21 | | -#define SYNC_TRYLOCK 0x0002 /* only try to lock inodes */ |
---|
22 | | - |
---|
23 | 20 | /* |
---|
24 | 21 | * tags for inode radix tree |
---|
25 | 22 | */ |
---|
26 | 23 | #define XFS_ICI_NO_TAG (-1) /* special flag for an untagged lookup |
---|
27 | | - in xfs_inode_ag_iterator */ |
---|
| 24 | + in xfs_inode_walk */ |
---|
28 | 25 | #define XFS_ICI_RECLAIM_TAG 0 /* inode is to be reclaimed */ |
---|
29 | 26 | #define XFS_ICI_EOFBLOCKS_TAG 1 /* inode has blocks beyond EOF */ |
---|
30 | 27 | #define XFS_ICI_COWBLOCKS_TAG 2 /* inode can have cow blocks to gc */ |
---|
.. | .. |
---|
40 | 37 | /* |
---|
41 | 38 | * flags for AG inode iterator |
---|
42 | 39 | */ |
---|
43 | | -#define XFS_AGITER_INEW_WAIT 0x1 /* wait on new inodes */ |
---|
| 40 | +#define XFS_INODE_WALK_INEW_WAIT 0x1 /* wait on new inodes */ |
---|
44 | 41 | |
---|
45 | 42 | int xfs_iget(struct xfs_mount *mp, struct xfs_trans *tp, xfs_ino_t ino, |
---|
46 | 43 | uint flags, uint lock_flags, xfs_inode_t **ipp); |
---|
.. | .. |
---|
51 | 48 | |
---|
52 | 49 | void xfs_reclaim_worker(struct work_struct *work); |
---|
53 | 50 | |
---|
54 | | -int xfs_reclaim_inodes(struct xfs_mount *mp, int mode); |
---|
| 51 | +void xfs_reclaim_inodes(struct xfs_mount *mp); |
---|
55 | 52 | int xfs_reclaim_inodes_count(struct xfs_mount *mp); |
---|
56 | 53 | long xfs_reclaim_inodes_nr(struct xfs_mount *mp, int nr_to_scan); |
---|
57 | 54 | |
---|
.. | .. |
---|
71 | 68 | void xfs_cowblocks_worker(struct work_struct *); |
---|
72 | 69 | void xfs_queue_cowblocks(struct xfs_mount *); |
---|
73 | 70 | |
---|
74 | | -int xfs_inode_ag_iterator(struct xfs_mount *mp, |
---|
75 | | - int (*execute)(struct xfs_inode *ip, int flags, void *args), |
---|
76 | | - int flags, void *args); |
---|
77 | | -int xfs_inode_ag_iterator_flags(struct xfs_mount *mp, |
---|
78 | | - int (*execute)(struct xfs_inode *ip, int flags, void *args), |
---|
79 | | - int flags, void *args, int iter_flags); |
---|
80 | | -int xfs_inode_ag_iterator_tag(struct xfs_mount *mp, |
---|
81 | | - int (*execute)(struct xfs_inode *ip, int flags, void *args), |
---|
82 | | - int flags, void *args, int tag); |
---|
83 | | - |
---|
84 | | -static inline int |
---|
85 | | -xfs_fs_eofblocks_from_user( |
---|
86 | | - struct xfs_fs_eofblocks *src, |
---|
87 | | - struct xfs_eofblocks *dst) |
---|
88 | | -{ |
---|
89 | | - if (src->eof_version != XFS_EOFBLOCKS_VERSION) |
---|
90 | | - return -EINVAL; |
---|
91 | | - |
---|
92 | | - if (src->eof_flags & ~XFS_EOF_FLAGS_VALID) |
---|
93 | | - return -EINVAL; |
---|
94 | | - |
---|
95 | | - if (memchr_inv(&src->pad32, 0, sizeof(src->pad32)) || |
---|
96 | | - memchr_inv(src->pad64, 0, sizeof(src->pad64))) |
---|
97 | | - return -EINVAL; |
---|
98 | | - |
---|
99 | | - dst->eof_flags = src->eof_flags; |
---|
100 | | - dst->eof_prid = src->eof_prid; |
---|
101 | | - dst->eof_min_file_size = src->eof_min_file_size; |
---|
102 | | - |
---|
103 | | - dst->eof_uid = INVALID_UID; |
---|
104 | | - if (src->eof_flags & XFS_EOF_FLAGS_UID) { |
---|
105 | | - dst->eof_uid = make_kuid(current_user_ns(), src->eof_uid); |
---|
106 | | - if (!uid_valid(dst->eof_uid)) |
---|
107 | | - return -EINVAL; |
---|
108 | | - } |
---|
109 | | - |
---|
110 | | - dst->eof_gid = INVALID_GID; |
---|
111 | | - if (src->eof_flags & XFS_EOF_FLAGS_GID) { |
---|
112 | | - dst->eof_gid = make_kgid(current_user_ns(), src->eof_gid); |
---|
113 | | - if (!gid_valid(dst->eof_gid)) |
---|
114 | | - return -EINVAL; |
---|
115 | | - } |
---|
116 | | - return 0; |
---|
117 | | -} |
---|
| 71 | +int xfs_inode_walk(struct xfs_mount *mp, int iter_flags, |
---|
| 72 | + int (*execute)(struct xfs_inode *ip, void *args), |
---|
| 73 | + void *args, int tag); |
---|
118 | 74 | |
---|
119 | 75 | int xfs_icache_inode_is_allocated(struct xfs_mount *mp, struct xfs_trans *tp, |
---|
120 | 76 | xfs_ino_t ino, bool *inuse); |
---|
121 | 77 | |
---|
122 | | -void xfs_icache_disable_reclaim(struct xfs_mount *mp); |
---|
123 | | -void xfs_icache_enable_reclaim(struct xfs_mount *mp); |
---|
| 78 | +void xfs_stop_block_reaping(struct xfs_mount *mp); |
---|
| 79 | +void xfs_start_block_reaping(struct xfs_mount *mp); |
---|
124 | 80 | |
---|
125 | 81 | #endif |
---|