Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1110903ybd; Wed, 26 Jun 2019 11:22:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvxexYcmXMk+UprxIdhvGUQOeGw7VzFQHS8HQi52Gj0xu6WdFaTz9DTdTMpiL0LF8l03zU X-Received: by 2002:a17:90a:2506:: with SMTP id j6mr489427pje.129.1561573348126; Wed, 26 Jun 2019 11:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561573348; cv=none; d=google.com; s=arc-20160816; b=tTb7hIE0HwlswCdaOrdR3O8Ep1+9pjgGu0DMLq+5smdPqZ9S5o9VBOxoiv/LGUqebX 8s3WPdJVnTSBIwjhZzoJAh4nclE/VjZBtpGzQL1doG3OBDE7c96dUb0e4O40/IE2E5AP MPZ6h/CfgyZyRf8X2qVl8a2s5T7cH1ZHNSLk4PmAR84Pg0lGJTAuinsge8Bj1bMtOmhB OOmDx/wztuu+AQHJ8wh137hX7hymKvBqsSQwH0SMSnSZW+k/7oVMJSrcVTlxaC7l+LWo 0Pg6cjjJ35OxUXZOuIFlbGLn1B0m0pcq4vXarPa3nSayJJHz4kT8EDzVVQG/Zp6ZSbvR zadg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SJg9Z8lr7+qHsmp1IM9Y+LJIE+gVqdIJrj7R3BQcgOA=; b=xcSXku264+mQ/Y37NxZR6CXJ+jnpAoTBbygNxL9JQnEkPlFqE4L3vNp0lEpXBuXM7k 8W3zDbNieYzd+KDgg1dBSZp/lPDYzK0JdHfiMSkUma+H24FO+Alzqq68cyW6jcpRtHDD FDhbuCMinVNBppBQxk0zqYQQKDB92m8dyvyB68uXYd8A7IVTc2LLSU6dZXlYVDxWblPb uaTKNz20Mn+N6hHIESrnJViyI5wARuIUZbL8dqfiFeibh9mEeS9mnJZhU/2ye2hRwI66 ncNpAkAXaYJ7uSK24Lt8ev1w4+HzOL3+glV/t17ck2zZLSMYacP7djUOaYf2zysO2l1x y1FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TuI1lc8j; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 36si4124117pla.80.2019.06.26.11.22.10; Wed, 26 Jun 2019 11:22:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TuI1lc8j; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726379AbfFZSVo (ORCPT + 99 others); Wed, 26 Jun 2019 14:21:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:35988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726223AbfFZSVm (ORCPT ); Wed, 26 Jun 2019 14:21:42 -0400 Received: from gmail.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 07DA221726; Wed, 26 Jun 2019 18:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561573301; bh=pNDy9ibt9Htg2aMIkROB6dLLyxI5mmHvZKejgIZn7Oc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TuI1lc8jAO4MB0RfvPP/3xjShwRJ5zX3E3hM3QnXjDNiYK2hkpbKcuEqrrq4t9f3Y HFbcTFROptxFb6vvrHInrM7dcrlL86yIu0vDiQ9n7kCmvyRn/xKjMfwDx6VqIJcthL KS8lIu7/J75DGlTa501xa6kZdnbnaUIMVJWVth/M= Date: Wed, 26 Jun 2019 11:21:39 -0700 From: Eric Biggers To: Chao Yu Cc: linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-integrity@vger.kernel.org, Jaegeuk Kim , "Theodore Y . Ts'o" , Victor Hsieh , Chandan Rajendra , Dave Chinner , Christoph Hellwig , "Darrick J . Wong" , Linus Torvalds Subject: Re: [PATCH v5 16/16] f2fs: add fs-verity support Message-ID: <20190626182138.GA30296@gmail.com> References: <20190620205043.64350-1-ebiggers@kernel.org> <20190620205043.64350-17-ebiggers@kernel.org> <90495fb1-72eb-ca42-8457-ef8e969eda51@huawei.com> <20190625175225.GC81914@gmail.com> <68c5a15f-f6a8-75e2-b485-0f1b51471995@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68c5a15f-f6a8-75e2-b485-0f1b51471995@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Jun 26, 2019 at 03:34:35PM +0800, Chao Yu wrote: > >>> + err = f2fs_convert_inline_inode(inode); > >>> + if (err) > >>> + return err; > >>> + > >>> + err = dquot_initialize(inode); > >>> + if (err) > >>> + return err; > >> > >> We can get rid of dquot_initialize() here, since f2fs_file_open() -> > >> dquot_file_open() should has initialized quota entry previously, right? > > > > We still need it because dquot_file_open() only calls dquot_initialize() if the > > file is being opened for writing. But here the file descriptor is readonly. > > I'll add a comment explaining this here and in the ext4 equivalent. > > Ah, you're right. > > f2fs_convert_inline_inode() may grab one more block during conversion, so we > need to call dquot_initialize() before inline conversion? > > Thanks, > Good point. I'll fix that here and in ext4. - Eric