From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Blunck Subject: Re: [PATCH 30/32] union mount: ext2 fallthru support Date: Tue, 19 May 2009 11:42:20 +0200 Message-ID: <20090519094220.GI16526@bolzano.suse.de> References: <1242662968-11684-1-git-send-email-jblunck@suse.de> <1242662968-11684-31-git-send-email-jblunck@suse.de> <20090518163221.GE3144@webber.adilger.int> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: viro@zeniv.linux.org.uk, bharata@in.ibm.com, dwmw2@infradead.org, mszeredi@suse.cz, vaurora@redhat.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Andreas Dilger Return-path: Received: from cantor2.suse.de ([195.135.220.15]:51342 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752060AbZESJmW (ORCPT ); Tue, 19 May 2009 05:42:22 -0400 Content-Disposition: inline In-Reply-To: <20090518163221.GE3144@webber.adilger.int> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, May 18, Andreas Dilger wrote: > For enums like this that require specific constant on-disk values > I prefer being safe: > > enum { > EXT2_FT_UNKNOWN = 0, > EXT2_FT_REG_FILE = 1, > EXT2_FT_DIR = 2, > EXT2_FT_CHRDEV = 3, > EXT2_FT_BLKDEV = 4, > EXT2_FT_FIFO = 5, > EXT2_FT_SOCK = 6, > EXT2_FT_SYMLINK = 7, > EXT2_FT_WHT = 8, > EXT2_FT_FALLTHRU = 9, > EXT2_FT_MAX > > > It probably also makes sense to include a patch for ext3/ext4 to ensure > these values are not used by some unrelated feature. In ext3 these are preprocessor defines. IIRC defines and enums are identical for C (both an int) so I leave this untouched and just add the new filetypes, right? Thanks, Jan