pub fn store(&mut self, w: &mut RafsIoWriter) -> Result<usize> {
        // Sort prefetch table by inode index, hopefully, it can save time when mounting rafs
        // Because file data is dumped in the order of inode index.
        self.inodes.sort_unstable();

        let (_, data, _) = unsafe { self.inodes.align_to::<u8>() };
        w.write_all(data.as_ref())?;

        // OK. Let's see if we have to align... :-(
        let cur_len = self.inodes.len() * size_of::<u32>();
        let padding_bytes = rafsv5_align(cur_len) - cur_len;
        w.write_padding(padding_bytes)?;

        Ok(data.len() + padding_bytes)
    }
/// Store the inode prefetch table to a writer.
Store the inode prefetch table to a writer.
Store the inode prefetch table to a writer .
pub fn store(&mut self, w: &mut RafsIoWriter) -> Result<usize> {
        // Sort prefetch table by inode index, hopefully, it can save time when mounting rafs
        // Because file data is dumped in the order of inode index.
        self.inodes.sort_unstable();
        let (_, data, _) = unsafe { self.inodes.align_to::<u8>() };
        w.write_all(data.as_ref())?;
        // OK. Let's see if we have to align... :-(
        let cur_len = self.inodes.len() * size_of::<u32>();
        let padding_bytes = rafsv5_align(cur_len) - cur_len;
        w.write_padding(padding_bytes)?;
        Ok(data.len() + padding_bytes)
    }
pub fn store ( & mut self , w : & mut RafsIoWriter ) -> Result < usize > { // Sort prefetch table by inode index, hopefully, it can save time when mounting rafs // Because file data is dumped in the order of inode index. self . inodes . sort_unstable ( ) ; let ( _ , data , _ ) = unsafe { self . inodes . align_to :: < u8 > ( ) } ; w . write_all ( data . as_ref ( ) ) ? ; // OK. Let's see if we have to align... :-( let cur_len = self . inodes . len ( ) * size_of :: < u32 > ( ) ; let padding_bytes = rafsv5_align ( cur_len ) - cur_len ; w . write_padding ( padding_bytes ) ? ; Ok ( data . len ( ) + padding_bytes ) }
Store the inode prefetch table to a writer.
Store the inode prefetch table to a writer .
&mut self
w
&mut RafsIoWriter
&mut self
w
&mut RafsIoWriter