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@xxxxxxxxxx> > --- > 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