From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. R. Okajima" Subject: [RFC PATCH v3 0/2] the uniquness of tmpfs inode-number Date: Mon, 2 Jun 2014 01:18:55 +0900 Message-ID: <1401639537-6449-1-git-send-email-hooanon05g@gmail.com> References: <20140522151431.GA25517@lst.de> To: linux-fsdevel@vger.kernel.org, dchinner@redhat.com, viro@zeniv.linux.org.uk, Eric Dumazet , Hugh Dickins , Christoph Hellwig , Andreas Dilger , Jan Kara Return-path: Received: from mail03-md.ns.itscom.net ([175.177.155.113]:34327 "EHLO mail03-md.ns.itscom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752526AbaFAQTA (ORCPT ); Sun, 1 Jun 2014 12:19:00 -0400 In-Reply-To: <20140522151431.GA25517@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Generally the inode-number should be unique since it is an identifier within that filesystem. Using a system global function vfs:get_next_ino() may cause the duplicated inode number in tmpfs. If it happens, then some userspace "inum-aware" tools may not work correctly such as backup tools. These patches solve this problem. Changes from v2: - the type of tmpfs inode-number is "signed int" - bugfix about calling idr_remove() in an error path. - bugfix about the error from idr_alloc(). - [2/2] is not changed essentially. J. R. Okajima (2): tmpfs: manage the inode-number by IDR, signed int inum tmpfs: refine a file handle for NFS-exporting include/linux/shmem_fs.h | 6 ++-- mm/shmem.c | 71 +++++++++++++++++++++++++--------------------- 2 files changed, 43 insertions(+), 34 deletions(-) -- 1.7.10.4