@@ -60,15 +60,15 @@ impl<'a, S: BitmapSlice> io::Read for AsyncZcReader<'a, S> {
6060    } 
6161} 
6262
63- struct  AsyncZcWriter < ' a ,  S :  BitmapSlice  = ( ) > ( Writer < ' a ,  S > ) ; 
63+ struct  AsyncZcWriter < ' a ,  ' b ,   S :  BitmapSlice  = ( ) > ( Writer < ' a ,   ' b ,  S > ) ; 
6464
6565// The underlying VolatileSlice contains "*mut u8", which is just a pointer to a u8 array. 
6666// Actually we rely on the AsyncExecutor is a single-threaded worker, and we do not really send 
6767// 'Reader' to other threads. 
68- unsafe  impl < ' a ,  S :  BitmapSlice >  Send  for  AsyncZcWriter < ' a ,  S >  { } 
68+ unsafe  impl < ' a ,  ' b ,   S :  BitmapSlice >  Send  for  AsyncZcWriter < ' a ,   ' b ,  S >  { } 
6969
7070#[ async_trait( ?Send ) ]  
71- impl < ' a ,  S :  BitmapSlice >  AsyncZeroCopyWriter  for  AsyncZcWriter < ' a ,  S >  { 
71+ impl < ' a ,  ' b ,   S :  BitmapSlice >  AsyncZeroCopyWriter  for  AsyncZcWriter < ' a ,   ' b ,  S >  { 
7272    async  fn  async_write_from ( 
7373        & mut  self , 
7474        f :  Arc < dyn  AsyncFileReadWriteVolatile > , 
@@ -79,7 +79,7 @@ impl<'a, S: BitmapSlice> AsyncZeroCopyWriter for AsyncZcWriter<'a, S> {
7979    } 
8080} 
8181
82- impl < ' a ,  S :  BitmapSlice >  ZeroCopyWriter  for  AsyncZcWriter < ' a ,  S >  { 
82+ impl < ' a ,  ' b ,   S :  BitmapSlice >  ZeroCopyWriter  for  AsyncZcWriter < ' a ,   ' b ,  S >  { 
8383    fn  write_from ( 
8484        & mut  self , 
8585        f :  & mut  dyn  FileReadWriteVolatile , 
@@ -90,7 +90,7 @@ impl<'a, S: BitmapSlice> ZeroCopyWriter for AsyncZcWriter<'a, S> {
9090    } 
9191} 
9292
93- impl < ' a ,  S :  BitmapSlice >  io:: Write  for  AsyncZcWriter < ' a ,  S >  { 
93+ impl < ' a ,  ' b ,   S :  BitmapSlice >  io:: Write  for  AsyncZcWriter < ' a ,   ' b ,  S >  { 
9494    fn  write ( & mut  self ,  buf :  & [ u8 ] )  -> io:: Result < usize >  { 
9595        self . 0 . write ( buf) 
9696    } 
@@ -116,7 +116,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
116116    pub  async  unsafe  fn  async_handle_message < S :  BitmapSlice > ( 
117117        & self , 
118118        mut  r :  Reader < ' _ ,  S > , 
119-         w :  Writer < ' _ ,  S > , 
119+         w :  Writer < ' _ ,  ' _ ,   S > , 
120120        vu_req :  Option < & mut  dyn  FsCacheReqHandler > , 
121121        hook :  Option < & dyn  MetricsHook > , 
122122    )  -> Result < usize >  { 
@@ -210,7 +210,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
210210        res
211211    } 
212212
213-     async  fn  async_lookup < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
213+     async  fn  async_lookup < S :  BitmapSlice > ( 
214+         & self , 
215+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
216+     )  -> Result < usize >  { 
214217        let  buf = ServerUtil :: get_message_body ( & mut  ctx. r ,  & ctx. in_header ,  0 ) ?; 
215218        let  name = match  bytes_to_cstr ( buf. as_ref ( ) )  { 
216219            Ok ( name)  => name, 
@@ -222,8 +225,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
222225                return  Err ( e) ; 
223226            } 
224227        } ; 
225- 
226-         let  version = self . vers . load ( ) ; 
228+         let  version = & self . meta . load ( ) . version ; 
227229        let  result = self 
228230            . fs 
229231            . async_lookup ( ctx. context ( ) ,  ctx. nodeid ( ) ,  name) 
@@ -246,7 +248,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
246248        } 
247249    } 
248250
249-     async  fn  async_getattr < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
251+     async  fn  async_getattr < S :  BitmapSlice > ( 
252+         & self , 
253+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
254+     )  -> Result < usize >  { 
250255        let  GetattrIn  {  flags,  fh,  .. }  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
251256        let  handle = if  ( flags &  GETATTR_FH )  != 0  { 
252257            Some ( fh. into ( ) ) 
@@ -261,7 +266,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
261266        ctx. async_handle_attr_result ( result) . await 
262267    } 
263268
264-     async  fn  async_setattr < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
269+     async  fn  async_setattr < S :  BitmapSlice > ( 
270+         & self , 
271+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
272+     )  -> Result < usize >  { 
265273        let  setattr_in:  SetattrIn  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
266274        let  handle = if  setattr_in. valid  &  FATTR_FH  != 0  { 
267275            Some ( setattr_in. fh . into ( ) ) 
@@ -278,7 +286,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
278286        ctx. async_handle_attr_result ( result) . await 
279287    } 
280288
281-     async  fn  async_open < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
289+     async  fn  async_open < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  ' _ ,   F ,  S > )  -> Result < usize >  { 
282290        let  OpenIn  {  flags,  fuse_flags }  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
283291        let  result = self 
284292            . fs 
@@ -299,7 +307,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
299307        } 
300308    } 
301309
302-     async  fn  async_read < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
310+     async  fn  async_read < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  ' _ ,   F ,  S > )  -> Result < usize >  { 
303311        let  ReadIn  { 
304312            fh, 
305313            offset, 
@@ -357,7 +365,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
357365                    . await 
358366                    . map_err ( Error :: EncodeMessage ) ?; 
359367                ctx. w 
360-                     . async_commit ( Some ( & data_writer. 0 ) ) 
368+                     . async_commit ( Some ( & mut   data_writer. 0 ) ) 
361369                    . await 
362370                    . map_err ( Error :: EncodeMessage ) ?; 
363371                Ok ( out. len  as  usize ) 
@@ -366,7 +374,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
366374        } 
367375    } 
368376
369-     async  fn  async_write < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
377+     async  fn  async_write < S :  BitmapSlice > ( 
378+         & self , 
379+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
380+     )  -> Result < usize >  { 
370381        let  WriteIn  { 
371382            fh, 
372383            offset, 
@@ -418,7 +429,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
418429        } 
419430    } 
420431
421-     async  fn  async_fsync < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
432+     async  fn  async_fsync < S :  BitmapSlice > ( 
433+         & self , 
434+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
435+     )  -> Result < usize >  { 
422436        let  FsyncIn  { 
423437            fh,  fsync_flags,  ..
424438        }  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
@@ -434,7 +448,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
434448        } 
435449    } 
436450
437-     async  fn  async_fsyncdir < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
451+     async  fn  async_fsyncdir < S :  BitmapSlice > ( 
452+         & self , 
453+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
454+     )  -> Result < usize >  { 
438455        let  FsyncIn  { 
439456            fh,  fsync_flags,  ..
440457        }  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
@@ -450,7 +467,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
450467        } 
451468    } 
452469
453-     async  fn  async_create < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
470+     async  fn  async_create < S :  BitmapSlice > ( 
471+         & self , 
472+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
473+     )  -> Result < usize >  { 
454474        let  args:  CreateIn  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
455475        let  buf = ServerUtil :: get_message_body ( & mut  ctx. r ,  & ctx. in_header ,  size_of :: < CreateIn > ( ) ) ?; 
456476        let  name = match  bytes_to_cstr ( buf. as_ref ( ) )  { 
@@ -496,7 +516,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
496516
497517    async  fn  async_fallocate < S :  BitmapSlice > ( 
498518        & self , 
499-         mut  ctx :  SrvContext < ' _ ,  F ,  S > , 
519+         mut  ctx :  SrvContext < ' _ ,  ' _ ,   F ,  S > , 
500520    )  -> Result < usize >  { 
501521        let  FallocateIn  { 
502522            fh, 
@@ -517,7 +537,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
517537    } 
518538} 
519539
520- impl < ' a ,  F :  AsyncFileSystem ,  S :  BitmapSlice >  SrvContext < ' a ,  F ,  S >  { 
540+ impl < ' a ,  ' b ,   F :  AsyncFileSystem ,  S :  BitmapSlice >  SrvContext < ' a ,   ' b ,  F ,  S >  { 
521541    async  fn  async_reply_ok < T :  ByteValued > ( 
522542        & mut  self , 
523543        out :  Option < T > , 
0 commit comments