summaryrefslogtreecommitdiff
path: root/src/AbstractDiskWriter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/AbstractDiskWriter.cc')
-rw-r--r--src/AbstractDiskWriter.cc23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/AbstractDiskWriter.cc b/src/AbstractDiskWriter.cc
index b1c54f3b..ae5c1b5a 100644
--- a/src/AbstractDiskWriter.cc
+++ b/src/AbstractDiskWriter.cc
@@ -58,8 +58,7 @@ namespace aria2 {
AbstractDiskWriter::AbstractDiskWriter(const std::string& filename)
: filename_(filename),
fd_(-1),
- readOnly_(false),
- directIOAllowed_(false)
+ readOnly_(false)
{}
AbstractDiskWriter::~AbstractDiskWriter()
@@ -281,26 +280,6 @@ uint64_t AbstractDiskWriter::size()
return File(filename_).size();
}
-void AbstractDiskWriter::enableDirectIO()
-{
-#ifdef ENABLE_DIRECT_IO
- if(directIOAllowed_) {
- int flg;
- while((flg = fcntl(fd_, F_GETFL)) == -1 && errno == EINTR);
- while(fcntl(fd_, F_SETFL, flg|O_DIRECT) == -1 && errno == EINTR);
- }
-#endif // ENABLE_DIRECT_IO
-}
-
-void AbstractDiskWriter::disableDirectIO()
-{
-#ifdef ENABLE_DIRECT_IO
- int flg;
- while((flg = fcntl(fd_, F_GETFL)) == -1 && errno == EINTR);
- while(fcntl(fd_, F_SETFL, flg&(~O_DIRECT)) == -1 && errno == EINTR);
-#endif // ENABLE_DIRECT_IO
-}
-
void AbstractDiskWriter::enableReadOnly()
{
readOnly_ = true;