Commit 7b9761af authored by Al Viro's avatar Al Viro Committed by Mike Marshall

orangefs: wait_for_direct_io(): restore the position in iter when restarting

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent e17be9fd
...@@ -133,6 +133,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod ...@@ -133,6 +133,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
struct orangefs_khandle *handle = &orangefs_inode->refn.khandle; struct orangefs_khandle *handle = &orangefs_inode->refn.khandle;
struct orangefs_bufmap *bufmap = NULL; struct orangefs_bufmap *bufmap = NULL;
struct orangefs_kernel_op_s *new_op = NULL; struct orangefs_kernel_op_s *new_op = NULL;
struct iov_iter saved = *iter;
int buffer_index = -1; int buffer_index = -1;
ssize_t ret; ssize_t ret;
...@@ -211,6 +212,8 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod ...@@ -211,6 +212,8 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
if (ret == -EAGAIN && op_state_purged(new_op)) { if (ret == -EAGAIN && op_state_purged(new_op)) {
orangefs_bufmap_put(bufmap, buffer_index); orangefs_bufmap_put(bufmap, buffer_index);
buffer_index = -1; buffer_index = -1;
if (type == ORANGEFS_IO_WRITE)
*iter = saved;
gossip_debug(GOSSIP_FILE_DEBUG, gossip_debug(GOSSIP_FILE_DEBUG,
"%s:going to repopulate_shared_memory.\n", "%s:going to repopulate_shared_memory.\n",
__func__); __func__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment