[Devel] [PATCH RHEL7 COMMIT] ms/fs: convert sync_file_range to use errseq_t based error-tracking
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Jun 18 12:02:03 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-862.3.2.vz7.61.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.3.2.vz7.61.3
------>
commit 7b7dec9e3b9782f624259e5ddfb6489088ae95f5
Author: Vasily Averin <vvs at virtuozzo.com>
Date: Mon Jun 18 12:02:03 2018 +0300
ms/fs: convert sync_file_range to use errseq_t based error-tracking
sync_file_range doesn't call down into the filesystem directly at all.
It only kicks off writeback of pagecache pages and optionally waits
on the result.
Convert sync_file_range to use errseq_t based error tracking, under the
assumption that most users will prefer this behavior when errors occur.
Reviewed-by: Jan Kara <jack at suse.cz>
Signed-off-by: Jeff Layton <jlayton at redhat.com>
https://pmc.acronis.com/browse/VSTOR-10912
(cherry picked from commit 6454568d961bc5de316014548838398174a128c4)
Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
fs/sync.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/sync.c b/fs/sync.c
index b34b91993692..07676a8fcec4 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -567,7 +567,7 @@ SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes,
ret = 0;
if (flags & SYNC_FILE_RANGE_WAIT_BEFORE) {
- ret = filemap_fdatawait_range(mapping, offset, endbyte);
+ ret = file_fdatawait_range(f.file, offset, endbyte);
if (ret < 0)
goto out_acct;
}
@@ -579,7 +579,7 @@ SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes,
}
if (flags & SYNC_FILE_RANGE_WAIT_AFTER)
- ret = filemap_fdatawait_range(mapping, offset, endbyte);
+ ret = file_fdatawait_range(f.file, offset, endbyte);
out_acct:
ub_percpu_inc(ub, frsync_done);
More information about the Devel
mailing list