Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement block addressing format #16
Implement block addressing format #16
Changes from 13 commits
244bb7d
2c9facf
5ddd59b
e6bb180
8a13874
19e93c0
f51c46b
9a727bc
657dae6
043e013
9921e7a
33e25d1
4aebf88
200a98b
6874c80
22dd741
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここ全体的にですが、エラーが発生したアドレスがわかるようにしたいです。ブロックのアドレスなどdebugの時にxxd とかで参照できると嬉しい(他のところが十分にできてないので心苦しいですが)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ひとまず single/double/triple の block addresses を解決するところで、エラーメッセージ中にブロックアドレスを表示するようにしてみました。
22dd741
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これって全て存在するパターンや一部存在するパターンなどあるんですかね?
どういった組み合わせが存在するのか気になってます
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Block Addressingの制約で、1ファイルのサイズが1Blockのサイズを超えたときのためにこのような管理方法が取られているようです。
https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Direct.2FIndirect_Block_Addressing
ここからサイズを計算すると、ファイルサイズが4GBを超えるとTripleまで全て存在するようになります。4MBを超えるとDoubleまで、4KBを超えるとSingleまでになるはずです。少ない方から順番に詰められていくので、途中で飛ばしたりという組み合わせはなさそうです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なるほどです。拡張されていく仕様ですか。
ありがとうございます。