Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964958AbWEVAOq (ORCPT ); Sun, 21 May 2006 20:14:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964960AbWEVAOq (ORCPT ); Sun, 21 May 2006 20:14:46 -0400 Received: from gprs189-60.eurotel.cz ([160.218.189.60]:55513 "EHLO amd.ucw.cz") by vger.kernel.org with ESMTP id S964958AbWEVAOq (ORCPT ); Sun, 21 May 2006 20:14:46 -0400 Date: Mon, 22 May 2006 02:14:03 +0200 From: Pavel Machek To: Anton Altaparmakov Cc: Linus Torvalds , Andreas Dilger , "Stephen C. Tweedie" , "ext2-devel@lists.sourceforge.net" , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sector_t overflow in block layer Message-ID: <20060522001402.GB25184@elf.ucw.cz> References: <1147884610.16827.44.camel@localhost.localdomain> <1147888715.12067.38.camel@dyn9047017100.beaverton.ibm.com> <20060517235804.GA5731@schatzie.adilger.int> <1147947803.5464.19.camel@sisko.sctweedie.blueyonder.co.uk> <20060518185955.GK5964@schatzie.adilger.int> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.11+cvs20060126 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 961 Lines: 26 Hi! > > Why isn't that just a > > > > if (unlikely(sector != (sector_t)sector)) > > > > and that's it? What does this have to do with CONFIG_LBD or BITS_PER_LONG, > > or anything at all? > > > > If the sector number fits in a sector_t, we're all good. > > I think you missed that Andrewas said he is worried about 64-bit overflows > as well. And you would not catch those with the sector != Can 64-bit really overflow? That's 16 000 Peta bytes, AFAICS. Does anyone really have disk array over 100 Peta bytes? How much space does Google have, for example? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - 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/