Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp839960ybz; Wed, 22 Apr 2020 08:54:31 -0700 (PDT) X-Google-Smtp-Source: APiQypLQI+UrmQNxa0BDmyd1VaSC5U8VUF5Gtqe/MyCWM1DO4s5BitiVRH0bv/2ToHTcxqRXyJ4i X-Received: by 2002:a17:907:118b:: with SMTP id uz11mr25801560ejb.89.1587570871785; Wed, 22 Apr 2020 08:54:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587570871; cv=none; d=google.com; s=arc-20160816; b=QwheJ3PBiGjtR/qHRPrsoY8BFgfkMc1fIm+doJ9VunU6gGu9lm1z1fyUp3yY61xUat 4p4jfi9RoZFlsPvBXRsE02+fczB6vlpwgfGvaZdGA3QtlL232l1fwr0d8TuePq98g8W9 ZEyqN12dRRPDPnJzvrpj4gWr4xRUFdH9S2M0TNcIenSxY3AmmjGaBorCtEXqVZYpHqfy U12ndy4QYn5TqQA8KOc0ZJQ8vev4tJQQSEFQEvxAYgIMVylmcG5Trt3Tj12CyYtAbZJO NUuClDFMzuQ31LOFSU+0Pt4I3u+KlM/u9jrzbR3DJG2X6Y2m61TgWuqEuHaZtWE/iue9 BenA== 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; bh=txajvEhnSEKhq5ZP8nth2+7lOw9MIcxSWOct8yDo3PU=; b=PWWxWXxx5XJ4X07WPB/pM9hqzYfucy4SBQDjGBQnG3i73XkHruJ95s+q9l2bNDI0JX Jv56iQrMsn/p1XUxEaeknfjAVqP6I3NNjKy2Aur56E15uCebQGvjIQoOwh+EVXGOrkSN RwyAEzJgzg47PYYo2fWGpAyUwH7UVffaM/9tc6a0KzkLb1WVtKqAIJTkjbBrR1oclT0I cvfoimG76RDsC+K1jmBNAAsqPfg0H7Q9mMXx0AnaTPBu4sbA+dJh4OGJCqU+SonyTaJJ xZHWCzh56WoGJ9QLjItea+dPkks8aZTkr91b9oi9lOYF9wNXBfOZ0ueFHYgGQz+1j5k8 dOMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j8si3292510ejt.348.2020.04.22.08.53.58; Wed, 22 Apr 2020 08:54:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726660AbgDVPxe (ORCPT + 99 others); Wed, 22 Apr 2020 11:53:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:56528 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726648AbgDVPxd (ORCPT ); Wed, 22 Apr 2020 11:53:33 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5A72DAE6E; Wed, 22 Apr 2020 15:53:31 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 6E7DD1E0E56; Wed, 22 Apr 2020 17:53:31 +0200 (CEST) Date: Wed, 22 Apr 2020 17:53:31 +0200 From: Jan Kara To: Theodore Ts'o Cc: Ext4 Developers List Subject: Re: [PATCH] ext4: increase wait time needed before reuse of deleted inode numbers Message-ID: <20200422155331.GB20756@quack2.suse.cz> References: <20200414023925.273867-1-tytso@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200414023925.273867-1-tytso@mit.edu> 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 Mon 13-04-20 22:39:25, Theodore Ts'o wrote: > Current wait times have proven to be too short to protect against inode > reuses that lead to metadata inconsistencies. > > Now that we will retry the inode allocation if we can't find any > recently deleted inodes, it's a lot safer to increase the recently > deleted time from 5 seconds to a minute. > > Google-Bug-Id: 36602237 > Signed-off-by: Theodore Ts'o Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/ext4/ialloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c > index 9faaf32be5cc..4b8c9a9bdf0c 100644 > --- a/fs/ext4/ialloc.c > +++ b/fs/ext4/ialloc.c > @@ -662,7 +662,7 @@ static int find_group_other(struct super_block *sb, struct inode *parent, > * block has been written back to disk. (Yes, these values are > * somewhat arbitrary...) > */ > -#define RECENTCY_MIN 5 > +#define RECENTCY_MIN 60 > #define RECENTCY_DIRTY 300 > > static int recently_deleted(struct super_block *sb, ext4_group_t group, int ino) > -- > 2.24.1 > -- Jan Kara SUSE Labs, CR