From patchwork Sun Feb 1 06:31:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 5756071 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6FF089F269 for ; Sun, 1 Feb 2015 06:31:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9FB7A2026D for ; Sun, 1 Feb 2015 06:31:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC507202A1 for ; Sun, 1 Feb 2015 06:31:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751052AbbBAGb1 (ORCPT ); Sun, 1 Feb 2015 01:31:27 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:58581 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751016AbbBAGb0 (ORCPT ); Sun, 1 Feb 2015 01:31:26 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.76 #1 (Red Hat Linux)) id 1YHo3w-0000a2-KN; Sun, 01 Feb 2015 06:31:16 +0000 Date: Sun, 1 Feb 2015 06:31:16 +0000 From: Al Viro To: Jens Axboe Cc: Christoph Hellwig , David Howells , Tejun Heo , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-mtd@lists.infradead.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org Subject: Re: backing_dev_info cleanups & lifetime rule fixes V2 Message-ID: <20150201063116.GP29656@ZenIV.linux.org.uk> References: <1421228561-16857-1-git-send-email-hch@lst.de> <54BEC3C2.7080906@fb.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <54BEC3C2.7080906@fb.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@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 On Tue, Jan 20, 2015 at 02:08:18PM -0700, Jens Axboe wrote: > On 01/14/2015 02:42 AM, Christoph Hellwig wrote: > >The first 8 patches are unchanged from the series posted a week ago and > >cleans up how we use the backing_dev_info structure in preparation for > >fixing the life time rules for it. The most important change is to > >split the unrelated nommu mmap flags from it, but it also remove a > >backing_dev_info pointer from the address_space (and thus the inode) > >and cleans up various other minor bits. > > > >The remaining patches sort out the issues around bdi_unlink and now > >let the bdi life until it's embedding structure is freed, which must > >be equal or longer than the superblock using the bdi for writeback, > >and thus gets rid of the whole mess around reassining inodes to new > >bdis. > > > >Changes since V1: > > - various minor documentation updates based on Feedback from Tejun > > I applied this to for-3.20/bdi, only making the change (noticed by > Jan) to kill the extra WARN_ON() in patch #11. And at that point we finally can make sb_lock and super_blocks static in fs/super.c. Do you want that in your tree, or would you rather have it done via vfs.git during the merge window after your tree goes in? It's as trivial as this: Make super_blocks and sb_lock static The only user outside of fs/super.c is gone now Signed-off-by: Al Viro Acked-by: Christoph Hellwig --- -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/super.c b/fs/super.c index eae088f..91badbb 100644 --- a/fs/super.c +++ b/fs/super.c @@ -36,8 +36,8 @@ #include "internal.h" -LIST_HEAD(super_blocks); -DEFINE_SPINLOCK(sb_lock); +static LIST_HEAD(super_blocks); +static DEFINE_SPINLOCK(sb_lock); static char *sb_writers_name[SB_FREEZE_LEVELS] = { "sb_writers", diff --git a/include/linux/fs.h b/include/linux/fs.h index 1f3c439..efc384e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1184,8 +1184,6 @@ struct mm_struct; #define UMOUNT_NOFOLLOW 0x00000008 /* Don't follow symlink on umount */ #define UMOUNT_UNUSED 0x80000000 /* Flag guaranteed to be unused */ -extern struct list_head super_blocks; -extern spinlock_t sb_lock; /* Possible states of 'frozen' field */ enum {