History log of /haiku/src/add-ons/kernel/file_systems/btrfs/Inode.cpp
Revision Date Author Comments
# f42b1cb1 02-Mar-2024 InfiniteVerma <vermainfinite@gmail.com>

fs_shell: Fix error message of cat command.

The fd was passed to strerror instead of the error code.

Also add CALLED() macro to trace function calls in the btrfs code and in
fs_shell (disabled by default but enabled by TRACE defines as usual).

Change-Id: I3b8958679412132349b33d5cd686ddbafc120f1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7494
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 0db74b55 30-Jun-2022 Jérôme Duval <jerome.duval@gmail.com>

btrfs: fix SMAP violation, reading inline uncompressed data

should fix for #17061

Change-Id: I5973be6c443e8cf4460c6a3aca7b5378e90d717b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5426
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 4534d86d 01-Aug-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V781: size used before it's checked

memcpy with a negative parameter doesn't look like a great idea.

Change-Id: I3d1a8c224bd288784f068086652a84b2b75fcea8
Reviewed-on: https://review.haiku-os.org/c/1671
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# aa08671d 08-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@gmail.com>


# 50428c35 15-Feb-2019 Augustin Cavalier <waddlesplash@gmail.com>

btrfs: Fix double-free in Inode::_Read().

extent_data is now held by a MemoryDeleter, so thus with this line
it would have been freed twice.


# efac84e7 12-Feb-2019 Rob Gill <rrobgill@protonmail.com>

btrfs return errors on panic, add memory deleter to ReadAt()

* Additional return BAD_DATA after error conditions encountered
when attempting to decompress BTRFS extents.

* MemoryDeleter for extent_data added to ReadAt() preventing
double-free after error.

Change-Id: Ib9f8e9723d3fb6aaff8e69dbb66cd279e86f226b
Reviewed-on: https://review.haiku-os.org/c/1045
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# 0a4cbf0d 15-Dec-2017 hyche <cvghy116@gmail.com>

btrfs: Fix stack corruption on MakeReference()...

because it needs extra space for storing data, and flexible array member o
doesn't do this.
I thought it was...

Change-Id: If64c06827809a4e021581c6adf8e0f198cf47450


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

BTRFS: Add author and license.

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


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

BTRFS: Implement Dereference() in Inode that remove the "name" and unlink it with inode.

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


# 8042a045 28-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Implement Remove() in Inode that removes inode_item.

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


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

BTRFS: Implement MakeReference() in Inode that will link file name to inode.

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


# 371935de 28-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Implement Insert() in Inode that inserts inode_item.

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


# 36a24fb3 28-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Implement Create() that allocate new Inode object.

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


# 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 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>


# 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.com>


# 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@pulkomandy.tk>


# bf5d0ce3 19-May-2017 hyche <cvghy116@gmail.com>

btrfs_shell for testing btrfs code.

* Adding Jamfile in src/tools/btrfs_shell and include the subdir in src/tools/Jamfile
* Adding system_dependencies.h in btrfs source to include all the system headers
* fs_shell wrapping for btrfs source. If FS_SHELL is defined, compile with fs_shell headers instead.
* Change macro BTRFS_SHELL to FS_SHELL
* Adding btrfs_std_ops function: fs_shell now can recognize and load module


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

btrfs: Code style

* Using tab instead of spaces
* Pointer/Reference should be next to type
* etc


# 5a95af70 25-Oct-2014 Axel Dörfler <axeld@pinc-software.de>

vfs/{b|btr|package|b}fs/ext2/exfat: common access check.

* Added VFS helper function check_access_permissions() that combines
several partially correct versions to the one true version (tm).
* All but BFS (since recently) missed the S_IXOTH for root on directories,
and all but packagefs missed proper group handling.


# 267a780a 06-May-2013 Jérôme Duval <jerome.duval@gmail.com>

btrfs: fixes 64 bit warnings


# b1f9573f 19-Nov-2011 Jérôme Duval <jerome.duval@gmail.com>

btrfs: added support for zlib decompression of inline extents.

Reuse code from tarfs to decompress zlib compressed inline extents.
No idea yet on how to decompress regular extents which are currently
served by the file cache.


# 6f4c36e2 24-Jan-2011 Jérôme Duval <korli@users.berlios.de>

* Implemented a read-only btrfs file system, tested with a 400MB image.
* Inline extent data isn't read with the file_cache yet as the data is not block aligned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40282 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a95af70a2c45a103b96046b5dae5c2b5a303dfa 25-Oct-2014 Axel Dörfler <axeld@pinc-software.de>

vfs/{b|btr|package|b}fs/ext2/exfat: common access check.

* Added VFS helper function check_access_permissions() that combines
several partially correct versions to the one true version (tm).
* All but BFS (since recently) missed the S_IXOTH for root on directories,
and all but packagefs missed proper group handling.


# 267a780ab5ba7e7774dc6b4a6d391ab3cfbb9f78 06-May-2013 Jérôme Duval <jerome.duval@gmail.com>

btrfs: fixes 64 bit warnings


# b1f9573f594557d669c8bb2cf4af0940c44a3b23 19-Nov-2011 Jérôme Duval <jerome.duval@gmail.com>

btrfs: added support for zlib decompression of inline extents.

Reuse code from tarfs to decompress zlib compressed inline extents.
No idea yet on how to decompress regular extents which are currently
served by the file cache.


# 6f4c36e2979b9684a65e6d73b872d4628f3e452a 24-Jan-2011 Jérôme Duval <korli@users.berlios.de>

* Implemented a read-only btrfs file system, tested with a 400MB image.
* Inline extent data isn't read with the file_cache yet as the data is not block aligned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40282 a95241bf-73f2-0310-859d-f6bbb57e9c96