From 487e81d2a4009d17dcfe7c67b78b75cd96bcdde3 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Fri, 3 Dec 2021 17:18:14 -0500 Subject: btrfs: pass the ino via truncate control In the future we are going to want to truncate inode items without needing to have an btrfs_inode to pass in, so add ino to the btrfs_truncate_control and use that to look up the inode items to truncate. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/inode-item.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/btrfs/inode-item.h') diff --git a/fs/btrfs/inode-item.h b/fs/btrfs/inode-item.h index 5817ba4ddd23..b0dc14efde30 100644 --- a/fs/btrfs/inode-item.h +++ b/fs/btrfs/inode-item.h @@ -32,6 +32,9 @@ struct btrfs_truncate_control { /* OUT: the number of bytes to sub from this inode. */ u64 sub_bytes; + /* IN: the ino we are truncating. */ + u64 ino; + /* * IN: minimum key type to remove. All key types with this type are * removed only if their offset >= new_size. -- cgit v1.2.3