Thread (6 messages) 6 messages, 3 authors, 2012-03-14

Re: [PATCH] mkfs: Handle creation of filesystem larger than the first device

From: Jan Kara <jack@suse.cz>
Date: 2012-02-08 23:20:15

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:
quoted
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 [off-list ref]
SUSE Labs, CR
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help