hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/fs/xfs/xfs_icache.h
....@@ -17,14 +17,11 @@
1717 __u64 eof_min_file_size;
1818 };
1919
20
-#define SYNC_WAIT 0x0001 /* wait for i/o to complete */
21
-#define SYNC_TRYLOCK 0x0002 /* only try to lock inodes */
22
-
2320 /*
2421 * tags for inode radix tree
2522 */
2623 #define XFS_ICI_NO_TAG (-1) /* special flag for an untagged lookup
27
- in xfs_inode_ag_iterator */
24
+ in xfs_inode_walk */
2825 #define XFS_ICI_RECLAIM_TAG 0 /* inode is to be reclaimed */
2926 #define XFS_ICI_EOFBLOCKS_TAG 1 /* inode has blocks beyond EOF */
3027 #define XFS_ICI_COWBLOCKS_TAG 2 /* inode can have cow blocks to gc */
....@@ -40,7 +37,7 @@
4037 /*
4138 * flags for AG inode iterator
4239 */
43
-#define XFS_AGITER_INEW_WAIT 0x1 /* wait on new inodes */
40
+#define XFS_INODE_WALK_INEW_WAIT 0x1 /* wait on new inodes */
4441
4542 int xfs_iget(struct xfs_mount *mp, struct xfs_trans *tp, xfs_ino_t ino,
4643 uint flags, uint lock_flags, xfs_inode_t **ipp);
....@@ -51,7 +48,7 @@
5148
5249 void xfs_reclaim_worker(struct work_struct *work);
5350
54
-int xfs_reclaim_inodes(struct xfs_mount *mp, int mode);
51
+void xfs_reclaim_inodes(struct xfs_mount *mp);
5552 int xfs_reclaim_inodes_count(struct xfs_mount *mp);
5653 long xfs_reclaim_inodes_nr(struct xfs_mount *mp, int nr_to_scan);
5754
....@@ -71,55 +68,14 @@
7168 void xfs_cowblocks_worker(struct work_struct *);
7269 void xfs_queue_cowblocks(struct xfs_mount *);
7370
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);
11874
11975 int xfs_icache_inode_is_allocated(struct xfs_mount *mp, struct xfs_trans *tp,
12076 xfs_ino_t ino, bool *inuse);
12177
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);
12480
12581 #endif