linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Resize, off by 1024 bytes
@ 2012-09-24 19:43 Lluís Batlle i Rossell
  0 siblings, 0 replies; only message in thread
From: Lluís Batlle i Rossell @ 2012-09-24 19:43 UTC (permalink / raw)
  To: Btrfs mailing list

Hello,

I wanted to resize my filesystem to 512MiB less. I had created the btrfs
after I had set the partitions some days ago, and it was like this:
# cat /sys/class/block/sda1/size
234436482

Getting in bytes:
234436482*512 = 120031478784

I run:
# btrfs fi resize -512m /

And I see in dmesg:
btrfs: new size for /dev/sda1 is 119494606848

But that's not the previous size - 512MiB. It is:
120031478784 - 119494606848 = 536871936 = 512*1024*1024 + 1024

So, there is an 'off by +1024'. I shrinked the partition to +1024 bytes bigger
than would be by subtracting 512MiB, just in case.

What is that off by 1024?

This is 3.5.4.

Regards,
Lluís.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-09-24 19:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-24 19:43 Resize, off by 1024 bytes Lluís Batlle i Rossell

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).