code: func Init(r io.ReaderAt) (*FS, error) {
  	fs := &FS{
  		r:         r,
  		buf:       make([]byte, 1024),
  		BlockSize: superSize,
  	}
  
  	var super diskSuper
  	if _, err := fs.read(superOff, 0, &super); err != nil {
  		return nil, err
  	}
  
  	if super.Magic != superMagic {
  		return nil, fmt.Errorf("bad magic %#x wanted %#x", super.Magic, superMagic)
  	}
  
  	bsize := uint32(minBlockSize << super.Logblocksize)
  	fs.BlockSize = int(bsize)
  	fs.NumBlock = int64(super.Nblock)
  	fs.numGroup = (super.Nblock + super.Blockspergroup - 1) / super.Blockspergroup
  	fs.g = make([]*diskGroup, fs.numGroup)
  	fs.inodesPerGroup = super.Inospergroup
  	fs.blocksPerGroup = super.Blockspergroup
  	if super.Revlevel >= 1 {
  		fs.inodeSize = uint32(super.Inosize)
  	} else {
  		fs.inodeSize = 128
  	}
  	fs.inodesPerBlock = bsize / fs.inodeSize
  	if bsize == superOff {
  		fs.groupAddr = 2
  	} else {
  		fs.groupAddr = 1
  	}
  	fs.descPerBlock = bsize / diskGroupSize
  	fs.firstBlock = super.Firstdatablock
  
  	return fs, nil
  }
docs: // Init returns an FS reading from the file system stored in r.