Re: Orangefs ABI documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > As for the WARN_ONs, the waitqueue one is easy to hit when the
> > client-core stops and restarts, you can see here where precopy_buffers
> > started whining about the client-core, you can see that the client
> > core restarted when the debug mask got sent back over, and then
> > the WARN_ON in waitqueue gets hit:

> > [ 1239.198976] precopy_buffers: Failed to copy-in buffers. Please make
> > sure that  the pvfs2-client is running. -14

Very interesting...

Looks like there's another bug in restart handling.  Namely, restart happening
on write() tries to fetch more data from iter, without bothering to rewind to
where it used to be.  That's where those -EFAULT are coming from.  Easy to fix,
fortunately - on top of the double-free fix, apply the following:

diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index 40b3805..c767ec7 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
 	struct orangefs_khandle *handle = &orangefs_inode->refn.khandle;
 	struct orangefs_bufmap *bufmap = NULL;
 	struct orangefs_kernel_op_s *new_op = NULL;
+	struct iov_iter saved = *iter;
 	int buffer_index = -1;
 	ssize_t ret;
 
@@ -211,6 +212,8 @@ populate_shared_memory:
 	if (ret == -EAGAIN && op_state_purged(new_op)) {
 		orangefs_bufmap_put(bufmap, buffer_index);
 		buffer_index = -1;
+		if (type == ORANGEFS_IO_WRITE)
+			*iter = saved;
 		gossip_debug(GOSSIP_FILE_DEBUG,
 			     "%s:going to repopulate_shared_memory.\n",
 			     __func__);
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux