From patchwork Mon Jun 1 06:16:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 6517361 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CCCCBC0020 for ; Mon, 1 Jun 2015 06:16:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD361205EB for ; Mon, 1 Jun 2015 06:16:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1D87205E9 for ; Mon, 1 Jun 2015 06:16:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754004AbbFAGQk (ORCPT ); Mon, 1 Jun 2015 02:16:40 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:37340 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751226AbbFAGQj (ORCPT ); Mon, 1 Jun 2015 02:16:39 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t516Gcna017900 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Jun 2015 06:16:38 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t516GciJ023179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 1 Jun 2015 06:16:38 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t516Gbew025094 for ; Mon, 1 Jun 2015 06:16:37 GMT Received: from localhost.localdomain (/117.250.7.184) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 31 May 2015 23:16:37 -0700 From: Anand Jain To: linux-btrfs@vger.kernel.org Subject: [PATCH 1/4] Btrfs: device path change must be logged Date: Mon, 1 Jun 2015 14:16:16 +0800 Message-Id: <1433139379-640-1-git-send-email-anand.jain@oracle.com> X-Mailer: git-send-email 2.4.1 X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From the issue diagnosable point of view, log if the device path is changed. Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 4ffcdf9..a51d492 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -606,6 +606,10 @@ static noinline int device_list_add(const char *path, return -EEXIST; } + printk_in_rcu(KERN_INFO \ + "BTRFS: device fsid %pU devid %llu old path %s new path %s\n", + disk_super->fsid, devid, rcu_str_deref(device->name), path); + name = rcu_string_strdup(path, GFP_NOFS); if (!name) return -ENOMEM;