Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1201403rdb; Fri, 20 Oct 2023 11:10:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE9timZCuhLXvDjGLrqP72I70itGGiiYZcT9KD2wrE/EYAXI85mRH3gFx3Xq3YnH1pbfedS X-Received: by 2002:a05:6358:3413:b0:142:fd2b:da2e with SMTP id h19-20020a056358341300b00142fd2bda2emr2630329rwd.31.1697825426554; Fri, 20 Oct 2023 11:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697825426; cv=none; d=google.com; s=arc-20160816; b=UOvGSardHSBxVYd/63+WCqUMFyoC6cJpyizkK6y2OY6rft32z3hh7AUKIwWnLg00NE e/EbXJp+ifB9DlAcR9Qh7moYsvnq3WE+kWp7DyD1+6JaFEB/end8qVmIJ9tLPwsgK/+0 mKu/JDBcMp7oRyalLO4Oq+cVUkArHMztXQPUswYgVkopoPIgCIu3AtgCK98CZXgTSYP8 rWOtE9n60GyTBWJz3qU+8GOlYS279t0HFvjgaq6qiiaaA4X6erdojBF0YsOot1fkyIGP 1TSUVp0pCFPDTZest/0i9hMAvVHVCuUcxkyyfPvjMl9jOPqUFzfi9dEY080sOaCpYP1d /D3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=H+LlUGJ4p6LVU8CW47o50OSle0+FDDDz35cj2TTIaSE=; fh=eiCPryG+V/fuvxzMKEqq45IOZRecq3OlElnQtXZ+v8w=; b=dDUYzTG/dIdmhqIURrd00LVjFd7OR80nPNrv/fVeD29opW1OVo9bYY1IMzAa1vzJLu 6fk2HZecx2o76Ttbslob3Pj5Ng+9eJvVzeXa8Jp9LMHLhiocsj43KQwSPgOay6Vd9SLb 4m84IiNdTxu7h2UxCgHTE4xI1UMhaveBvhG2VxOeNFVnvnauVDyw4J0WdTlBSdY9ge/Y HRbUe9Qlcl5+PAohMb1guRVVPD6snVp2JJw/0X47ETQiG9ALdzcpZfON36BHVPsS5J8M 0FzMIyVHqpCq9NhV4bghXxpz0Ju3bgOJgwQQQerIJOt+J4K08GOONP0+sCN4ILeOlsTw 4VSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=U0ijHr2z; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id r2-20020a632b02000000b005add209e106si2244575pgr.442.2023.10.20.11.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 11:10:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=U0ijHr2z; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 32FF08207242; Fri, 20 Oct 2023 11:10:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377936AbjJTSJ7 (ORCPT + 99 others); Fri, 20 Oct 2023 14:09:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377925AbjJTSJ7 (ORCPT ); Fri, 20 Oct 2023 14:09:59 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FF2CD55; Fri, 20 Oct 2023 11:09:56 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7E1791F750; Fri, 20 Oct 2023 18:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1697825394; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=H+LlUGJ4p6LVU8CW47o50OSle0+FDDDz35cj2TTIaSE=; b=U0ijHr2z9cSLocKOFEH5XNS6/kySV7/UaovynnJ6kQQmQXP7DMfHDrfow6YNGyOfZ0cDaG 60v7iqO5DKKo4ZEAYNQwCb016R+I9jyaiWFnp14AJx1qDY4cTqeXCPZSaB9zDQkP4eIviB a7qPdLwe2lkAaxj9WAfZWUhdGs8NFIQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1697825394; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=H+LlUGJ4p6LVU8CW47o50OSle0+FDDDz35cj2TTIaSE=; b=VpT9ISZzWgpvqNomkfiYyEyQm75WRYtR06NEG7JqbE4te7Fcnq6Zg+M8lB+ot9gPRGojJx c6nyQQS4RPf2BCDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6EF0713584; Fri, 20 Oct 2023 18:09:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mlUDG3LCMmUuNAAAMHmgww (envelope-from ); Fri, 20 Oct 2023 18:09:54 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id EDD85A06E3; Fri, 20 Oct 2023 20:09:53 +0200 (CEST) Date: Fri, 20 Oct 2023 20:09:53 +0200 From: Jan Kara To: Linus Torvalds Cc: Andy Shevchenko , Baokun Li , Josh Poimboeuf , Jan Kara , Nathan Chancellor , Nick Desaulniers , Kees Cook , Ferry Toth , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [GIT PULL] ext2, quota, and udf fixes for 6.6-rc1 Message-ID: <20231020180953.wdehmwqoqndk5shq@quack3> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -6.60 X-Spamd-Result: default: False [-6.60 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_SEVEN(0.00)[11]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 20 Oct 2023 11:10:00 -0700 (PDT) On Fri 20-10-23 10:26:26, Linus Torvalds wrote: > On Fri, 20 Oct 2023 at 08:12, Andy Shevchenko > wrote: > > > > > > --- a/fs/quota/dquot.c > > > > +++ b/fs/quota/dquot.c > > > > @@ -632,8 +632,10 @@ static inline int dquot_write_dquot(struct dquot *dquot) > > > > { > > > > int ret = dquot->dq_sb->dq_op->write_dquot(dquot); > > > > if (ret < 0) { > > > > +#if 0 > > > > quota_error(dquot->dq_sb, "Can't write quota structure " > > > > "(error %d). Quota may get out of sync!", ret); > > > > +#endif > > > > /* Clear dirty bit anyway to avoid infinite loop. */ > > > > clear_dquot_dirty(dquot); > > > > } > > > > Doing the same on the my branch based on top of v6.6-rc6 does not help. > > So looks like a race condition somewhere happening related to that dirty bit > > (as comment states it needs to be cleaned to avoid infinite loop, that's > > probably what happens). > > Hmm. Normally, dirty bits should always be cleared *before* the > write-back, not after it. Otherwise you might lose a dirty event that > happened *during* writeback. Yes, and normally we clear the dirty bit in dquot_commit() before writing the dquot. However if there is an error in fs-private ->write_dquot() helper before calling back into dquot_commit() (e.g. ext4 fails to start a transaction), ->write_dquot() can return without clearing the dirty bit. For dqput() to not loop indefinitely trying to clean the dquot, we clear the dirty bit here just to be sure in case of error. > But I don't know the quota code. > > ... the fact that the #if 0 doesn't help in another case does say that > it's not the quota_error() call itself. Which it really couldn't have > been (apart from timing and compiler bugs), but it's still a data > point, I guess. Yeah, that's a bit weird. I'm really curious what the problem is. Honza -- Jan Kara SUSE Labs, CR