Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262114AbUDJVNG (ORCPT ); Sat, 10 Apr 2004 17:13:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262129AbUDJVNG (ORCPT ); Sat, 10 Apr 2004 17:13:06 -0400 Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:42890 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S262114AbUDJVND (ORCPT ); Sat, 10 Apr 2004 17:13:03 -0400 Date: Sat, 10 Apr 2004 22:13:01 +0100 From: viro@parcelfarce.linux.theplanet.co.uk To: Szakacsits Szabolcs Cc: Andries Brouwer , fledely , linux-ntfs-dev@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: Accessing odd last partition sector (was: [Linux-NTFS-Dev] mkntfs dirty volume marking) Message-ID: <20040410211301.GW31500@parcelfarce.linux.theplanet.co.uk> References: <20040410205445.GV31500@parcelfarce.linux.theplanet.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1403 Lines: 27 On Sat, Apr 10, 2004 at 11:04:45PM +0200, Szakacsits Szabolcs wrote: > > On Sat, 10 Apr 2004 viro@parcelfarce.linux.theplanet.co.uk wrote: > > On Sat, Apr 10, 2004 at 10:29:37PM +0200, Andries Brouwer wrote: > > > On Fri, Apr 09, 2004 at 01:38:51PM +0200, Szakacsits Szabolcs wrote: > > > > > > > > TODO.ntfsprogs conatins the following TODO item under mkntfs: > > > > > - We don't know what the real last sector is, thus we mark the volume > > > > > dirty and the subsequent chkdsk (which will happen on reboot into > > > > > Windows automatically) recreates the backup boot sector if the Linux > > > > > kernel lied to us about the number of sectors. > > > > > > The ioctl BLKGETSIZE64 will tell you the size (in bytes) of a block device. > > > > So will lseek() to SEEK_END, actually (both 2.4 and 2.6). > > And yes, last sector _is_ accessible for dd(1) et.al. > > In 2.6? Not for 2.4 when I tried (it wasn't the latest 2.4 kernel). 2.4 logics around block size handling is broken; we probably could backport that series of patches, though. 2.6 simply sets block size to GCD(page size, device size), so we don't have to worry about all that crap. - 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/