|
|
@@ -28,6 +28,7 @@
|
|
|
#include "hash.h"
|
|
|
#include "compression.h"
|
|
|
#include "qgroup.h"
|
|
|
+#include "inode-map.h"
|
|
|
|
|
|
/* magic values for the inode_only field in btrfs_log_inode:
|
|
|
*
|
|
|
@@ -5685,6 +5686,23 @@ again:
|
|
|
path);
|
|
|
}
|
|
|
|
|
|
+ if (!ret && wc.stage == LOG_WALK_REPLAY_ALL) {
|
|
|
+ struct btrfs_root *root = wc.replay_dest;
|
|
|
+
|
|
|
+ btrfs_release_path(path);
|
|
|
+
|
|
|
+ /*
|
|
|
+ * We have just replayed everything, and the highest
|
|
|
+ * objectid of fs roots probably has changed in case
|
|
|
+ * some inode_item's got replayed.
|
|
|
+ *
|
|
|
+ * root->objectid_mutex is not acquired as log replay
|
|
|
+ * could only happen during mount.
|
|
|
+ */
|
|
|
+ ret = btrfs_find_highest_objectid(root,
|
|
|
+ &root->highest_objectid);
|
|
|
+ }
|
|
|
+
|
|
|
key.offset = found_key.offset - 1;
|
|
|
wc.replay_dest->log_root = NULL;
|
|
|
free_extent_buffer(log->node);
|