For some files, devices, and directories with no xattrs xfs can set di_forkoff to 0, so make it a valid condition check in VerifyForkoff() method
Change-Id: I930529ad661c8c5f640c18b2d50dfeddfde5b7d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10655
Reviewed-by: Adrien Destugues <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Some file systems (like exfat) can have std_ops set to NULL in file_system_module_info header, so have a null check before initializing it.
Change-Id: Icdea910c5600daca985ac4b74cae197c40b6ba89
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10542
Reviewed-by: nephele nephele <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
- Directory entry names were compared using strncmp() with
entry->namelen bytes, which could incorrectly report names
as equal when one name is a prefix of another (e.g. "dir1"
and "dir10").
- Move util functions hashFunction and hashLowerBound to Utility header.
- Disable xfs TRACE logs to not pollute syslogs.
Change-Id: I2b158bfa6b815d7576a880055f794ffe89d0eb22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10357
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tracker extensively uses vfs_rewind_dir() hook before it lists all entries as icons, implement this hook so Tracker can correctly list all entries on mounted XFS volumes
Change-Id: Ia52640577f5f92fb1b46df3d14f5ac5ad7ae1943
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10314
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
xfs by default adds xattrs format as extents in inode for directories even when there are no disk blocks allocated to extents, this made our driver looking for invalid extents and caused performance issue.
By adding a simple check for number of attribute extents in inode we fix this issue.
Change-Id: Idf86bb7822926c2ea311f6bbc2dfdcbee4d8930f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6403
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Directory Iterator class represents one instance which could be Short, Extent, Leaf, Node or B+Tree, a good case for making it an abstract class
Change-Id: I925255caf4c4f8bc01a975740ef2ebf0bb2e1b49
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5764
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
- Made GetNext() function in Node Attributes efficient by reducing disk seeks to number of Node entries
Change-Id: I4e2bf8fb1898676c30eca2c6d6f39dc1999ae2f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5612
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Create() and Size() functions are now static methods of its corresponding abstarct class instead of separate functions
Change-Id: Iae15b8f2985843afe23fecdf49b1fcf6f7104e52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5703
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
- Implemented node based extended attributes support
- Both Versions of xfs node based extended attributes can be read now
Change-Id: I2d2915029435e7722cf463b1e2b5579b361dd592
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5606
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
- Implemented leaf based extended attributes on-disk headers
- Both version 4 and version 5 attributes can be read now
- Implemented all leaf headers check to ensure metadata integrity
Change-Id: Ifc3f2e433e991776bb02d1d38f621d5bd1554a4e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5600
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
- Necessary hooks for reading symlinks are implemented
- Added support for local symlinks
- Added support for extent based symlinks
- This patch completes #17791
Change-Id: If6847974562b21f751097df357326f4643eff757
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5621
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
- Implemented all necessary hooks for extended attributes in kernel_interface.cpp
- Implemented an abstract class attribute which will act as an interface between all forms of extended attributes in xfs
- An attempt to read shortform extended attributes
Change-Id: Icff9329b790f9fcfc0b078f61059795af9d9e486
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5570
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Fixed bug on reading files inside Haiku using CAT command on shell
Fixed bug on reading small directories inside Haiku
Node directories can now be read fine, which fixes#17839
LongBlock verification is now through common VerifyHeader function
Change-Id: I1eb651bd084580c86d0facb919825e94488e43d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5546
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
compiler generates a warning regarding using offsetof() function on a non - POD type class
disabling Werror will not break build due to this warning
Change-Id: Ic72210f92a257e80ad8de9327892cfca7454076e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5538
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
-Implemented node and B+Tree based directories support for xfs v5
-Implemented file read support for xfs v5
-Implemented common template function for all data headers check
This patch completes #17783 and #17703
Change-Id: Id4389168d07f31a97e8867e3cb3321b4523b13c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5483
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
- Implemented V5 Block directory fields and virtual extent data header class to handle both V4 and V5 block directories.
- Implemented V5 leaf directory fields and virtual extent leaf header class to handle both V4 and V5 leaf directories.
- Implemented all checks for buffer headers.
Change-Id: I8f994d9ba792f40ba827cd5cee915b7b11796ce3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5432
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
- Implemented xfs v5 inodes (known as v3 inodes) and necessary metadata integrity checks
- Implemented correct data fork pointer which handles both xfs v4 and v5 directories
- We can now read inodes and shortform directories for both xfs versions completely fine
Change-Id: I8a75ec1dc663d567d3bf6db64be4a27b55d709b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5396
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
- Implemented version 5 superblock fields and necessary macros.
- Checksum functions are implemented which will be used for crc verification and crc updates.
- fssh_kernal_priv.h ROUNDDOWN macro definition is consistent with kernal.h definition.
Change-Id: I49b7c939bfd3ea1bffc85b3db42bc678dcce75cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5350
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Moved crc32.c, CRCTable.cpp, CRCTable.h from ext2, and crc_table.c from the UDF filesystem to shared directory
Modified Jam files to use these files from shared directory for ext2 and UDF filesystem
Change-Id: Ie2c79ce0a3ec7d1ea497e725a288c31528dcaa86
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5343
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This patch will fix almost all warnings we have in xfs code.
There are some which I haven't fixed yet, I added comments on
part of code which is giving error and its type as well.
I tested all the changes on xfs_shell and everything is
working fine.
Change-Id: I1af1d09e7eab7f2c2397193bd5a584c5d40c424c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5257
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
- Remove referencing an undeclared identifier
- Instead of an assert, just log an error for XFS V5 filesystems
and don't try to mount them
Change-Id: I67303aff89b81a28b7333569fea8113b6020dc54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5204
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>