User: Password:
|
|
Subscribe / Log in / New account

Btrfs: Working with multiple devices

Btrfs: Working with multiple devices

Posted Jan 6, 2014 13:45 UTC (Mon) by cesarb (subscriber, #6266)
In reply to: Btrfs: Working with multiple devices by cesarb
Parent article: Btrfs: Working with multiple devices

I forgot about the used space part. So how about this for the used space:

The total size is the amount of bytes which could be written, using the definition from my above comment, if the filesystem were *empty*. The used size is (total - free).

This would have the following desirable properties:

- A freshly formatted filesystem would have "used" 0 and "free" = "total".
- A completely full filesystem would have "free" 0 and "used" = "total".
- Adding new files is monotonic; "used" increases (or stays the same), "free" decreases (or stays the same).
- The "total" value does not change, no matter how many files you add or remove.
- If "free" says you have x bytes, you can create at least a file of up to x bytes, even if its contents came from /dev/urandom.


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds