From patchwork Wed May 30 06:58:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 10437709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F3ADA601D3 for ; Wed, 30 May 2018 06:57:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E51E928752 for ; Wed, 30 May 2018 06:57:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9BC928870; Wed, 30 May 2018 06:57:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7893528752 for ; Wed, 30 May 2018 06:57:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968623AbeE3G5z (ORCPT ); Wed, 30 May 2018 02:57:55 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:34480 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968515AbeE3Gzu (ORCPT ); Wed, 30 May 2018 02:55:50 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4U6omow098842 for ; Wed, 30 May 2018 06:55:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=A5LXDCqwbipAV2SXyRswVjDNwtdro5ZwgJ734yWKdD4=; b=O1n0sq37o3hHW3bHG/LkvtwMFF9vV2vkPzqoMkpjedtplDIW41PFbDvjL7CH9zmkgOQI sjhrLeq9aShTMo6vIFMqI2kITImhlQQkKH3Jz/umrIV0JxT02uDjoYZ7puzapaj77tNH cp5wxpO+WnUHG5kB1v0C16SZZVHlfIZkGRynsAAhj0UUZB9UVvvu0Ubqg1JWqLzEeUNU QLkh4DuVirv8Db89xk58ewVVrmKFWESHvW1adTrj8aOscVL7B7Xbr/2lmUG3zbfXs3/B U31i0FecyUez6iGNobrQ4yM553JONkGy1LtMCf/QMeo/2dBMXJCVFMic4I6APWfm22nA QQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2j9ev89046-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 30 May 2018 06:55:49 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w4U6tnwH004159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 30 May 2018 06:55:49 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4U6tmu8019403 for ; Wed, 30 May 2018 06:55:48 GMT Received: from tp.sg.oracle.com (/10.186.49.52) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 29 May 2018 23:55:48 -0700 From: Anand Jain To: linux-btrfs@vger.kernel.org Subject: [PATCH 3/6] btrfs: update device_list_mutex protected items Date: Wed, 30 May 2018 14:58:18 +0800 Message-Id: <20180530065821.28385-4-anand.jain@oracle.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180530065821.28385-1-anand.jain@oracle.com> References: <20180530065821.28385-1-anand.jain@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8908 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1805300079 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Include items of fs_uuids::fs_devices to be protected by device_list_mutex, like (but not limited to) fs_devices::opened, fs_devices::total_devices and fs_devices::num_devices. This is been done in the code already. Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 0fdb9b717398..e3dd25238eb9 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -164,7 +164,8 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, * * fs_devices::device_list_mutex (per-fs, with RCU) * ------------------------------------------------ - * protects updates to fs_devices::devices, ie. adding and deleting + * Protects updates to fs_uuids::fs_devices items, and fs_devices::devices, ie. + * adding and deleting. * * simple list traversal with read-only actions can be done with RCU protection *