Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2964311imm; Sun, 7 Oct 2018 16:29:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV611nMSttr9WjcLbun9p9bJPk2c9v09nzJZDvCQnY05ndp4mtXrtHvodDuY2vzhSRWyPHz9G X-Received: by 2002:a63:4e4e:: with SMTP id o14-v6mr19443500pgl.181.1538954960101; Sun, 07 Oct 2018 16:29:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538954960; cv=none; d=google.com; s=arc-20160816; b=m47vZPCQ0gE6d0JGKY/jbVu/W/q+hG/xJHEh2jGe9pSMLzAJ1s9Z6mqx9+NsVo6CJv GHfkYZfpmqRWFpvW6MpdkubZ+7DHebBlQc8lxt0bt5zJS9CZ/F7set25y4eXJCbkl97D bPkGxKPuTX/5qWyzqvqbwGRmCYT5m/YqOCihmUjuNLb0YKljeOXT81C4eyan8WMqmjYR zKcSPg4ViX0bGvonaKrVZsakEjiw7aTwtxPh8yMyPxzmCPfhuI75EYFqU8uOgSxB2uyL Hb6CbdM0pFOJ4HYUorGiXnMPtv35PaF3vDzxvKroCWoxkCZsJmvHvqZwQfLlRX4YkkOr FvvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JxqdOd9EE4Ud6puwZksYGvYwfqlVV7E/378up8LtBB8=; b=04ia+TtNwqHuwSy/aijlvyLlPVx0aAVbVjfA1WzmWneHTbf2envdrAF/yJX9w/gDMh Z3jEgGAbv8BxVQ67Xnw8gyU2CqEq9cBjFmkrSMqaHPRlpgYyEitlSjY55766Bz77zqzJ H8sE5AhrA6IPEEfGIaNt7S7o//B3vSRo6Tr0xmyexYUzv1dGNjfeW6xtblo8KEAZcjzG e/GYuWYAap3Klhkh7aRx8lBpj5gl2xoHmH/iv2IOKxxkG05HDE+pt2u8xNR5WIwrwx7g zLvJuPTyy3WciOQBx9GRFb4lApfajxc3XTpTu1lv459/xD8G1B3eaoGzammaZxheh6tl qbmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b=eZ98C133; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r18-v6si16091223pgb.578.2018.10.07.16.28.57; Sun, 07 Oct 2018 16:29:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b=eZ98C133; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728525AbeJHGhP (ORCPT + 99 others); Mon, 8 Oct 2018 02:37:15 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:45518 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728512AbeJHGhN (ORCPT ); Mon, 8 Oct 2018 02:37:13 -0400 Received: by mail-qk1-f195.google.com with SMTP id m8-v6so11075310qka.12 for ; Sun, 07 Oct 2018 16:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnibond-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JxqdOd9EE4Ud6puwZksYGvYwfqlVV7E/378up8LtBB8=; b=eZ98C133Cg6t4d/yvCyQe/cGvBE5x653m4uYQeiFz7NsdRMIUMrUdXAIjhUcwnsOdN zuTOR7Bb0vaAhD6L2Sv/XiR7eWXN76EiNZTIn6u8dNgc6hJVy5d3sqR3tP6AXgCUSRaB dN9oQrOEKJZENOey4TN3pxX7b+yOfn8Nv48i15QX5FfXZz0Uj09iubgZdAnT4ZcKv3Fg ldwiVUq99Rjn4JT3aN2dY6gizwI42BKVJjfoAhb3G/k2oASU27toCx+Tdm3D6Oj1aKwh BOAM20DSyDXIBE2moID6ElGXT24ZfP40S6zF0aBGNJ6IjPcZMaod4o2BBiCwmqNiJiXd 4nxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JxqdOd9EE4Ud6puwZksYGvYwfqlVV7E/378up8LtBB8=; b=JK+l8BbpjGcQBFAqNX4uLq9A4dAUYNsuotrBup26mzoqh5L9CipKBKB19jBmVlZy0M PbFVR7FFuw2/YFBRg10sZodQE1/yDOzRDRxj20lTY9oxhxXdsQ8leVRWnuohvXvBmLB/ R2sGgudNsw0lFU9A0Ojd38HIiBJHvYfQivMECfaQF74O6+SP0+P40gG8zETDHns+WNov w+TAy2eQaMvIIfZzmZ1HOwsdD3mT+21zI4IO9v+pmt9erYe93rQdVW55MeliKshDfRDw WvRSQXau+T8bwSgjbjiFUG8O9SCYIM2c0UkwRUkvAO4vgyKmGkKvZwgwLMLBYjIXwM2s rAvQ== X-Gm-Message-State: ABuFfoglQJ6/B6FsOUSYLvV3HDSEmy/G8puDKFbcoFiUWihYWocobvo/ /1NhX5rDl2sugndJMb2IWdLgWg== X-Received: by 2002:a37:8245:: with SMTP id e66-v6mr16947463qkd.335.1538954900623; Sun, 07 Oct 2018 16:28:20 -0700 (PDT) Received: from ip-172-31-22-34.ec2.internal (ec2-35-153-175-159.compute-1.amazonaws.com. [35.153.175.159]) by smtp.gmail.com with ESMTPSA id x38-v6sm6793915qtc.39.2018.10.07.16.28.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 07 Oct 2018 16:28:19 -0700 (PDT) From: Martin Brandenburg To: devel@lists.orangefs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, hubcap@omnibond.com Cc: Martin Brandenburg Subject: [PATCH 19/19] orangefs: do writepages_work if a single page must be written Date: Sun, 7 Oct 2018 23:27:36 +0000 Message-Id: <20181007232736.3780-20-martin@omnibond.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181007232736.3780-1-martin@omnibond.com> References: <20181007232736.3780-1-martin@omnibond.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Otherwise the next page can't possibly be an append and it'll just sit there and write pages one by one until it flushes the saved region at the very end. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 20950f3f758a..cd1263c45bb2 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -307,6 +307,10 @@ static int orangefs_writepages_callback(struct page *page, wr = (struct orangefs_write_request *)page_private(page); if (wr->len != PAGE_SIZE) { + if (ow->npages) { + orangefs_writepages_work(ow, wbc); + ow->npages = 0; + } ret = orangefs_writepage_locked(page, wbc); mapping_set_error(page->mapping, ret); unlock_page(page); @@ -335,6 +339,10 @@ static int orangefs_writepages_callback(struct page *page, } done: if (ret == -1) { + if (ow->npages) { + orangefs_writepages_work(ow, wbc); + ow->npages = 0; + } ret = orangefs_writepage_locked(page, wbc); mapping_set_error(page->mapping, ret); unlock_page(page); -- 2.19.0