Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3459197ybl; Fri, 20 Dec 2019 09:36:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyQjkQ2h01xTh/51I/LIiDnn716gxTpRpkimZZVH20+VfIaQU6mDknyAVlmcq1EwEnmo0Fn X-Received: by 2002:a9d:6481:: with SMTP id g1mr16517680otl.180.1576863417179; Fri, 20 Dec 2019 09:36:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576863417; cv=none; d=google.com; s=arc-20160816; b=OjXIAr+5F9gUpHAbFr45lT+hsPIufjT3mWm2C9qAiQz0UD23Zd0yaQA+JRGNdWJmjv wreduj9R540e3xw3nPcRdLj5z8FbhDqIubuzEWFBHedVe43OobGllS323WpZW18m/o7H uR3nWQXlmAgrTURyP1xO9eGZ971DUwBgh5oZl4Y7P1G5dM7Lyx3PsaF8VAKJ4uY3isKE 9Ca53ip+Pb7CMe9Z311H5+Xq3dHS+HnN/tdMw4ablYB9Ok8G14yGGd1zlT74cI94qswZ HpA3ig7w/yRVmp6mthgcvqveCdOe7qZR03GbIVhoq5z3vAb0tsxVQRqCrxUms60bQ2uU +bVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wLQc/GdbaTxAeCv2i12B87WYv/+yect1z7boH4l+zxc=; b=M6bSTCboQq07/JwmiSFJIXCEgZQOj38C6H9Efkj2dSC/PNsRCqDwlgJOpuBwPnKbto 7SgEvfzuo54tzZ0Uxi8xXnmN+W5OWN/+L4YmOpIv1EhKFs86HkvgFrXQzadK2bl0xbba 7Krl5i02YidaHI0ntz6IALQO/2eUW7s64lLF5+azdYt/ogxMRh9nY81p6/a/kqXIvuEF OdmoAopOJvKZM43Np37wTl2xEwX2Mg5uIXqIKJDv2oDwNP3dKUZoMqHvsucnKSRZmUQb 3UrxwKmi02PKRrwACKaotx28y3YUGmEEES/u4x2Dse5NjovqUwPNFKQPD8ILNkfPLMnW LuwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Snbp1guX; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si5377268otn.311.2019.12.20.09.36.44; Fri, 20 Dec 2019 09:36:57 -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=pass header.i=@gmail.com header.s=20161025 header.b=Snbp1guX; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727456AbfLTRfv (ORCPT + 99 others); Fri, 20 Dec 2019 12:35:51 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:39167 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727388AbfLTRfu (ORCPT ); Fri, 20 Dec 2019 12:35:50 -0500 Received: by mail-io1-f66.google.com with SMTP id c16so8749734ioh.6; Fri, 20 Dec 2019 09:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wLQc/GdbaTxAeCv2i12B87WYv/+yect1z7boH4l+zxc=; b=Snbp1guXp8WJMDJ7NEVUNEciyC9/XuhqMy9fNg3+bjS7yLK55or/hnw71baS4sJ1Mt gzT94sJGeHuW14jm+2j6qfFPKE4fxYOMefHHNOyWm4Vx6iUMBpQA3pOBR3Hz1jiE5bzd 3XIYrAbuX9Rs5d01UVLArDmRdGdajXIfhotqQPWNBW8BhhRazdOCFAqEp7wb4B7WA5oi R8ERO6pLFKULtxTKJX1gm+JWcAa1SWcuZtqWpraDjNiZD3GNoQJbRUq0E7kt7TFN0IVN Yt6/DqIt5P2n1Ldst1jhjRK8ttvNUA8gjjClChFZHWY3we+2+1G+vHfDP1Mcp2Y8OjvI 35pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wLQc/GdbaTxAeCv2i12B87WYv/+yect1z7boH4l+zxc=; b=Y8hJlwY0YQMgCVL5laDXvTg3hn72/mlgy3A5DBOv2RqDCWGQxEgexRsFOHXoxoqpYq FR8vz0/mx9ioJfdM1ZruXf4dYnxmejY/VvnFtS6M0VWzdxvIwk1pVTFzzJqtf2jcGi1l mv5IyA6bIMOFX/DDjFEOxS5cIpvaSI55Yq57RyQZLOlBONk8wZCvjoy48GhN7tPIZH6L bcaf5gKMF3rFFZ+7Fx9F9Yeuqo6bJQeZCbkGjY0nwh8D+EzE+iv3Q5DF0AM4MHJ7KvzB MisHNocBop/llqcsdAdUXvPKc7LUJ0etPYzyGnvzBOpu74OJ21WTZMH+Z//q3ObdW1Yd +qJg== X-Gm-Message-State: APjAAAVbYZFeOZ8na8HPz7gpP5HXzX2+Sfuv2yFzGQ1TYuF6m5reGvms HBipZ822o8wnV5I7IcE9U06KQ/PQKZWHBKffh2Q= X-Received: by 2002:a05:6602:280b:: with SMTP id d11mr10717971ioe.250.1576863349472; Fri, 20 Dec 2019 09:35:49 -0800 (PST) MIME-Version: 1.0 References: <20191220024936.GA380394@chrisdown.name> <20191220121615.GB388018@chrisdown.name> <20191220164632.GA26902@bombadil.infradead.org> In-Reply-To: <20191220164632.GA26902@bombadil.infradead.org> From: Amir Goldstein Date: Fri, 20 Dec 2019 19:35:38 +0200 Message-ID: Subject: Re: [PATCH] fs: inode: Reduce volatile inode wraparound risk when ino_t is 64 bit To: Matthew Wilcox 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)" Content-Type: text/plain; charset="UTF-8" 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 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? Thanks, Amir.