[PATCH] ext3: disable O_DIRECT in journalled-data mode
We cannot sensibly support O_DIRECT reads or writes when all writes are journalled. This is because the VFS explicitly avoids syncing the file metadata during O_DIRECT reads and writes. ext3 with journalled data will leave pending changes in memory and they will overwrite the results of O_DIRECT writes, and O_DIRECT reads will not return the latest data. Setting the a_op to null will cause opens and fcntl(F_SETFL) to return -EINVAL if O_DIRECT is requested.
Showing
Please register or sign in to comment