mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
ceph: don't use special DIO path for encrypted inodes
Eventually I want to merge the synchronous and direct read codepaths, possibly via new netfs infrastructure. For now, the direct path is not crypto-enabled, so use the sync read/write paths instead. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Xiubo Li <xiubli@redhat.com> Reviewed-and-tested-by: Luís Henriques <lhenriques@suse.de> Reviewed-by: Milind Changire <mchangir@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
5c64737d25
commit
8cff8f5374
1 changed files with 4 additions and 2 deletions
|
@ -1738,7 +1738,9 @@ static ssize_t ceph_read_iter(struct kiocb *iocb, struct iov_iter *to)
|
||||||
ceph_cap_string(got));
|
ceph_cap_string(got));
|
||||||
|
|
||||||
if (!ceph_has_inline_data(ci)) {
|
if (!ceph_has_inline_data(ci)) {
|
||||||
if (!retry_op && (iocb->ki_flags & IOCB_DIRECT)) {
|
if (!retry_op &&
|
||||||
|
(iocb->ki_flags & IOCB_DIRECT) &&
|
||||||
|
!IS_ENCRYPTED(inode)) {
|
||||||
ret = ceph_direct_read_write(iocb, to,
|
ret = ceph_direct_read_write(iocb, to,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
if (ret >= 0 && ret < len)
|
if (ret >= 0 && ret < len)
|
||||||
|
@ -2024,7 +2026,7 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)
|
||||||
|
|
||||||
/* we might need to revert back to that point */
|
/* we might need to revert back to that point */
|
||||||
data = *from;
|
data = *from;
|
||||||
if (iocb->ki_flags & IOCB_DIRECT)
|
if ((iocb->ki_flags & IOCB_DIRECT) && !IS_ENCRYPTED(inode))
|
||||||
written = ceph_direct_read_write(iocb, &data, snapc,
|
written = ceph_direct_read_write(iocb, &data, snapc,
|
||||||
&prealloc_cf);
|
&prealloc_cf);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue