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:
Lucy Lu 2017-10-17 16:51:11 -07:00 committed by Brian Burkhalter
parent 97db013bd3
commit ec1c3bce45
30 changed files with 1523 additions and 45 deletions

View file

@ -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();