diff options
author | Arne Jansen <sensille@gmx.net> | 2012-10-15 14:28:46 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-10-25 15:45:25 -0400 |
commit | d79e50433b2bea09eb680ed5fae15e8a12356353 (patch) | |
tree | ff4139f333be0c8ec9fb5dc97de2ff1d44748eb2 /fs | |
parent | 96b5bd777118bb673b458b41bbefc7f0f31d65c9 (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')
-rw-r--r-- | fs/btrfs/send.c | 3 |
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); | |||
2462 | TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH_LINK, p); | 2462 | TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH_LINK, p); |
2463 | } else if (S_ISCHR(mode) || S_ISBLK(mode) || | 2463 | } else if (S_ISCHR(mode) || S_ISBLK(mode) || |
2464 | S_ISFIFO(mode) || S_ISSOCK(mode)) { | 2464 | S_ISFIFO(mode) || S_ISSOCK(mode)) { |
2465 | TLV_PUT_U64(sctx, BTRFS_SEND_A_RDEV, rdev); | 2465 | TLV_PUT_U64(sctx, BTRFS_SEND_A_RDEV, new_encode_dev(rdev)); |
2466 | TLV_PUT_U64(sctx, BTRFS_SEND_A_MODE, mode); | ||
2466 | } | 2467 | } |
2467 | 2468 | ||
2468 | ret = send_cmd(sctx); | 2469 | ret = send_cmd(sctx); |