From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbdLHFYP (ORCPT ); Fri, 8 Dec 2017 00:24:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:41796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbdLHFYN (ORCPT ); Fri, 8 Dec 2017 00:24:13 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 660D220C51 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jaegeuk@kernel.org Date: Thu, 7 Dec 2017 21:24:12 -0800 From: Jaegeuk Kim To: LiFan Cc: "'Chao Yu'" , "'Chao Yu'" , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] f2fs: release reserved blocks for quota Message-ID: <20171208052412.GA77074@jaegeuk-macbookpro.roam.corp.google.com> References: <000b01d36d9e$199ee360$4cdcaa20$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000b01d36d9e$199ee360$4cdcaa20$@samsung.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/05, LiFan wrote: > > Quota has been modified during inc_valid_block_count(), but not in > truncate process. This patch adds it. > > Signed-off-by: Fan li > --- > fs/f2fs/f2fs.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index 82f1dc3..71fbba96 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -1619,7 +1619,9 @@ static inline void dec_valid_block_count(struct f2fs_sb_info *sbi, > sbi->current_reserved_blocks = min(sbi->reserved_blocks, > sbi->current_reserved_blocks + count); > spin_unlock(&sbi->stat_lock); > + > f2fs_i_blocks_write(inode, count, false, true); > + dquot_release_reservation_block(inode, count); The f2fs_i_blocks_write() actually handles allocation, and reserved blocks are only used for inc_valid_block_count(). Thanks, > } > > static inline void inc_page_count(struct f2fs_sb_info *sbi, int count_type) > -- > 2.7.4 >