History log of /haiku/src/add-ons/kernel/file_systems/btrfs/Volume.cpp (Results 1 – 25 of 34)
Revision Date Author Comments
# d72239d2 17-Apr-2020 Suhel Mehta <mehtasuhel@gmail.com>

Move DeviceOpener class to a separate file.

It is used by several of the filesystems, so it seems a good idea to
move it to the shared/ directory.

UFS2, BFS, XFS, EXT2 and EXFAT are adjusted.

Chan

Move DeviceOpener class to a separate file.

It is used by several of the filesystems, so it seems a good idea to
move it to the shared/ directory.

UFS2, BFS, XFS, EXT2 and EXFAT are adjusted.

Change-Id: I493e37a1e7d3ae24251469f82befd985a3c1dbdd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2489
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

show more ...


# c5e9dd9b 10-Jan-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

Fix btrfs_shell build

The hacks to still use actual system headers for zlib didn't quite work.

- Define Z_SOLO, which makes zlib build without any system include
- Remove use of std::max and #inclu

Fix btrfs_shell build

The hacks to still use actual system headers for zlib didn't quite work.

- Define Z_SOLO, which makes zlib build without any system include
- Remove use of std::max and #include <algorithm> from AVLTree
- Do not include DebugSupport.h because it uses system headers
- Do not include uuid.h and define just what we need

Now it's possible to compile the btrfs_shell on Linux.

Change-Id: I74a14b5f6804db45ab5a9f582ab493d696376fd3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2098
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

show more ...


# 8f40380d 16-Jul-2019 brjhaiku <brjhaiku@gmail.com>

btrfs: update superblock checksum on write

Note there are 32bytes on disk for the checksum, but only the first 4
are used. This is because btrfs can (or could, at some point?) use
sha256 instead of

btrfs: update superblock checksum on write

