vdisk_fileio: Add support for asynchronous I/O processing

Using asynchronous has the advantage that SCSI commands can be processed
concurrently even if only one SCST command thread has been configured.
Asynchronous direct I/O has the additional advantage that the page cache
is bypassed and hence that the command processing overhead is reduced.

Asynchronous I/O is not used when DIF is enabled because it is
nontrivial to ensure that a DIF read received after a DIF write
returns the data that has just been written.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7514 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2018-10-14 04:10:59 +00:00
parent 50e31529c4
commit d84fc0783d
3 changed files with 203 additions and 17 deletions
+19
View File
@@ -327,6 +327,25 @@ static inline int vfs_fsync_backport(struct file *file, int datasync)
#define vfs_fsync vfs_fsync_backport
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) && \
LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
/*
* See also commit bb7462b6fd64 ("vfs: use helpers for calling
* f_op->{read,write}_iter()").
*/
static inline ssize_t call_read_iter(struct file *file, struct kiocb *kio,
struct iov_iter *iter)
{
return file->f_op->read_iter(kio, iter);
}
static inline ssize_t call_write_iter(struct file *file, struct kiocb *kio,
struct iov_iter *iter)
{
return file->f_op->write_iter(kio, iter);
}
#endif
/* <linux/kernel.h> */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)