mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-19 14:34:16 +00:00
Pass meta_seq and data_seq to _restore_inode.
This allows callers to pass in seq values for generated inodes. The tester code initializes them now before calling, instead of being hard set in the library. Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
@@ -170,6 +170,8 @@ static struct gen_inode *generate_inode(struct opts *opts, u64 ino, mode_t mode)
|
||||
|
||||
gino->inode = (struct scoutfs_parallel_restore_inode) {
|
||||
.ino = ino,
|
||||
.meta_seq = ino,
|
||||
.data_seq = 0,
|
||||
.mode = mode,
|
||||
.atime = now,
|
||||
.ctime = now,
|
||||
|
||||
@@ -804,8 +804,8 @@ static spr_err_t insert_inode_items(struct scoutfs_parallel_restore_writer *wri,
|
||||
si = bti->val;
|
||||
|
||||
si->size = 0;
|
||||
si->meta_seq = cpu_to_le64(inode->ino);
|
||||
si->data_seq = 0;
|
||||
si->meta_seq = cpu_to_le64(inode->meta_seq);
|
||||
si->data_seq = cpu_to_le64(inode->data_seq);
|
||||
si->data_version = 0;
|
||||
si->online_blocks = 0;
|
||||
si->offline_blocks = 0;
|
||||
@@ -835,7 +835,6 @@ static spr_err_t insert_inode_items(struct scoutfs_parallel_restore_writer *wri,
|
||||
if (S_ISREG(inode->mode)) {
|
||||
si->size = cpu_to_le64(inode->size);
|
||||
si->data_version = cpu_to_le64(inode->data_version);
|
||||
si->data_seq = cpu_to_le64(inode->ino);
|
||||
|
||||
err = insert_inode_index_item(wri, SCOUTFS_INODE_INDEX_DATA_SEQ_TYPE,
|
||||
le64_to_cpu(si->data_seq), inode->ino);
|
||||
|
||||
@@ -39,6 +39,8 @@ struct scoutfs_parallel_restore_xattr {
|
||||
struct scoutfs_parallel_restore_inode {
|
||||
/* all inodes */
|
||||
u64 ino;
|
||||
u64 meta_seq;
|
||||
u64 data_seq;
|
||||
u64 nr_xattrs;
|
||||
u32 uid;
|
||||
u32 gid;
|
||||
|
||||
Reference in New Issue
Block a user