diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-02-07 01:25:06 -0500 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-02-12 15:05:32 -0500 |
commit | 7b9761af86b63baf4ce304fbdfdb87227d4bfbed (patch) | |
tree | 8ed9e84726aa7a21c525c02bb1c398d20b89c395 /fs/orangefs | |
parent | e17be9fd4d51302c41b17e22f9ec96751f47951b (diff) |
orangefs: wait_for_direct_io(): restore the position in iter when restarting
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs')
-rw-r--r-- | fs/orangefs/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 40b38057b826..c767ec746c76 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c | |||
@@ -133,6 +133,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod | |||
133 | struct orangefs_khandle *handle = &orangefs_inode->refn.khandle; | 133 | struct orangefs_khandle *handle = &orangefs_inode->refn.khandle; |
134 | struct orangefs_bufmap *bufmap = NULL; | 134 | struct orangefs_bufmap *bufmap = NULL; |
135 | struct orangefs_kernel_op_s *new_op = NULL; | 135 | struct orangefs_kernel_op_s *new_op = NULL; |
136 | struct iov_iter saved = *iter; | ||
136 | int buffer_index = -1; | 137 | int buffer_index = -1; |
137 | ssize_t ret; | 138 | ssize_t ret; |
138 | 139 | ||
@@ -211,6 +212,8 @@ populate_shared_memory: | |||
211 | if (ret == -EAGAIN && op_state_purged(new_op)) { | 212 | if (ret == -EAGAIN && op_state_purged(new_op)) { |
212 | orangefs_bufmap_put(bufmap, buffer_index); | 213 | orangefs_bufmap_put(bufmap, buffer_index); |
213 | buffer_index = -1; | 214 | buffer_index = -1; |
215 | if (type == ORANGEFS_IO_WRITE) | ||
216 | *iter = saved; | ||
214 | gossip_debug(GOSSIP_FILE_DEBUG, | 217 | gossip_debug(GOSSIP_FILE_DEBUG, |
215 | "%s:going to repopulate_shared_memory.\n", | 218 | "%s:going to repopulate_shared_memory.\n", |
216 | __func__); | 219 | __func__); |