Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754769Ab2BCIZ2 (ORCPT ); Fri, 3 Feb 2012 03:25:28 -0500 Received: from idcmail-mo2no.shaw.ca ([64.59.134.9]:47089 "EHLO idcmail-mo2no.shaw.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754673Ab2BCIZ1 convert rfc822-to-8bit (ORCPT ); Fri, 3 Feb 2012 03:25:27 -0500 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=Cufqhujp69hR+MhiHu40yK/USb/hlYs0+irVU46A6+k= c=1 sm=1 a=-dEdcLQ1GN0A:10 a=BLceEmwcHowA:10 a=kj9zAlcOel0A:10 a=k8hqzbHzjweV03hO1KKrVA==:17 a=xZ5wN_-6ftpR07oayekA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Subject: Re: [RFC] killing boilerplate checks in ->link/->mkdir/->rename Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Andreas Dilger In-Reply-To: <20120202212400.GR23916@ZenIV.linux.org.uk> Date: Fri, 3 Feb 2012 01:25:26 -0700 Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds Content-Transfer-Encoding: 8BIT Message-Id: References: <20120130222717.GA6393@kroah.com> <4F27C6EB.2070305@suse.cz> <20120202012258.GQ23916@ZenIV.linux.org.uk> <20120202212400.GR23916@ZenIV.linux.org.uk> To: Al Viro X-Mailer: Apple Mail (2.1084) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1168 Lines: 26 On 2012-02-02, at 2:24 PM, Al Viro wrote: > FWIW, there's something we really should've done a long time ago: putting > that limit into sb->s_max_links. With 0 meaning "leave all checks to > ->link/->mkdir/->rename". Something like the following would make a > reasonable start - just the conversion of obvious cases. As the next > step I'd probably initialize it as ~0U instead of 0 and let the filesystems > that want something trickier (reiserfs, ext4, gfs2, ocfs2) explicitly set > it to 0 in their foo_fill_super(). That would take care of a bunch of cases > where we forgot to do those checks (ubifs, hfsplus, jffs2, ramfs, etc.) and > it's probably a saner default anyway. This would also give userspace some hope of pathconf(path, _PC_LINK_MAX) returning the actual value from the filesystem, instead of hard-coding this into glibc itself based on the statfs-returned f_type magic value. Cheers, Andreas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/