summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorArne Jansen <sensille@gmx.net>2012-10-15 18:28:46 +0000
committerChris Mason <chris.mason@fusionio.com>2012-10-25 15:45:25 -0400
commitd79e50433b2bea09eb680ed5fae15e8a12356353 (patch)
treeff4139f333be0c8ec9fb5dc97de2ff1d44748eb2 /fs/btrfs
parent96b5bd777118bb673b458b41bbefc7f0f31d65c9 (diff)
Btrfs: send correct rdev and mode in btrfs-send
When sending a device file, the stream was missing the mode. Also the rdev was encoded wrongly. Signed-off-by: Arne Jansen <sensille@gmx.net>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/send.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 4f20c49edd58..97cc5399306b 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -2462,7 +2462,8 @@ verbose_printk("btrfs: send_create_inode %llu\n", ino);
TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH_LINK, p);
} else if (S_ISCHR(mode) || S_ISBLK(mode) ||
S_ISFIFO(mode) || S_ISSOCK(mode)) {
- TLV_PUT_U64(sctx, BTRFS_SEND_A_RDEV, rdev);
+ TLV_PUT_U64(sctx, BTRFS_SEND_A_RDEV, new_encode_dev(rdev));
+ TLV_PUT_U64(sctx, BTRFS_SEND_A_MODE, mode);
}
ret = send_cmd(sctx);