Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751187AbbGDGaa (ORCPT ); Sat, 4 Jul 2015 02:30:30 -0400 Received: from col004-omc1s14.hotmail.com ([65.55.34.24]:50805 "EHLO COL004-OMC1S14.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751996AbbGDGaW (ORCPT ); Sat, 4 Jul 2015 02:30:22 -0400 X-TMN: [qRuKJOOftxpbyQNhFAiJeZDoZa9oyePb] X-Originating-Email: [yuchaochina@hotmail.com] Message-ID: From: Chao Yu To: "'Jaegeuk Kim'" CC: , , References: <1435603176-63219-1-git-send-email-jaegeuk@kernel.org> <1435603176-63219-12-git-send-email-jaegeuk@kernel.org> <20150704051610.GC15817@jaegeuk-mac02.hsd1.ca.comcast.net> In-Reply-To: <20150704051610.GC15817@jaegeuk-mac02.hsd1.ca.comcast.net> Subject: RE: [f2fs-dev] [PATCH 12/12] f2fs: use extent_cache by default Date: Sat, 4 Jul 2015 14:30:15 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-index: AQABAgMEIqGPCzxMGr8T/NyHlPk7bADv2irvABJzfFuhYixncA== Content-Language: zh-cn X-OriginalArrivalTime: 04 Jul 2015 06:30:22.0213 (UTC) FILETIME=[E7759350:01D0B622] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1375 Lines: 47 Hi Jaegeuk, > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Saturday, July 04, 2015 1:16 PM > To: Chao Yu > Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH 12/12] f2fs: use extent_cache by default [snip] > > > @@ -237,10 +237,11 @@ void update_inode(struct inode *inode, struct page *node_page) > > > ri->i_size = cpu_to_le64(i_size_read(inode)); > > > ri->i_blocks = cpu_to_le64(inode->i_blocks); > > > > > > - read_lock(&F2FS_I(inode)->ext_lock); > > > - set_raw_extent(&F2FS_I(inode)->ext, &ri->i_ext); > > > - read_unlock(&F2FS_I(inode)->ext_lock); > > > - > > > + if (F2FS_I(inode)->extent_tree) > > > > Could extent cache destroy after above check? > > I don't think so. > > The extent_tree is assigned as one way. > Once it is assigned, it will be deallocated only after evict_inode. Previously, I suspected that ->write_inode and ->evict will be executed concurrently. After checking the code, I find that would not happen, so we are safe. Thanks, > > Thanks, > > > > > Thanks, -- 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/