From d653c7850431448bb706fbed6c26a4a19593e093 Mon Sep 17 00:00:00 2001 From: Hunter Shaffer Date: Sat, 17 Aug 2024 15:21:34 -0400 Subject: [PATCH] Add Project ID support Project IDs add a new field 'proj' to the inode struct. In this patch we simply check if the feature is present before we compile and if it is we allocate the field within the parallel_restore inode and make sure this value set in the restored inode. If it is not present we ignore it. Signed-off-by: Hunter Shaffer --- utils/src/parallel_restore.c | 1 + utils/src/parallel_restore.h | 1 + 2 files changed, 2 insertions(+) diff --git a/utils/src/parallel_restore.c b/utils/src/parallel_restore.c index 2c18dc9a..407ce330 100644 --- a/utils/src/parallel_restore.c +++ b/utils/src/parallel_restore.c @@ -826,6 +826,7 @@ static spr_err_t insert_inode_items(struct scoutfs_parallel_restore_writer *wri, si->mtime.nsec = cpu_to_le32(inode->mtime.tv_nsec); si->crtime.sec = cpu_to_le64(inode->crtime.tv_sec); si->crtime.nsec = cpu_to_le32(inode->crtime.tv_nsec); + si->proj = cpu_to_le64(inode->proj); err = insert_inode_index_item(wri, SCOUTFS_INODE_INDEX_META_SEQ_TYPE, le64_to_cpu(si->meta_seq), inode->ino); diff --git a/utils/src/parallel_restore.h b/utils/src/parallel_restore.h index 4f4c3558..7d0f9d74 100644 --- a/utils/src/parallel_restore.h +++ b/utils/src/parallel_restore.h @@ -50,6 +50,7 @@ struct scoutfs_parallel_restore_inode { struct timespec ctime; struct timespec mtime; struct timespec crtime; + u64 proj; /* regular files */ u64 data_version;