[Cluster-devel] [PATCH v3 6/8] gfs2: Implement iomap direct I/O support
Bob Peterson
rpeterso at redhat.com
Fri Apr 6 15:08:35 UTC 2018
Hi,
----- Original Message -----
> With that, the direct_IO address space operation can be all but
> eliminated: only a dummy remains which indicates that the filesystem
> supports direct I/O.
>
> Signed-off-by: Andreas Gruenbacher <agruenba at redhat.com>
> ---
> fs/gfs2/aops.c | 92 +------------------------------
> fs/gfs2/bmap.c | 14 ++++-
> fs/gfs2/file.c | 171
> +++++++++++++++++++++++++++++++++++++++++++++++++++++----
> 3 files changed, 174 insertions(+), 103 deletions(-)
(snip)
> + pos = iocb->ki_pos;
> + endbyte = pos + buffered - 1;
> + ret = filemap_write_and_wait_range(mapping, pos, endbyte);
> + if (!ret) {
> + iocb->ki_pos += buffered;
> + written += buffered;
> + invalidate_mapping_pages(mapping,
> + pos >> PAGE_SHIFT,
> + endbyte >> PAGE_SHIFT);
> + } else {
> + /*
> + * We don't know how much we wrote, so just return
> + * the number of bytes which were direct-written
> + */
Can't we get in trouble here because we don't update iocb->io_pos?
Regards,
Bob Peterson
More information about the Cluster-devel
mailing list