From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:46263 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752251AbcBGBik (ORCPT ); Sat, 6 Feb 2016 20:38:40 -0500 Date: Sun, 7 Feb 2016 01:38:35 +0000 From: Al Viro To: Mike Marshall Cc: Linus Torvalds , linux-fsdevel , Stephen Rothwell Subject: Re: Orangefs ABI documentation Message-ID: <20160207013835.GY17997@ZenIV.linux.org.uk> References: <20160123214006.GO17997@ZenIV.linux.org.uk> <20160124001615.GT17997@ZenIV.linux.org.uk> <20160124040529.GX17997@ZenIV.linux.org.uk> <20160130173413.GE17997@ZenIV.linux.org.uk> <20160130182731.GF17997@ZenIV.linux.org.uk> <20160206194210.GX17997@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160206194210.GX17997@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > > 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__);