diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-05 19:28:09 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-05-06 17:32:49 -0400 |
commit | 71d8e532b1549a478e6a6a8a44f309d050294d00 (patch) | |
tree | 58b40c17cbb806c94aa07121a8b010d16f825d27 /fs/ceph | |
parent | ed978a811ec528dbe40243605c3afab55892f722 (diff) |
start adding the tag to iov_iter
For now, just use the same thing we pass to ->direct_IO() - it's all
iovec-based at the moment. Pass it explicitly to iov_iter_init() and
account for kvec vs. iovec in there, by the same kludge NFS ->direct_IO()
uses.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 910a3022eb27..5b93cadedfbe 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
@@ -582,7 +582,7 @@ ceph_sync_direct_write(struct kiocb *iocb, const struct iovec *iov, | |||
582 | CEPH_OSD_FLAG_ONDISK | | 582 | CEPH_OSD_FLAG_ONDISK | |
583 | CEPH_OSD_FLAG_WRITE; | 583 | CEPH_OSD_FLAG_WRITE; |
584 | 584 | ||
585 | iov_iter_init(&i, iov, nr_segs, count, 0); | 585 | iov_iter_init(&i, WRITE, iov, nr_segs, count); |
586 | 586 | ||
587 | while (iov_iter_count(&i) > 0) { | 587 | while (iov_iter_count(&i) > 0) { |
588 | void __user *data = i.iov->iov_base + i.iov_offset; | 588 | void __user *data = i.iov->iov_base + i.iov_offset; |
@@ -703,7 +703,7 @@ static ssize_t ceph_sync_write(struct kiocb *iocb, const struct iovec *iov, | |||
703 | CEPH_OSD_FLAG_WRITE | | 703 | CEPH_OSD_FLAG_WRITE | |
704 | CEPH_OSD_FLAG_ACK; | 704 | CEPH_OSD_FLAG_ACK; |
705 | 705 | ||
706 | iov_iter_init(&i, iov, nr_segs, count, 0); | 706 | iov_iter_init(&i, WRITE, iov, nr_segs, count); |
707 | 707 | ||
708 | while ((len = iov_iter_count(&i)) > 0) { | 708 | while ((len = iov_iter_count(&i)) > 0) { |
709 | size_t left; | 709 | size_t left; |
@@ -808,7 +808,7 @@ static ssize_t ceph_aio_read(struct kiocb *iocb, const struct iovec *iov, | |||
808 | int checkeof = 0, read = 0; | 808 | int checkeof = 0, read = 0; |
809 | struct iov_iter i; | 809 | struct iov_iter i; |
810 | 810 | ||
811 | iov_iter_init(&i, iov, nr_segs, len, 0); | 811 | iov_iter_init(&i, READ, iov, nr_segs, len); |
812 | 812 | ||
813 | again: | 813 | again: |
814 | dout("aio_read %p %llx.%llx %llu~%u trying to get caps on %p\n", | 814 | dout("aio_read %p %llx.%llx %llu~%u trying to get caps on %p\n", |
@@ -961,7 +961,7 @@ retry_snap: | |||
961 | * are pending vmtruncate. So write and vmtruncate | 961 | * are pending vmtruncate. So write and vmtruncate |
962 | * can not run at the same time | 962 | * can not run at the same time |
963 | */ | 963 | */ |
964 | iov_iter_init(&from, iov, nr_segs, count, 0); | 964 | iov_iter_init(&from, WRITE, iov, nr_segs, count); |
965 | written = generic_perform_write(file, &from, pos); | 965 | written = generic_perform_write(file, &from, pos); |
966 | if (likely(written >= 0)) | 966 | if (likely(written >= 0)) |
967 | iocb->ki_pos = pos + written; | 967 | iocb->ki_pos = pos + written; |