From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755536AbdKQCLp (ORCPT ); Thu, 16 Nov 2017 21:11:45 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:10935 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754930AbdKQCLj (ORCPT ); Thu, 16 Nov 2017 21:11:39 -0500 Subject: Re: [PATCH] quota: be aware of error from dquot_initialize To: Jan Kara CC: , , References: <20171113033148.25464-1-yuchao0@huawei.com> <20171113091835.GA24824@quack2.suse.cz> <20171114092430.GB7053@quack2.suse.cz> From: Chao Yu Message-ID: Date: Fri, 17 Nov 2017 10:10:11 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171114092430.GB7053@quack2.suse.cz> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.5A0E4534.002A,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 8dbd5c3e7a13740bc36c1a8c1f4249ab Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/11/14 17:24, Jan Kara wrote: > On Tue 14-11-17 11:43:49, Chao Yu wrote: >> On 2017/11/13 17:18, Jan Kara wrote: >>> On Mon 13-11-17 11:31:48, Chao Yu wrote: >>>> Commit 6184fc0b8dd7 ("quota: Propagate error from ->acquire_dquot()") >>>> missed to handle error from dquot_initialize in dquot_file_open, fix it. >>>> >>>> Signed-off-by: Chao Yu >>> >>> Good spotting. I've added the patch to my tree. >> >> Thanks for queuing the patch. :) >> >> BTW, I notice in add_dquot_ref we also didn't handle error of >> __dquot_initialize, should we handle it too? > > It is questionable what we should do with an error in add_dquot_ref(). User > asked us to turn quotas on - that succeeded just fine but then we walked > over already active inodes in add_dquot_ref(), wanted to initialize > accounting information, and that failed for some inode. We can just leave > quota on, the accounting will work for other inodes - that's what we do > now. We could also propagate the failure up and refuse to turn quotas off. > I guess that's a somewhat better approach so if you want to implement that, > go ahead. Sorry for the delay. Have sent one patch to fix this issue, could you please take a look at it? Thanks, > > Honza >