Add Retention Flag support

Adds a check in the inode creation path that checks whether
the retention feature is present. If it is then we set the
inode's flag value otherwise it stays as 0.

Signed-off-by: Hunter Shaffer <hunter.shaffer@versity.com>
This commit is contained in:
Hunter Shaffer
2024-08-19 17:44:44 -04:00
committed by Auke Kok
parent d653c78504
commit c4147a7e8d
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -818,6 +818,7 @@ static spr_err_t insert_inode_items(struct scoutfs_parallel_restore_writer *wri,
si->mode = cpu_to_le32(inode->mode);
si->rdev = cpu_to_le32(inode->rdev);
si->flags = 0;
si->flags = cpu_to_le32(inode->flags);
si->atime.sec = cpu_to_le64(inode->atime.tv_sec);
si->atime.nsec = cpu_to_le32(inode->atime.tv_nsec);
si->ctime.sec = cpu_to_le64(inode->ctime.tv_sec);
+2
View File
@@ -46,6 +46,8 @@ struct scoutfs_parallel_restore_inode {
u32 gid;
u32 mode;
u32 rdev;
u32 flags;
u8 pad[4];
struct timespec atime;
struct timespec ctime;
struct timespec mtime;