test/jdk/java/nio/channels/FileChannel/directio/PwriteDirect.java
author bpb
Tue, 17 Oct 2017 16:51:11 -0700
changeset 47428 d72d7d55c765
permissions -rw-r--r--
8164900: Add support for O_DIRECT Summary: Add support for Direct I/O in FileChannel Reviewed-by: alanb, bpb, alanbur, coffeys, aph, clanger, plevart, mli, psandoz, simonis Contributed-by: Lucy Lu <yingqi.lu@intel.com>, Volker Simonis <volker.simonis@gmail.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47428
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
     1
/*
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
     2
 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
     4
 *
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
     8
 *
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    13
 * accompanied this code).
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    14
 *
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    18
 *
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    21
 * questions.
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    22
 */
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    23
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    24
/* @test
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    25
 * @bug 8164900
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    26
 * @summary Test positional write method of FileChannel with DirectIO
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    27
 * (use -Dseed=X to set PRNG seed)
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    28
 * @library .. /test/lib
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    29
 * @build jdk.test.lib.RandomFactory
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    30
 *        DirectIOTest
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    31
 * @run main/othervm PwriteDirect
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    32
 * @key randomness
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    33
 */
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    34
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    35
import java.io.*;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    36
import java.nio.ByteBuffer;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    37
import java.nio.CharBuffer;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    38
import java.nio.channels.*;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    39
import java.nio.file.Files;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    40
import java.nio.file.FileStore;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    41
import java.nio.file.Path;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    42
import java.nio.file.Paths;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    43
import java.nio.file.StandardOpenOption;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    44
import java.util.Random;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    45
import com.sun.nio.file.ExtendedOpenOption;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    46
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    47
import jdk.test.lib.RandomFactory;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    48
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    49
/**
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    50
 * Testing FileChannel's positional write method.
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    51
 */
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    52
public class PwriteDirect {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    53
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    54
    private static Random generator = RandomFactory.getRandom();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    55
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    56
    private static int charsPerGroup = -1;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    57
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    58
    private static int alignment = -1;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    59
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    60
    private static boolean initTests() throws Exception {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    61
        Path p = DirectIOTest.createTempFile();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    62
        if (!DirectIOTest.isDirectIOSupportedByFS(p)) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    63
            Files.delete(p);
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    64
            return false;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    65
        }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    66
        try {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    67
            FileStore fs = Files.getFileStore(p);
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    68
            alignment = (int)fs.getBlockSize();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    69
            charsPerGroup = alignment;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    70
        } finally {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    71
            Files.delete(p);
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    72
        }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    73
        return true;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    74
    }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    75
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    76
    public static void main(String[] args) throws Exception {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    77
        if (initTests()) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    78
            genericTest();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    79
            TestWithNotAlignedChannelPosition();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    80
            testUnwritableChannel();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    81
        }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    82
    }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    83
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    84
    private static void testUnwritableChannel() throws Exception {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    85
        Path p = DirectIOTest.createTempFile();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    86
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    87
        try (FileChannel fc = FileChannel.open(p,
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    88
            StandardOpenOption.DELETE_ON_CLOSE, ExtendedOpenOption.DIRECT)) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    89
            try {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    90
                fc.write(ByteBuffer.allocate(charsPerGroup), 0);
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    91
                throw new RuntimeException("Expected exception not thrown");
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    92
            } catch(NonWritableChannelException e) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    93
                // Correct result
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    94
            }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    95
        }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    96
    }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    97
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    98
    private static void TestWithNotAlignedChannelPosition() throws Exception {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
    99
        Path p = DirectIOTest.createTempFile();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   100
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   101
        try (FileChannel fc = FileChannel.open(p,
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   102
            StandardOpenOption.WRITE, StandardOpenOption.DELETE_ON_CLOSE, ExtendedOpenOption.DIRECT)) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   103
            int bufferSize = charsPerGroup;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   104
            long position = charsPerGroup - 1;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   105
            try {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   106
                fc.write(ByteBuffer.allocate(bufferSize), position);
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   107
                throw new RuntimeException("Expected exception not thrown");
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   108
            } catch(IOException e) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   109
                if (!e.getMessage().contains("Channel position (" + position + ")"
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   110
                    + " is not a multiple of the block size (" + alignment + ")"))
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   111
                    throw new RuntimeException("Write test failed");
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   112
            }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   113
        }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   114
    }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   115
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   116
    private static void genericTest() throws Exception {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   117
        Path p = DirectIOTest.createTempFile();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   118
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   119
        initTestFile(p);
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   120
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   121
        try (FileChannel fc = FileChannel.open(p,
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   122
            StandardOpenOption.READ, StandardOpenOption.WRITE,
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   123
            StandardOpenOption.DELETE_ON_CLOSE, ExtendedOpenOption.DIRECT)) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   124
            ByteBuffer block =
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   125
                ByteBuffer.allocateDirect(charsPerGroup + alignment - 1)
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   126
                          .alignedSlice(alignment);
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   127
            for (int x = 0; x < 100; x++) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   128
                block.clear();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   129
                long offset = generator.nextInt(100) * charsPerGroup;
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   130
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   131
                // Write known sequence out
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   132
                for (int i = 0; i < charsPerGroup; i++) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   133
                    block.put(i, (byte)'a');
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   134
                }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   135
                long originalPosition = fc.position();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   136
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   137
                int written = fc.write(block, offset);
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   138
                if (written < 0)
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   139
                    throw new Exception("Write failed");
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   140
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   141
                long newPosition = fc.position();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   142
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   143
                // Ensure that file pointer position has not changed
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   144
                if (originalPosition != newPosition)
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   145
                    throw new Exception("File position modified");
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   146
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   147
                // Attempt to read sequence back in
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   148
                originalPosition = fc.position();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   149
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   150
                block.rewind();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   151
                int read = fc.read(block, offset);
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   152
                if (read != charsPerGroup)
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   153
                    throw new Exception("Read failed");
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   154
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   155
                newPosition = fc.position();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   156
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   157
                // Ensure that file pointer position has not changed
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   158
                if (originalPosition != newPosition)
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   159
                    throw new Exception("File position modified");
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   160
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   161
                for (int j = 0; j < charsPerGroup; j++) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   162
                    if (block.get(j) != (byte)'a')
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   163
                        throw new Exception("Write test failed");
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   164
                }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   165
            }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   166
        }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   167
    }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   168
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   169
    private static void initTestFile(Path p) throws Exception {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   170
        try (OutputStream fos = Files.newOutputStream(p)) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   171
            try (BufferedWriter awriter
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   172
                = new BufferedWriter(new OutputStreamWriter(fos, "8859_1"))) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   173
                for (int i = 0; i < 100; i++) {
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   174
                    String number = new Integer(i).toString();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   175
                    for (int h = 0; h < 4 - number.length(); h++)
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   176
                        awriter.write("0");
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   177
                    awriter.write("" + i);
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   178
                    for (int j = 0; j < 4092; j++)
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   179
                        awriter.write("0");
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   180
                }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   181
                awriter.flush();
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   182
            }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   183
        }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   184
    }
d72d7d55c765 8164900: Add support for O_DIRECT
bpb
parents:
diff changeset
   185
}