Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3122787ybc; Thu, 21 Nov 2019 03:44:31 -0800 (PST) X-Google-Smtp-Source: APXvYqzUsI2X3SoG5aGk5hBup+4D25Cpor6gMwk/oJggAdP3r96u7dsgRD/N2DJIoLBy53rpjKEc X-Received: by 2002:a17:906:24d4:: with SMTP id f20mr13719488ejb.182.1574336671279; Thu, 21 Nov 2019 03:44:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574336671; cv=none; d=google.com; s=arc-20160816; b=kwaLmLEm1bArDO6q/XX6gNR8v3se8Y97reZmYCzHqlIJhHMsu1M8M8u5pkP6Jqs4B4 ovc+vVYQmUXNLMjZqc3WZI2av92O2Wlb85X6BOE9JJB5IJoUWzxHIpLVJlTetPxAOSQo Jc9E2yCRvoGqIrDMfUeTeiY7z+FKAZU9/jH0jup0MyOrNWPoIsXgpXuOaGdNDbjI0EMG 1EDG8CO986wMRre6vhDkHn+FD7XlD7wPeJd0gSvboCnznbF/NvYhXxvPGhUkzlek3/GP S9KxxGyU7Rwr3iHCMtVi1MxATpLTXOcEP0N0pSNdgzkkGuF9v6PifncS+Cq+wPQSUlBr +ACA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :references:in-reply-to:cc:to:subject:from:dkim-signature; bh=2YUMlMHb1jsKR64RBdqNyDWxhhWO2c6n/6/y+QUhsXs=; b=RxfSeBAw8JiJV28pFaSmtPUKLgSG8AVVHX1aJduw19epo3zWegq0HhGxHJl3shgh8u SKhjbpLOjOkjJ0pq6KOqF0O9oB0QpnQ3Wkv17ksqTEP7tb6Rifvekn2w25Z6bF9AQmDD covXSKtEloe1rfeeqS9+lAl9dOXx6ezfu5DYTwkt1jAtDD4obSGxeGPoM5YOVffOm0fP kau+BE4JSaFPBvERA42c5gBhCSc8rsVonPau/p7FokV6qLxhd/O5OTNR/m/joch/jq1g AfS2Op9uxqj24kZaoSq3jFL9cNDhYYKDqkQHJseuFP+NbcPwsgEu0YPdC5jYzbUrS8J1 pLhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cqi9aJN5; 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 qn24si576572ejb.333.2019.11.21.03.44.06; Thu, 21 Nov 2019 03:44:31 -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=cqi9aJN5; 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 S1726620AbfKULka (ORCPT + 99 others); Thu, 21 Nov 2019 06:40:30 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:42952 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726293AbfKULka (ORCPT ); Thu, 21 Nov 2019 06:40:30 -0500 Received: by mail-pl1-f193.google.com with SMTP id j12so1442454plt.9 for ; Thu, 21 Nov 2019 03:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:in-reply-to:references:mime-version:content-id :date:message-id; bh=2YUMlMHb1jsKR64RBdqNyDWxhhWO2c6n/6/y+QUhsXs=; b=cqi9aJN5DS0t4kkWvzHf371mrRDQEFi6edvi7gt7M2M6PK1KmBjZGob0y8YhejBq6s JqRp3f+N/+TTqnYCR/eObOuBWKW5qKsLDnHQTfp02k6dLoUdBToTmwTXYdcq0S0Lph0z MgynN+SHIKGuuXuEWdwTt8suSRgn+iseddJN13Q9bDsqafTMTpTpwNWnQ6Dfo3ZOsYwz SGIEO0FLaLODJHvkVW8uMjv+mN2lvhJHA73Y1l+U8RjGnpf0OYl4OSODhBxeeHtDLK7e MFF6GRbh5wTC6G05/+pDfNPJZKGD0zrOzw7hsPzk7VHICglQmR9hZGv5xX6iG64qjX8G oHEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:in-reply-to:references :mime-version:content-id:date:message-id; bh=2YUMlMHb1jsKR64RBdqNyDWxhhWO2c6n/6/y+QUhsXs=; b=tuqAXzo2dnV6yjqon+Z2clCFq5/BCdQHiOtvxfZGPbtM57P1T3qRVNFt0OFkVz/+UQ eMn9fDLTDdNDFb3vK0U96rh+7UxrE413snDoWfP5rIIJUuZvw/kPksJkDaF0M4NISKY8 X5PBQmPWNa98farBjLDJ58D8f3o1POEKn/ezBPQncV7nXZYF6JosSBliYPwSRHmRYpaX gSsgJ5IwaJtnEy/GLTuku67/TFA1dE1Pw/V1gMdcoNHHQ5ErgHkGr8OsF5Ty6A9Wp+i3 RnfsRERDl7xIQVq5zVoQ5DOSxZO/sz76iEd0LujRktROqk54zFSKSbx0fh0ELJKTl8qS RCxA== X-Gm-Message-State: APjAAAVF/y4aqiJ69VfAd5C0mE0hdix9rMhOZswgSONV9pQ4twyN/giU ELPyQ9SsQnRCUElIlv38jNA= X-Received: by 2002:a17:902:76c8:: with SMTP id j8mr8348835plt.122.1574336429325; Thu, 21 Nov 2019 03:40:29 -0800 (PST) Received: from jromail.nowhere (h219-110-240-055.catv02.itscom.jp. [219.110.240.55]) by smtp.gmail.com with ESMTPSA id o129sm3441035pfg.75.2019.11.21.03.40.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Nov 2019 03:40:28 -0800 (PST) Received: from localhost ([127.0.0.1] helo=jrobl) by jrobl id 1iXkp0-0008NB-AW ; Thu, 21 Nov 2019 20:40:26 +0900 From: "J. R. Okajima" Subject: Re: [PATCH] tmpfs: use ida to get inode number To: Hugh Dickins Cc: "zhengbin (A)" , Matthew Wilcox , viro@zeniv.linux.org.uk, linux-mm@kvack.org, linux-kernel@vger.kernel.org, houtao1@huawei.com, yi.zhang@huawei.com In-Reply-To: References: <1574259798-144561-1-git-send-email-zhengbin13@huawei.com> <20191120154552.GS20752@bombadil.infradead.org> <1c64e7c2-6460-49cf-6db0-ec5f5f7e09c4@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32187.1574336426.1@jrobl> Date: Thu, 21 Nov 2019 20:40:26 +0900 Message-ID: <32188.1574336426@jrobl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hugh Dickins: > Internally (in Google) we do rely on good tmpfs inode numbers more > than on those of other get_next_ino() filesystems, and carry a patch > to mm/shmem.c for it to use 64-bit inode numbers (and separate inode > number space for each superblock) - essentially, > > =09ino =3D sbinfo->next_ino++; > =09/* Avoid 0 in the low 32 bits: might appear deleted */ > =09if (unlikely((unsigned int)ino =3D=3D 0)) > =09=09ino =3D sbinfo->next_ino++; I agree with that "per superblock inum space", but I don't see your point. How can you manage it fully? I mean how can you decide whether the new inum is in use or not? For example, - you create a file which is assigned inum#10. - you or other people create and unlink over and over on the same tmpfs. - then sbinfo->next_ino will become zero, skipped, ok. - and then it will be 10. I don't think you want to share the same inum by two inodes. Moreover, SysV SHM uses tmpfs and shmget(2) overwrite inum internally. It will be another seed of a similar problem. J. R. Okajima