Return-Path: Received: from userp2130.oracle.com ([156.151.31.86]:53151 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754718AbdLODsS (ORCPT ); Thu, 14 Dec 2017 22:48:18 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vBF3liw3182334 for ; Fri, 15 Dec 2017 03:48:17 GMT Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2ev6fp01m7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 15 Dec 2017 03:48:17 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vBF3mGsm003225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 15 Dec 2017 03:48:17 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vBF3mGcT014361 for ; Fri, 15 Dec 2017 03:48:16 GMT From: Anand Jain To: linux-btrfs@vger.kernel.org Subject: [PATCH v5] Add cli and ioctl to ignore a scanned device Date: Fri, 15 Dec 2017 11:48:45 +0800 Message-Id: <20171215034847.26258-1-anand.jain@oracle.com> Sender: linux-btrfs-owner@vger.kernel.org List-ID: Adds cli and ioctl to forget a scanned device or forget all stale devices in the kernel. v5: Adds feature to delete all stale devices Reuses btrfs_free_stale_devices() fn and so depends on the patch-set [1] in the ML. Uses struct btrfs_ioctl_vol_args_v2 instead of struct btrfs_ioctl_vol_args as arg Does the device path matching instead of btrfs_device matching (we won't delete the mounted device as btrfs_free_stale_devices() checks for it) v4: No change. But as the ML thread may be confusing, so resend. v3: No change. Send to correct ML. v2: Accepts review from Nikolay, details are in the specific patch. Patch 1/2 is renamed from [PATCH 1/2] btrfs: refactor btrfs_free_stale_device() to get device list delete to [PATCH 1/2] btrfs: add function to device list delete Anand Jain (1): btrfs: add feature to forget one or all stale device(s) in the kernel fs/btrfs/super.c | 27 +++++++++++++++++++++++---- fs/btrfs/volumes.c | 9 +++++++++ fs/btrfs/volumes.h | 1 + include/uapi/linux/btrfs.h | 6 +++++- 4 files changed, 38 insertions(+), 5 deletions(-) Anand Jain (1): btrfs-progs: add cli to forget one or all scanned devices cmds-device.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ioctl.h | 6 ++++- 2 files changed, 82 insertions(+), 1 deletion(-) -- 2.7.0