From: Jan Kara <jack@suse.cz>
To: Phillip Susi <psusi@ubuntu.com>
Cc: Jan Kara <jack@suse.cz>,
linux-btrfs@vger.kernel.org, Chris Mason <chris.mason@oracle.com>,
David Sterba <dsterba@suse.cz>
Subject: Re: [PATCH] mkfs: Handle creation of filesystem larger than the first device
Date: Thu, 9 Feb 2012 00:20:15 +0100 [thread overview]
Message-ID: <20120208232015.GE1696@quack.suse.cz> (raw)
In-Reply-To: <4F32F0AB.8030003@ubuntu.com>
On Wed 08-02-12 17:01:15, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 1/26/2012 11:03 AM, Jan Kara wrote:
> > make_btrfs() function takes a size of filesystem as an argument. It
> > uses this value to set the size of the first device as well which
> > is wrong for filesystems larger than this device. It results in
> > 'attemp to access beyond end of device' messages from the kernel.
> > So add size of the first device as an argument to make_btrfs().
>
> I don't think this patch is correct. Yes, the size switch only
> applies to the first device, so it doesn't make any sense to try to
> use a value larger than that device. Attempting to do so probably
> should be trapped and it should error out, and the man page should
> probably clarify the fact that the size is only for the first device.
>
> It looks like you think the size should somehow apply to multiple
> devices or to the total fs size when creating on multiple devices, and
> that just doesn't make sense.
Thanks for your reply. I admit I was not sure what exactly size argument
should be. So after looking into the code for a while I figured it should
be a total size of the filesystem - or differently it should be size of
virtual block address space in the filesystem. Thus when filesystem has
more devices (or admin wants to add more devices later), it can be larger
than the first device. But I'm not really a btrfs developper so I might be
wrong and of course feel free to fix the issue as you deem fit.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2012-02-08 23:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 16:03 [PATCH] mkfs: Handle creation of filesystem larger than the first device Jan Kara
2012-02-08 22:01 ` Phillip Susi
2012-02-08 23:20 ` Jan Kara [this message]
2012-02-09 3:05 ` Phillip Susi
2012-02-10 10:49 ` Jan Kara
2012-03-14 11:49 ` David Sterba
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=20120208232015.GE1696@quack.suse.cz \
--to=jack@suse.cz \
--cc=chris.mason@oracle.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=psusi@ubuntu.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).