LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Theodore Tso <tytso@MIT.EDU>
To: David Miller <davem@davemloft.net>
Cc: jengelh@computergmbh.de, chris.mason@oracle.com,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	btrfs-devel@oss.oracle.com
Subject: Re: BTRFS partition usage...
Date: Tue, 12 Feb 2008 19:45:41 -0500	[thread overview]
Message-ID: <20080213004541.GB11911@mit.edu> (raw)
In-Reply-To: <20080212.152826.243855481.davem@davemloft.net>

On Tue, Feb 12, 2008 at 03:28:26PM -0800, David Miller wrote:
> From: Jan Engelhardt <jengelh@computergmbh.de>
> Date: Tue, 12 Feb 2008 15:00:20 +0100 (CET)
> 
> > Something looks wrong here. Why would btrfs need to zero at all?
> 
> So that existing superblocks on the partition won't
> be interpreted as correct by other filesystems.  It's
> a safety measure many mkfs programs use.
> 
> > Superblock at 0, and done. Just like xfs.
> 
> No, we won't do stupid things like that and make an entire
> cylinder of our disks unusable.  See my other reply.

The reason why we don't put the superblock at 0 is not because it
screws over the sparc, but because on many systems (including x86) the
bootsector is stored at 0.  It's not hard for mke2fs to zap the boot
sector which we do on all architectures *except* sparc, to avoid
nuking the disk label.  (Chris just missed the "#ifndef __sparc //
#define ZAP_BOOTBLOCK // #endif" at the beginning of mke2fs.c)

This is the best of all words; it makes sparc happy; it allows boot
loaders to put the x86 standard initial stage 0 boot loader in the
first 446 bytes of the disk; and by zapping sector 0 on all
architectures except the sparc, it solves the previous filesystem
"ghost traces" detection problem for filesystems like xfs that put the
superblock at 0.

						- Ted

  reply	other threads:[~2008-02-13  0:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06 17:00 [ANNOUNCE] Btrfs v0.12 released Chris Mason
2008-02-11  1:12 ` David Miller
2008-02-11 13:42   ` Chris Mason
2008-02-12  6:43     ` David Miller
2008-02-12 13:43       ` Chris Mason
2008-02-12  7:21 ` BTRFS partition usage David Miller
2008-02-12  8:11   ` David Miller
2008-02-12 13:49     ` Chris Mason
2008-02-12 14:00       ` Jan Engelhardt
2008-02-12 14:08         ` Chris Mason
2008-02-12 14:21           ` Jan Engelhardt
2008-02-12 14:35             ` Chris Mason
2008-02-12 15:04               ` Jan Engelhardt
2008-02-12 16:17                 ` Chris Mason
2008-02-12 23:38                 ` David Miller
2008-02-12 23:42                   ` Jan Engelhardt
2008-02-13  1:09                     ` David Miller
2008-02-13  1:22                     ` Rene Herman
2008-02-12 23:35               ` David Miller
2008-02-13  7:02                 ` Christoph Hellwig
2008-02-12 23:34             ` David Miller
2008-02-12 23:33           ` David Miller
2008-02-13  2:10             ` Jeff Garzik
2008-02-14  0:51               ` Szabolcs Szakacsits
2008-02-12 23:26         ` David Miller
2008-02-12 23:39           ` Jan Engelhardt
2008-02-13  1:08             ` David Miller
2008-02-13  1:25           ` Bryan Henderson
2008-02-12 23:28         ` David Miller
2008-02-13  0:45           ` Theodore Tso [this message]
2008-02-12 20:50       ` David Miller
2008-02-12  9:23 ` CRC32C big endian bugs David Miller
2008-02-12 21:55 ` BTRFS only works with PAGE_SIZE <= 4K David Miller
2008-02-12 22:03   ` Chris Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080213004541.GB11911@mit.edu \
    --to=tytso@mit.edu \
    --cc=btrfs-devel@oss.oracle.com \
    --cc=chris.mason@oracle.com \
    --cc=davem@davemloft.net \
    --cc=jengelh@computergmbh.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: BTRFS partition usage...' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).