mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8164900: Add support for O_DIRECT
Add support for Direct I/O in FileChannel Co-authored-by: Volker Simonis <volker.simonis@gmail.com> Reviewed-by: alanb, bpb, alanbur, coffeys, aph, clanger, plevart, mli, psandoz, simonis
This commit is contained in:
parent
97db013bd3
commit
ec1c3bce45
30 changed files with 1523 additions and 45 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -125,6 +125,12 @@ abstract class UnixFileStore
|
|||
return attrs.blockSize() * attrs.availableBlocks();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getBlockSize() throws IOException {
|
||||
UnixFileStoreAttributes attrs = readAttributes();
|
||||
return attrs.blockSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getUnallocatedSpace() throws IOException {
|
||||
UnixFileStoreAttributes attrs = readAttributes();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue