From patchwork Mon Oct 15 18:28:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Jansen X-Patchwork-Id: 1595011 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BDC423FD9C for ; Mon, 15 Oct 2012 18:28:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754476Ab2JOS2t (ORCPT ); Mon, 15 Oct 2012 14:28:49 -0400 Received: from ysabell.rzone.de ([81.169.144.237]:8498 "EHLO ysabell.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754092Ab2JOS2s (ORCPT ); Mon, 15 Oct 2012 14:28:48 -0400 Received: from gargravarr.store (gargravarr.store [192.168.42.236]) by ysabell.rzone.de (Postfix) with ESMTP id 4101E7DF; Mon, 15 Oct 2012 20:28:46 +0200 (MEST) Received: by gargravarr.store (Postfix, from userid 32466) id 338ADC008; Mon, 15 Oct 2012 20:28:46 +0200 (CEST) From: Arne Jansen To: linux-btrfs@vger.kernel.org Cc: chris.mason@fusionio.com Subject: [PATCH] Btrfs: send correct rdev and mode in btrfs-send Date: Mon, 15 Oct 2012 20:28:46 +0200 Message-Id: <1350325726-6306-1-git-send-email-sensille@gmx.net> X-Mailer: git-send-email 1.7.3.4 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org When sending a device file, the stream was missing the mode. Also the rdev was encoded wrongly. Signed-off-by: Arne Jansen --- 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 c7beb54..57933e8 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -2430,7 +2430,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);