Commit Graph
23 Commits
Author SHA1 Message Date
CruxBox bd76cde0fa xfs: Implemented reading of B+Tree based files
This patch adds the functionality to read B+Trees based files.
It shares similarity with extent based file reading functionality. Just
the way the extents are read is different.

Change-Id: I9b7ebe20171a8860fdc35024f7018540248aed61
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3170
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-07-03 09:10:35 +00:00
CruxBox 68c3f45dfb xfs: Attempt at reading extent based files
There are 2 issues right now. One is that I have to give cat command the
entire file size for it to print the entire file. The second issue is
that I am getting segmentation fault for some reason, and it doesn't
even have to do with xfs_read().

For more info: https://review.haiku-os.org/c/haiku/+/3154

Change-Id: I8e3acd658730ed2339dabbd671820c409332f296
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3154
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-06-23 17:17:40 +00:00
CruxBox a2603a88fd xfs: coding style fixed, no functional changes
Change-Id: I56a1220abc330ef853cee4bdb9fa9c1b712784a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3143
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Rene Gollent <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2021-06-15 16:52:35 +00:00
CruxBox 1dcb6c252c xfs: B+Tree GetNext() works
The GetNext() works well for B+Trees and that wraps up the work needed
for all kinds of GetNext().
Change-Id: Ie965d3da273364f8fdbdb8faee5cb3c214881130
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3124
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-06-13 15:49:15 +00:00
CruxBox b4763972bd xfs: B+Tree ExtentMap reading
We can now read all the extent maps from the leaves. This will be needed
to implement the GetNext() functionality.

Change-Id: Ie10b453c33bec6e6d3109743d695f86a90de45cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3119
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-06-04 12:50:56 +00:00
CruxBox 4a2870fcf2 xfs: Check Permissions
Implemented the xfs_access hook and we now check for permissions where
required.

Change-Id: Idaa71f300e0a73951d13073b66cb9ff37dbfa3ec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3151
Reviewed-by: Adrien Destugues <[email protected]>
2021-04-11 08:45:03 +00:00
CruxBox 8897bed702 xfs: Fixes and refactoring some parts
Found some bugs while testing different possible cases of Extent based
directories (1 extentmap case). Also did some refactoring.

Change-Id: Icb3b6e21de100c1bee93779c419bb2e86c694ae6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3118
Reviewed-by: Adrien Destugues <[email protected]>
2021-03-14 14:03:24 +00:00
CruxBox 19488d5c68 xfs: Reading Node Directories
Node directories can now be read. With this, extent directories are
complete.
Change-Id: Ic42c8464e810137cff4946e8c975edc121daaa4f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3045
Reviewed-by: Adrien Destugues <[email protected]>
2021-03-14 14:03:24 +00:00
CruxBox 0dc6805e00 xfs: Read Leaf Directories
We can read leaf directories now.

Change-Id: I4276c264f9e72013fa99c898a8332cb363e9ab3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3035
Reviewed-by: Adrien Destugues <[email protected]>
2020-12-03 07:57:15 +00:00
CruxBox bd0708fd41 xfs: Attempt at reading Leaf Directories
We can read leaf directories now but I've only checked for a single
block working right now. I might make a few more changes in an upcoming
patch.

Change-Id: I325de8a6fad4ef9298e7810256cba47a87c45187
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3027
Reviewed-by: Adrien Destugues <[email protected]>
2020-12-03 07:57:15 +00:00
CruxBox a20b880907 xfs: Renaming variables and bug fix in read_dir
Main issue was use of sizeof(dirent) instead of sizeof(struct dirent).
It didn't cause any issue before but I found it ambiguous. Also, renamed
the dirent variable to buffer to remove any ambiguity.

Change-Id: I36ab40eea354424a4fddc3292ee7e1aaed446859
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3198
Reviewed-by: Adrien Destugues <[email protected]>
2020-12-03 07:57:15 +00:00
CruxBox fc87b4a284 xfs: Read Block directories
Block directories can now be read.
Change-Id: I9aa898638e6ac39cb903f2dd58cd184785e1a06b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2992
Reviewed-by: Adrien Destugues <[email protected]>
2020-10-11 16:00:26 +00:00
CruxBox cacda42520 fs_shell: Fixed cat command
This patch fixes the following issues:

