fn write(&self, ofs: u64, buf: &[u32]) -> node::Result<usize>{
		//println!("writing..");
		let sf=self.file();
		//println!("ofs:{} size:{}",sf.ofs,sf.size);
		unsafe{
			match SATA.write(PRIO, ofs, buf.len()/ata::io::SECTOR_SIZE, buf)
			{
				Ok(v) => Ok(v),
				Err(e) => todo!("Error when PV fails to read: {:?}", e),
			}
		}
		//Ok(0)
	}
/// Write data to the file, can only grow the file if ofs==size
Write data to the file, can only grow the file if ofs==size
Write data to the file can only grow the file if ofs == size
fn write(&self, ofs: u64, buf: &[u32]) -> node::Result<usize>{
		//println!("writing..");
		let sf=self.file();
		//println!("ofs:{} size:{}",sf.ofs,sf.size);
		unsafe{
			match SATA.write(PRIO, ofs, buf.len()/ata::io::SECTOR_SIZE, buf)
			{
				Ok(v) => Ok(v),
				Err(e) => todo!("Error when PV fails to read: {:?}", e),
			}
		}
		//Ok(0)
	}
fn write ( & self , ofs : u64 , buf : & [ u32 ] ) -> node :: Result < usize > { //println!("writing.."); let sf = self . file ( ) ; //println!("ofs:{} size:{}",sf.ofs,sf.size); unsafe { match SATA . write ( PRIO , ofs , buf . len ( ) / ata :: io :: SECTOR_SIZE , buf ) { Ok ( v ) => Ok ( v ) , Err ( e ) => todo ! ( " " e ) , } } //Ok(0) }
Write data to the file, can only grow the file if ofs==size
Write data to the file can only grow the file if ofs == size
&self
ofs
u64
buf
&[u32]
&self
ofs
u64
buf
&[u32]