mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
ceph: Don't use ceph-sync-mode for synchronous-fs.
Sending reads and writes through the sync read/write paths bypasses the page cache, which is not expected or generally a good idea. Removing the write check is safe as there is a conditional vfs_fsync_range() later in ceph_aio_write that already checks for the same flag (via IS_SYNC(inode)). Signed-off-by: Jianpeng Ma <majianpeng@gmail.com> Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
688bac461b
commit
7ab9b38070
1 changed files with 0 additions and 2 deletions
|
@ -659,7 +659,6 @@ static ssize_t ceph_aio_read(struct kiocb *iocb, const struct iovec *iov,
|
|||
|
||||
if ((got & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_LAZYIO)) == 0 ||
|
||||
(iocb->ki_filp->f_flags & O_DIRECT) ||
|
||||
(inode->i_sb->s_flags & MS_SYNCHRONOUS) ||
|
||||
(fi->flags & CEPH_F_SYNC))
|
||||
/* hmm, this isn't really async... */
|
||||
ret = ceph_sync_read(filp, base, len, ppos, &checkeof);
|
||||
|
@ -763,7 +762,6 @@ static ssize_t ceph_aio_write(struct kiocb *iocb, const struct iovec *iov,
|
|||
|
||||
if ((got & (CEPH_CAP_FILE_BUFFER|CEPH_CAP_FILE_LAZYIO)) == 0 ||
|
||||
(iocb->ki_filp->f_flags & O_DIRECT) ||
|
||||
(inode->i_sb->s_flags & MS_SYNCHRONOUS) ||
|
||||
(fi->flags & CEPH_F_SYNC)) {
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
written = ceph_sync_write(file, iov->iov_base, count,
|
||||
|
|
Loading…
Reference in a new issue