Thread (15 messages) 15 messages, 6 authors, 2021-01-12

Re: [PATCH 2/2] btrfs: send: fix invalid commands for inodes with changed type but same gen

From: David Sterba <hidden>
Date: 2021-01-11 21:18:04

On Mon, Jan 11, 2021 at 08:02:43PM +0100, Roman Anasal wrote:
quoted hunk ↗ jump to hunk
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -6299,12 +6299,18 @@ static int changed_inode(struct send_ctx *sctx,
 		right_gen = btrfs_inode_generation(sctx->right_path->nodes[0],
 				right_ii);
 
+		u64 left_type = S_IFMT & btrfs_inode_mode(
+				sctx->left_path->nodes[0], left_ii);
+		u64 right_type = S_IFMT & btrfs_inode_mode(
+				sctx->right_path->nodes[0], right_ii);
Minor note, we don't use the declarations mixed with code, so the
variables need to be declared separatelly, but I can fix that unless
there's another reason to update and resend the patches.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help