The cat command in fs_shell only printed 10 bytes instead of the entire
file. Also, when the number of bytes to be read from file was large it would
cause segmentation fault because of stackoverflow.

This was noticed while testing xfs and ufs filesystems and has now been
fixed.

Change-Id: I3891f2834c5b76330f666ebee97b20bd5529742a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3157
Reviewed-by: Adrien Destugues <[email protected]>
2020-08-23 12:57:22 +00:00
CruxBox 9593c05ac5 xfs: An attempt to read block directories
Map entries can be read, most structures are in place. Next is to
actually work with the directory block.

Change-Id: I700ee2e003bdef97838b1f06a95e53a5e4293658
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2981
Reviewed-by: Adrien Destugues <[email protected]>
2020-07-08 06:23:24 +00:00
CruxBox a060fa968e xfs: Read Short Form Directories
We can now read short form directories.
Change-Id: I23eb6ef52e8bb07643213e603ed0185f536c649f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2952
Reviewed-by: Adrien Destugues <[email protected]>
2020-07-08 06:23:24 +00:00
CruxBox 7e1b5cf809 xfs: An attempt at reading shortform dir
This patch gets read_dir, lookup and few others to work. Entries cannot
be listed yet except the root.

Change-Id: Ic4b7b61a794a1b75849e45777a383b3315b15aa8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2915
Reviewed-by: Adrien Destugues <[email protected]>
2020-07-03 08:13:27 +00:00
CruxBox e3e93916b7 xfs: get_vnode and read_stat hook
This patch aimed at implementing the get_vnode and read_stat hook.
read_stat seems to work well, get_vnode can be checked after working on
dir.

Change-Id: I487915b7e8f6ee6f97349b0c638676d5389cd2df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2859
Reviewed-by: Chế Vũ Gia Hy <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2020-06-15 06:44:23 +00:00
CruxBox 406d14d4ce xfs: Reading Inodes
This patch successfully reads inodes. There are also some style fixes.
The inodes aren't published and some useful hooks are yet to implement.

Change-Id: I73e6c68f1c2177871fbd0b241a67826aea1b17be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2738
Reviewed-by: Adrien Destugues <[email protected]>
2020-06-15 06:44:23 +00:00
CruxBox bb6b48a9c3 FS Interface Docs: Made read_dir description clear
Small change in the docs to make the explanation of read_dir
functionality a little more clear.

Change-Id: I202eb0f70b38c78962ad9ca1d267995977c04951
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2900
Reviewed-by: Axel Dörfler <[email protected]>
2020-06-11 10:39:35 +00:00
CruxBox 0ba51bc88f read_fs_info() hook for xfs
xfs: read_fs_info() hook.

Change-Id: I817b1ca2cd37d1dc894cdeefac967f659cfcb502
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2416
Reviewed-by: Adrien Destugues <[email protected]>
2020-06-03 11:35:13 +00:00
CruxBox eab542ef03 xfs: Init AG Free Space Management
Currently need to make the B+Tree for AG Free Space Management.
The functions or the code for this task isn't complete. Sharing for
reference.

Change-Id: I1e29832b9645bd527962128a8c85b7ca24c7fd50
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2378
Reviewed-by: Adrien Destugues <[email protected]>
2020-04-27 10:28:49 +00:00
CruxBox 2deffe2f3f Adding superblock, types, xfs_mount and volume
Superblock work is done. A valid superblock is now detected.
xfs_shell will fail though, because the filesystem does not own it's
root node.

Change-Id: I78e3c21c4d0dd8e535fd24df4a0c107ed5fb201c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2286
Reviewed-by: Adrien Destugues <[email protected]>
2020-03-09 08:52:50 +00:00
CruxBox 80f7396496 Making of xfs file system
xfs_shell is modeled over bfs_shell.
It fails to mount the filesystem as expected
(the filesystem code isn't implemented).

Change-Id: Iaf88c1f4aef338f249fdc58bc27a3ad76ebd5d95
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2096
Reviewed-by: Adrien Destugues <[email protected]>
2020-01-25 08:49:09 +00:00