File tree Expand file tree Collapse file tree 3 files changed +20
-8
lines changed
Expand file tree Collapse file tree 3 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -1873,11 +1873,11 @@ impl Filesystem for BranchFs {
18731873 match nix:: sys:: statvfs:: statvfs ( storage_path) {
18741874 Ok ( stat) => {
18751875 reply. statfs (
1876- stat. blocks ( ) . into ( ) ,
1877- stat. blocks_free ( ) . into ( ) ,
1878- stat. blocks_available ( ) . into ( ) ,
1879- stat. files ( ) . into ( ) ,
1880- stat. files_free ( ) . into ( ) ,
1876+ stat. blocks ( ) ,
1877+ stat. blocks_free ( ) ,
1878+ stat. blocks_available ( ) ,
1879+ stat. files ( ) ,
1880+ stat. files_free ( ) ,
18811881 stat. block_size ( ) as u32 ,
18821882 stat. name_max ( ) as u32 ,
18831883 stat. fragment_size ( ) as u32 ,
Original file line number Diff line number Diff line change @@ -61,15 +61,21 @@ pub struct PassthroughState {
6161 pub backing_ids : HashMap < u64 , BackingId > ,
6262}
6363
64- impl PassthroughState {
65- pub fn new ( ) -> Self {
64+ impl Default for PassthroughState {
65+ fn default ( ) -> Self {
6666 Self {
6767 next_fh : AtomicU64 :: new ( 1 ) ,
6868 backing_ids : HashMap :: new ( ) ,
6969 }
7070 }
7171}
7272
73+ impl PassthroughState {
74+ pub fn new ( ) -> Self {
75+ Self :: default ( )
76+ }
77+ }
78+
7379pub fn try_open_passthrough ( state : & mut PassthroughState , file : File , reply : ReplyOpen ) {
7480 let backing_id = match reply. open_backing ( & file) {
7581 Ok ( id) => id,
Original file line number Diff line number Diff line change @@ -46,9 +46,15 @@ pub fn ctl_file_size(_ino: u64) -> u64 {
4646
4747pub struct PassthroughState { }
4848
49+ impl Default for PassthroughState {
50+ fn default ( ) -> Self {
51+ Self { }
52+ }
53+ }
54+
4955impl PassthroughState {
5056 pub fn new ( ) -> Self {
51- Self { }
57+ Self :: default ( )
5258 }
5359}
5460
You can’t perform that action at this time.
0 commit comments