@@ -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,10 +210,13 @@ 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 = bytes_to_cstr ( buf. as_ref ( ) ) ?; 
216-         let  version = self . vers . load ( ) ; 
219+         let  version = & self . meta . load ( ) . version ; 
217220        let  result = self 
218221            . fs 
219222            . async_lookup ( ctx. context ( ) ,  ctx. nodeid ( ) ,  name) 
@@ -236,7 +239,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
236239        } 
237240    } 
238241
239-     async  fn  async_getattr < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
242+     async  fn  async_getattr < S :  BitmapSlice > ( 
243+         & self , 
244+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
245+     )  -> Result < usize >  { 
240246        let  GetattrIn  {  flags,  fh,  .. }  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
241247        let  handle = if  ( flags &  GETATTR_FH )  != 0  { 
242248            Some ( fh. into ( ) ) 
@@ -251,7 +257,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
251257        ctx. async_handle_attr_result ( result) . await 
252258    } 
253259
254-     async  fn  async_setattr < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
260+     async  fn  async_setattr < S :  BitmapSlice > ( 
261+         & self , 
262+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
263+     )  -> Result < usize >  { 
255264        let  setattr_in:  SetattrIn  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
256265        let  handle = if  setattr_in. valid  &  FATTR_FH  != 0  { 
257266            Some ( setattr_in. fh . into ( ) ) 
@@ -268,7 +277,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
268277        ctx. async_handle_attr_result ( result) . await 
269278    } 
270279
271-     async  fn  async_open < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
280+     async  fn  async_open < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  ' _ ,   F ,  S > )  -> Result < usize >  { 
272281        let  OpenIn  {  flags,  fuse_flags }  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
273282        let  result = self 
274283            . fs 
@@ -289,7 +298,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
289298        } 
290299    } 
291300
292-     async  fn  async_read < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
301+     async  fn  async_read < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  ' _ ,   F ,  S > )  -> Result < usize >  { 
293302        let  ReadIn  { 
294303            fh, 
295304            offset, 
@@ -347,7 +356,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
347356                    . await 
348357                    . map_err ( Error :: EncodeMessage ) ?; 
349358                ctx. w 
350-                     . async_commit ( Some ( & data_writer. 0 ) ) 
359+                     . async_commit ( Some ( & mut   data_writer. 0 ) ) 
351360                    . await 
352361                    . map_err ( Error :: EncodeMessage ) ?; 
353362                Ok ( out. len  as  usize ) 
@@ -356,7 +365,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
356365        } 
357366    } 
358367
359-     async  fn  async_write < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
368+     async  fn  async_write < S :  BitmapSlice > ( 
369+         & self , 
370+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
371+     )  -> Result < usize >  { 
360372        let  WriteIn  { 
361373            fh, 
362374            offset, 
@@ -408,7 +420,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
408420        } 
409421    } 
410422
411-     async  fn  async_fsync < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
423+     async  fn  async_fsync < S :  BitmapSlice > ( 
424+         & self , 
425+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
426+     )  -> Result < usize >  { 
412427        let  FsyncIn  { 
413428            fh,  fsync_flags,  ..
414429        }  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
@@ -424,7 +439,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
424439        } 
425440    } 
426441
427-     async  fn  async_fsyncdir < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
442+     async  fn  async_fsyncdir < S :  BitmapSlice > ( 
443+         & self , 
444+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
445+     )  -> Result < usize >  { 
428446        let  FsyncIn  { 
429447            fh,  fsync_flags,  ..
430448        }  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
@@ -440,7 +458,10 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
440458        } 
441459    } 
442460
443-     async  fn  async_create < S :  BitmapSlice > ( & self ,  mut  ctx :  SrvContext < ' _ ,  F ,  S > )  -> Result < usize >  { 
461+     async  fn  async_create < S :  BitmapSlice > ( 
462+         & self , 
463+         mut  ctx :  SrvContext < ' _ ,  ' _ ,  F ,  S > , 
464+     )  -> Result < usize >  { 
444465        let  args:  CreateIn  = ctx. r . read_obj ( ) . map_err ( Error :: DecodeMessage ) ?; 
445466        let  buf = ServerUtil :: get_message_body ( & mut  ctx. r ,  & ctx. in_header ,  size_of :: < CreateIn > ( ) ) ?; 
446467        let  name = bytes_to_cstr ( & buf) ?; 
@@ -476,7 +497,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
476497
477498    async  fn  async_fallocate < S :  BitmapSlice > ( 
478499        & self , 
479-         mut  ctx :  SrvContext < ' _ ,  F ,  S > , 
500+         mut  ctx :  SrvContext < ' _ ,  ' _ ,   F ,  S > , 
480501    )  -> Result < usize >  { 
481502        let  FallocateIn  { 
482503            fh, 
@@ -497,7 +518,7 @@ impl<F: AsyncFileSystem + Sync> Server<F> {
497518    } 
498519} 
499520
500- impl < ' a ,  F :  AsyncFileSystem ,  S :  BitmapSlice >  SrvContext < ' a ,  F ,  S >  { 
521+ impl < ' a ,  ' b ,   F :  AsyncFileSystem ,  S :  BitmapSlice >  SrvContext < ' a ,   ' b ,  F ,  S >  { 
501522    async  fn  async_reply_ok < T :  ByteValued > ( 
502523        & mut  self , 
503524        out :  Option < T > , 
0 commit comments