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-10 10:49:19

On Wed 08-02-12 22:05:26, Phillip Susi wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/08/2012 06:20 PM, Jan Kara wrote:
quoted
  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.
The size of the fs is the total size of the individual disks.  When you
limit the size, you limit the size of a disk, not the whole fs.  IIRC,
mkfs initializes the fs on the first disk, which is why it was using that
size as the size of the whole fs, and then adds the other disks after (
which then add their size to the total fs size ).
  OK, I missed that btrfs_add_to_fsid() increases total size of the
filesystem. So now I agree with you. New patch is attached. Thanks for your
review.
It might be nice if
mkfs could take sizes for each disk, but it only seems to take one size
for the initial disk.
  Yes, but I don't see a realistic usecase so I don't think it's really
worth the work.

								Honza
-- 
Jan Kara [off-list ref]
SUSE Labs, CR

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help