Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for DisableDirectIO (0.24 sec)

  1. internal/disk/directio_darwin.go

    // OpenFileDirectIO - bypass kernel cache.
    func OpenFileDirectIO(filePath string, flag int, perm os.FileMode) (*os.File, error) {
    	return directio.OpenFile(filePath, flag, perm)
    }
    
    // DisableDirectIO - disables directio mode.
    func DisableDirectIO(f *os.File) error {
    	fd := f.Fd()
    	_, err := unix.FcntlInt(fd, unix.F_NOCACHE, 0)
    	return err
    }
    
    // AlignedBlock - pass through to directio implementation.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Jun 17 14:31:36 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  2. internal/disk/directio_unix.go

    // OpenFileDirectIO - bypass kernel cache.
    func OpenFileDirectIO(filePath string, flag int, perm os.FileMode) (*os.File, error) {
    	return directio.OpenFile(filePath, flag, perm)
    }
    
    // DisableDirectIO - disables directio mode.
    func DisableDirectIO(f *os.File) error {
    	fd := f.Fd()
    	flag, err := unix.FcntlInt(fd, unix.F_GETFL, 0)
    	if err != nil {
    		return err
    	}
    	flag &= ^(syscall.O_DIRECT)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Jun 17 14:31:36 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  3. internal/disk/directio_unsupported.go

    // OpenFileDirectIO wrapper around os.OpenFile nothing special
    func OpenFileDirectIO(filePath string, flag int, perm os.FileMode) (*os.File, error) {
    	return os.OpenFile(filePath, flag, perm)
    }
    
    // DisableDirectIO is a no-op
    func DisableDirectIO(f *os.File) error {
    	return nil
    }
    
    // AlignedBlock simply returns an unaligned buffer
    // for systems that do not support DirectIO.
    func AlignedBlock(blockSize int) []byte {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  4. internal/ioutil/ioutil.go

    			}
    
    			// Disable O_DIRECT on fd's on unaligned buffer
    			// perform an amortized Fdatasync(fd) on the fd at
    			// the end, this is performed by the caller before
    			// closing 'w'.
    			if err = disk.DisableDirectIO(file); err != nil {
    				return written, err
    			}
    
    			// buf is not aligned, hence use writeUnaligned()
    			// for the remainder
    			un, err = w.Write(buf[len(buf)-remain:])
    			nw += int64(un)
    		}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 11:26:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
Back to top