Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3586397ybl; Fri, 20 Dec 2019 11:51:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxSUQbk9do/lY1Z7dzjUmxOwq4lRbvZOWBAfEcOX181/mX4Qbvcix7rgJK7XSovdZcUbMGl X-Received: by 2002:a05:6830:1199:: with SMTP id u25mr15882361otq.344.1576871486028; Fri, 20 Dec 2019 11:51:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576871486; cv=none; d=google.com; s=arc-20160816; b=LcNjE/YDOb5jiqGpUICKB8Gy3khTk8EZiEdm2VrWBE86O6bxmnLFNORjGDo61SNWp3 jDrwO2DXGQb5IyNBSulh9n8K8yqDvpPbYoTE4OpFqQwPLe9dFFhP1ywHe2vuaec7EuVC cQPhDSB7iQXPnslVtmuqupyG2uq7hoGZO9vM1MN5QYm0r+hK0f1r1gCKN3x/FEazN/fG MhODO1ajpzBVNvXC8uWEuX/kGtr/1bQvomdoKCDXHNQGnz14SugRBYnyfhYhPbknWf2k Lx0PWvCKzK2Fh5ncdLWi4ulGJqe4o6l9jYnp8+xROMlpMVJvHOaF5+tEU9rUEVpk5kID fhgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=DIF8dHy1lTS5AXETb4eGjjX2UoAp1O3UhCGS1D3jxec=; b=qfmk0/0jiHNIdL+OnscF6DqlXJyxiviXqa85bm1V/VBBPuT7c0nILJUruBdo8xt0uO WVx8wFPP0AnDiI2hKj99GhK6ttG+wgtjEEHJ7VwXLoRLtoyiqRsmHBduwPcE/WmkZU5y VLD/J4iHajlg8ByWSRcOC1KbKQFn5oj9B0aKSrMYRX55IkNQTFtxrHJzWPM7yMGG4+BJ OBa2P3zDhLBm/1NzJ+FUp2ZFRPLSBU/RnNirYBcIWCdJiy2OWD3onlmlWha46+L/LjSm zxyRUwHaVLCx/2RVLkUWBH48mn1xNIVVEfmsQrmY777QbTmb5Eplct8TspVWZcdSKljK TYcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="HDd/bhKR"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si5284564oig.231.2019.12.20.11.51.13; Fri, 20 Dec 2019 11:51:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="HDd/bhKR"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727474AbfLTTua (ORCPT + 99 others); Fri, 20 Dec 2019 14:50:30 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:60522 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727394AbfLTTua (ORCPT ); Fri, 20 Dec 2019 14:50:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=DIF8dHy1lTS5AXETb4eGjjX2UoAp1O3UhCGS1D3jxec=; b=HDd/bhKRffKrZQjxdEiO1WA2C h61xt0rUoBdJBYpD4d3fJmCuWgsjgDs8MOFlg4FQpwTBp7hEa7WHhpwa8L1vyWFpmB8V528lsM6/j LHALvTEKckosoj6TkyoNiPpji9lyVoBJlls6wQRFzKz29/bWIpwarRtVfraC8VLpUQsQlStwmt0qq tC8W8DksUlNzLy7rUUXVYKIvcepB48Yz2niFVwzsVMjmS1ZCKRbDISelLa1+rSirJmTh2Dj8cCoT4 OyY3/dvvWV7+pgvs2EP+c7K3KYK6FzgHlhB8RBWXPrADcGeK2XiaEjswhtgywaOsr5qvHxUNCAPvL 6o9i4SyKg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iiOI5-0005N1-P2; Fri, 20 Dec 2019 19:50:25 +0000 Date: Fri, 20 Dec 2019 11:50:25 -0800 From: Matthew Wilcox To: Amir Goldstein Cc: Chris Down , linux-fsdevel , Al Viro , Jeff Layton , Johannes Weiner , Tejun Heo , linux-kernel , kernel-team@fb.com, Hugh Dickins , Miklos Szeredi , "zhengbin (A)" Subject: Re: [PATCH] fs: inode: Reduce volatile inode wraparound risk when ino_t is 64 bit Message-ID: <20191220195025.GA9469@bombadil.infradead.org> References: <20191220024936.GA380394@chrisdown.name> <20191220121615.GB388018@chrisdown.name> <20191220164632.GA26902@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 20, 2019 at 07:35:38PM +0200, Amir Goldstein wrote: > On Fri, Dec 20, 2019 at 6:46 PM Matthew Wilcox wrote: > > > > On Fri, Dec 20, 2019 at 03:41:11PM +0200, Amir Goldstein wrote: > > > Suggestion: > > > 1. Extend the kmem_cache API to let the ctor() know if it is > > > initializing an object > > > for the first time (new page) or recycling an object. > > > > Uh, what? The ctor is _only_ called when new pages are allocated. > > Part of the contract with the slab user is that objects are returned to > > the slab in an initialised state. > > Right. I mixed up the ctor() with alloc_inode(). > So is there anything stopping us from reusing an existing non-zero > value of i_ino in shmem_get_inode()? for recycling shmem ino > numbers? I think that would be an excellent solution to the problem! At least, I can't think of any problems with it.