Note there are 32bytes on disk for the checksum, but only the first 4
are used. This is because btrfs can (or could, at some point?) use
sha256 instead of crc32 when higher reliability is needed (but high
performance isn't).

Change-Id: I8a2bcf8f462440568d9b3e2d9fbdb7208723bfb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1596
Reviewed-by: Chế Vũ Gia Hy <ugen@cinnamon.is>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

show more ...


# 5fb44dff 26-Oct-2019 Augustin Cavalier <waddlesplash@gmail.com>

Revert "btrfs: update superblock checksum on write"

This reverts commit caf05af5dd9364af5fc808921f8b0c3a43736aaf.


# caf05af5 16-Jul-2019 brjhaiku <brjhaiku@gmail.com>

btrfs: update superblock checksum on write

Change-Id: I8a2bcf8f462440568d9b3e2d9fbdb7208723bfb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1596
Reviewed-by: Chế Vũ Gia Hy <ugen@cinnamon.is>

btrfs: update superblock checksum on write

Change-Id: I8a2bcf8f462440568d9b3e2d9fbdb7208723bfb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1596
Reviewed-by: Chế Vũ Gia Hy <ugen@cinnamon.is>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

show more ...


# 4ffbc73f 08-Oct-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

btrfs: fix some warnings


# 4337c758 08-Oct-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

btrfs: do not create Journal and ExtentAllocator for read-only

They are not needed, and the ExtentAllocator seems to currently fail on
an empty volume I created for testing.


# 1418cade 12-Jul-2019 Augustin Cavalier <waddlesplash@gmail.com>

file_systems: Pass size argument to ioctl in a lot more places.


# aa08671d 09-Apr-2019 Les De Ridder <les@lesderid.net>

btrfs: partially implement filesystem initialization

Change-Id: I7fb3340dc39b3331d30e5113b5860d936efab253
Reviewed-on: https://review.haiku-os.org/c/1395
Reviewed-by: Adrien Destugues <pulkomandy@gm

btrfs: partially implement filesystem initialization

Change-Id: I7fb3340dc39b3331d30e5113b5860d936efab253
Reviewed-on: https://review.haiku-os.org/c/1395
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

show more ...


# 99768086 30-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Add author and license.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# 166917c9 28-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Implement btrfs_create_dir that can create directories in most case.

We need to handle a case when node is full, the solution should be split or push data to another node.

Signed-off-by: Aug

BTRFS: Implement btrfs_create_dir that can create directories in most case.

We need to handle a case when node is full, the solution should be split or push data to another node.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>

show more ...


# 4368661f 23-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Implement GetNewBlock() function that will find the logical address for allocating and convert it to physical block.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# c1320b3a 23-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Implement a simple journaling approach, this is not finished and mostly satisfy the need for passing Transaction object for many functions.

Some details about the current Journal:
* Journal c

BTRFS: Implement a simple journaling approach, this is not finished and mostly satisfy the need for passing Transaction object for many functions.

Some details about the current Journal:
* Journal can only end transaction.
* It holds a transaction id of fs (fCurrentGeneration) that increments each time a transaction starts.
* _TransactionWritten now just printing message.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>

show more ...


# 8137f447 20-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Fix memory leak

Missing delete for some tree roots.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# af419b0e 13-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Implement ExtentAllocator

There are 4 new classes, structs:
* CachedExtent, is a AVLTreeNode, caches the extent locating in extent tree, a extent can be free, allocated, metadata or a data ex

BTRFS: Implement ExtentAllocator

There are 4 new classes, structs:
* CachedExtent, is a AVLTreeNode, caches the extent locating in extent tree, a extent can be free, allocated, metadata or a data extent. It also hold a references count,
that is incremented each time a new extent refer to it (COW) and item data, that is only for allocated extent (NULL for free).
* CachedTreeExtent, is a AVLTree, cache the whole extent tree and has CachedExtent as its node.
* BlockGroup represents the group of extents that represent the region for each type of allocated extent. For example, region for data extents, metada blocks. It
responsible for inserting nodes in CachedTreeExtent.
* And the final, ExtentAllocator it knows how to allocate/deallocate extents, but for now only the allocating is implemented, actually allocating and deallocating works
are already implemented, they are in functions _AddFreeExtent, _AddAllocatedExtent in CachedTreeExtent. However the deallocating is not needed for now, so it will be
finished later then.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>

show more ...


# 3216460d 12-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Implement BTree::Path and change _Find.

Remove attribute fCurrentSlot in BTree::Node as it will be handled by Path explicitly. BTree control Path by passing its type in
BTree's method, Path a

BTRFS: Implement BTree::Path and change _Find.

Remove attribute fCurrentSlot in BTree::Node as it will be handled by Path explicitly. BTree control Path by passing its type in
BTree's method, Path also hold BTree type as its attribute to do some internal actions.
Add constant BTREE_KEY_TYPE_ANY, find search key has this type will success regardless of the found key's type.

Split the the _Find function into Traverse and GetEntry. Traverse will fill in the Path (nodes and slots) along way its finding,
GetEntry will get the item data, item size, key from leaf, if the slot is valid, that we have from Traverse. The _Find function also
check type if is correct and then retrieve. Doing this way there will be more flexible, the "read" flag is not needed as we only
need Path to manipulate tree, and it also enhance the performance at some points, because Path caches all the nodes from root to leaf,
so that we don't have to block_cache_put and block_cache_get after each finding.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>

show more ...


# 16de9db5 12-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Fix mismatched type of item size (should be uint32), and ObjectID of first subvolume when lookup directory (described in commit bd2dab1)

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.c

BTRFS: Fix mismatched type of item size (should be uint32), and ObjectID of first subvolume when lookup directory (described in commit bd2dab1)

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>

show more ...


# 17b1b1c0 23-Jun-2017 hyche <cvghy116@gmail.com>

BTRFS: Some modifications for Volume.cpp

* Removed redundant codes when mounting roots
* Added TRACE
* Finding root should be "FindExact" to make it more understandable.

Signed-off-by: Adrien Destu

BTRFS: Some modifications for Volume.cpp

* Removed redundant codes when mounting roots
* Added TRACE
* Finding root should be "FindExact" to make it more understandable.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

show more ...


# a420881a 23-Jun-2017 hyche <cvghy116@gmail.com>

BTRFS: Added retrieve RootBlock of BTree

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# fc4a1e78 22-Jun-2017 hyche <cvghy116@gmail.com>

BTRFS: Added SetRoot for tree. Tree root is initialized at mount time

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 7568abd5 22-Jun-2017 hyche <cvghy116@gmail.com>

BTRFS: BlockNum -> LogicalAddress to prevent misunderstanding

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# bd2dab1c 16-Jun-2017 hyche <cvghy116@gmail.com>

BTRFS: Add some missing constants

Chunk tree objectID is 3,
256 is the objectID of first created subvolume in fs tree,
and also of first chunk tree (item in chunk tree).

Signed-off-by: Adrien D

BTRFS: Add some missing constants

Chunk tree objectID is 3,
256 is the objectID of first created subvolume in fs tree,
and also of first chunk tree (item in chunk tree).

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

show more ...


# 7e8e6c2e 09-Jun-2017 hyche <cvghy116@gmail.com>

BTRFS: Added retrieve sector size for later use

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 299aba38 09-Jun-2017 hyche <cvghy116@gmail.com>

BTRFS: code cleanups

* Removed struct keyword for declaring variable.
* Renamed BPlusTree to BTree because BtrFS use a variant of BTree not B+Tree.

Signed-off-by: Adrien Destugues <pulkomandy@pulko

BTRFS: code cleanups

* Removed struct keyword for declaring variable.
* Renamed BPlusTree to BTree because BtrFS use a variant of BTree not B+Tree.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

show more ...


# b24d4c8a 18-May-2017 hyche <cvghy116@gmail.com>

Fixed: Code style (again)

* Pointer/Reference should be next to type
* else if -> if
* Remove trailing spaces

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


12