return 1;
}
-void lafs_refile(struct block *b, int dec)
-{
- struct block *next = NULL, *next_parent = NULL;
- struct fs *fs = NULL;
- u64 physref = 0;
-
- if (!b)
- return;
-
-/* sanity tests.
- * 1/ make sure pincnt is right
+/*
+ * This for debugging and is racy and is probably only safe on UP
*/
+static void check_consistency(struct block *b)
+{
+ /* sanity tests.
+ * 1/ make sure pincnt is right
+ */
if (test_bit(B_Index, &b->flags)) {
int c[2];
struct block *cb;
LAFS_BUG(1, &ib->b);
}
}
+}
+
+void lafs_refile(struct block *b, int dec)
+{
+ struct block *next = NULL, *next_parent = NULL;
+ struct fs *fs = NULL;
+ u64 physref = 0;
+
+ if (!b)
+ return;
-/* End of sanity tests. Now for real code */
+ check_consistency(b);
/* To (mostly) avoid recursion, we have a loop which may
* walk up to the parent.
!test_bit(B_OnFree, &b->flags))
/* If B_IOLock, then it might be on the cluster
* list, but not the LRU.
- * FIXME can this race with writepage/lafs_cluster_allocate
- * which sets B_IOLock before removing from lru ??
*/
onlru = 1;