Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for DataStore tables #118

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mge-fbe-com
Copy link

Hi,

This PR introduces basic support for DataStore tables.

Bellow results from manual tests.
I had to decrease the DefaultMaxComPacketSize for it to work with test hardware and a 6.4 based kernel (I plan to tackle this later).

# gosedctl write-data-store --device=/dev/nvme0 --password=sid --path /root/ds_test
(*table.ByteTableInfo)(0xc000118050)({
 Size: (uint32) 10485760,
 MandatoryWriteGranularity: (uint32) 1,
 RecommendedAccessGranularity: (uint32) 512
})

# gosedctl read-data-store --device=/dev/nvme0 --password=sid
(*table.ByteTableInfo)(0xc0001c9190)({
 Size: (uint32) 10485760,
 MandatoryWriteGranularity: (uint32) 1,
 RecommendedAccessGranularity: (uint32) 512
})
DataStoreRead() red 4096 bytes
([]uint8) (len=4096 cap=4096) {
 00000000  74 65 73 74 31 32 33 34  35 36 37 38 39 30 0a 74  |test1234567890.t|
 00000010  65 73 74 31 32 33 34 35  36 37 38 39 30 0a 74 65  |est1234567890.te|
 00000020  73 74 31 32 33 34 35 36  37 38 39 30 0a 74 65 73  |st1234567890.tes|
 00000030  74 31 32 33 34 35 36 37  38 39 30 0a 74 65 73 74  |t1234567890.test|
 00000040  31 32 33 34 35 36 37 38  39 30 0a 74 65 73 74 31  |1234567890.test1|
 00000050  32 33 34 35 36 37 38 39  30 0a 74 65 73 74 31 32  |234567890.test12|
 00000060  33 34 35 36 37 38 39 30  0a 74 65 73 74 31 32 33  |34567890.test123|
 00000070  34 35 36 37 38 39 30 0a  74 65 73 74 31 32 33 34  |4567890.test1234|
...
 00000fb0  38 39 30 0a 74 65 73 74  31 32 33 34 35 36 37 38  |890.test12345678|
 00000fc0  39 30 0a 74 65 73 74 31  32 33 34 35 36 37 38 39  |90.test123456789|
 00000fd0  30 0a 74 65 73 74 31 32  33 34 35 36 37 38 39 30  |0.test1234567890|
 00000fe0  0a 74 65 73 74 31 32 33  34 35 36 37 38 39 30 0a  |.test1234567890.|
 00000ff0  74 65 73 74 31 32 33 34  35 36 37 38 39 30 0a 74  |test1234567890.t|
}

Process finished with the exit code 0

@mge-fbe-com mge-fbe-com marked this pull request as ready for review December 12, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant