helper functions for extent data structure access
This commit is contained in:
parent
d4f62371f8
commit
578861c4fa
|
@ -376,6 +376,28 @@ pub struct ExtentData2 {
|
||||||
num_bytes: U64<LE>,
|
num_bytes: U64<LE>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl ExtentData2 {
|
||||||
|
pub fn extent_data1(&self) -> &ExtentData1 {
|
||||||
|
&self.header
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn address(&self) -> u64 {
|
||||||
|
self.address.get()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn size(&self) -> u64 {
|
||||||
|
self.size.get()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn offset(&self) -> u64 {
|
||||||
|
self.offset.get()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn num_bytes(&self) -> u64 {
|
||||||
|
self.num_bytes.get()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[repr(C, packed(1))]
|
#[repr(C, packed(1))]
|
||||||
#[derive(Debug, Clone, Copy, FromBytes, AsBytes)]
|
#[derive(Debug, Clone, Copy, FromBytes, AsBytes)]
|
||||||
pub struct INodeRef {
|
pub struct INodeRef {
|
||||||
|
|
|
@ -5,7 +5,7 @@ use alloc::vec::Vec;
|
||||||
|
|
||||||
use crate::structs::KnownObjectId;
|
use crate::structs::KnownObjectId;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, PartialEq, Eq)]
|
||||||
pub struct INode {
|
pub struct INode {
|
||||||
pub id: u64,
|
pub id: u64,
|
||||||
pub(crate) path: Vec<Vec<u8>>,
|
pub(crate) path: Vec<Vec<u8>>,
|
||||||
|
|
Loading…
Reference in a new issue