Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755309AbbDNMPL (ORCPT ); Tue, 14 Apr 2015 08:15:11 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:40051 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753541AbbDNMPI convert rfc822-to-8bit (ORCPT ); Tue, 14 Apr 2015 08:15:08 -0400 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="90656091" From: Zhao Lei To: "'Boaz Harrosh'" , "'Christoph Hellwig'" CC: , "'Jan Kara'" , "'Jens Axboe'" , "'LKML'" References: <016d01d07380$fc37fc40$f4a7f4c0$@cn.fujitsu.com> <552A57F8.7020002@plexistor.com> <552A839C.4070101@plexistor.com> <030a01d075d3$cc1ebc60$645c3520$@cn.fujitsu.com> <552BB70A.3070603@plexistor.com> In-Reply-To: <552BB70A.3070603@plexistor.com> Subject: RE: Regression caused by using node_to_bdi() Date: Tue, 14 Apr 2015 20:14:48 +0800 Message-ID: <040701d076ac$9a6dbd40$cf4937c0$@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQGFPDSkCPVR9AeIZuOecNLBimqRUwJHSBkKAYlPTLUBb/dSfgKyH1VrnaNJ8lA= Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2500 Lines: 80 Hi, Boaz > -----Original Message----- > From: Boaz Harrosh [mailto:boaz@plexistor.com] > Sent: Monday, April 13, 2015 8:31 PM > To: Zhao Lei; 'Boaz Harrosh'; 'Christoph Hellwig' > Cc: linux-fsdevel@vger.kernel.org; 'Jan Kara'; 'Jens Axboe'; 'LKML' > Subject: Re: Regression caused by using node_to_bdi() > > On 04/13/2015 01:22 PM, Zhao Lei wrote: > <> > > A new bad news: > > This patch make filesystem unstable. > > > > Rrrr yes sorry Lei. Why this boots my systems is not clear this is not what I > intended to write. > > Here is what I meant to write (replacing the old one): Thanks for v2 patch. But is still halt the test machine with same error message in boot. I applied the patch on v4.0-rc1, not just after the patch of introduce node_to_bdi() in this mail. Is way of inode->i_sb->s_bdi changed after we move to node_to_bdi()? Thanks Zhaolei > ---- > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 32a8bbd..e0375e1 > 100644 > --- a/fs/fs-writeback.c > +++ b/fs/fs-writeback.c > @@ -78,7 +78,7 @@ int writeback_in_progress(struct backing_dev_info > *bdi) } EXPORT_SYMBOL(writeback_in_progress); > > -struct backing_dev_info *inode_to_bdi(struct inode *inode) > +struct backing_dev_info *__inode_to_bdi(struct inode *inode) > { > struct super_block *sb; > > @@ -92,7 +92,7 @@ struct backing_dev_info *inode_to_bdi(struct inode > *inode) #endif > return sb->s_bdi; > } > -EXPORT_SYMBOL_GPL(inode_to_bdi); > +EXPORT_SYMBOL_GPL(__inode_to_bdi); > > static inline struct inode *wb_inode(struct list_head *head) { diff --git > a/include/linux/backing-dev.h b/include/linux/backing-dev.h index > aff923a..53d97cd 100644 > --- a/include/linux/backing-dev.h > +++ b/include/linux/backing-dev.h > @@ -107,7 +107,16 @@ struct backing_dev_info { #endif }; > > -struct backing_dev_info *inode_to_bdi(struct inode *inode); > +struct backing_dev_info *__inode_to_bdi(struct inode *inode); > + > +static inline > +struct backing_dev_info *inode_to_bdi(struct inode *inode) { > + if (!inode || !inode->i_sb || !inode->i_sb->s_bdi) > + return __inode_to_bdi(inode); > + > + return inode->i_sb->s_bdi; > +} > > int __must_check bdi_init(struct backing_dev_info *bdi); void > bdi_destroy(struct backing_dev_info *bdi); > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/