• Han-Wen Nienhuys's avatar
    fuse: change raw API for ListXAttr/GetXAttr · 0f169dda
    Han-Wen Nienhuys authored
    The protocol is:
    
      request: read (with buffer 1024)
      response: data (if buffer is big enough), or (data size, ERANGE)
    
    Before, the raw API provided
    
    * GetXAttrSize: called if the kernel sends a 0 sized buffer (which
      never happens
    
    * GetXAttrData: called in other cases. The return value is []byte
      forcing allocation of potentially large buffers
    
    * ListXAttr: return value []byte, so also problematic for allocation.
    
    Now, the raw API mirrors the kernel API more closely, and use recycled
    buffers for more efficiency.
    0f169dda
opcode.go 25.3 KB