From patchwork Sat Feb 16 16:31:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2151801 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E1048DF2A1 for ; Sat, 16 Feb 2013 16:31:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753582Ab3BPQbI (ORCPT ); Sat, 16 Feb 2013 11:31:08 -0500 Received: from mail-qe0-f48.google.com ([209.85.128.48]:53691 "EHLO mail-qe0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753551Ab3BPQbH (ORCPT ); Sat, 16 Feb 2013 11:31:07 -0500 Received: by mail-qe0-f48.google.com with SMTP id 3so1857859qea.7 for ; Sat, 16 Feb 2013 08:31:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=R6bCfzFaDEGOrsrCzPrdZ3oSDvRrsvkMmSxeZCP/680=; b=pReFlewVMc4+h7I6+V8yokLQFMV7DhiYXjtKDDvk+yH4TsAlhlCC7o2GvJH56qfv56 W9o1xwWMuON91iOWqcwk92eGDpsuXZPflP4iLGyROc4qTM3pNnn7YGscBHzMthOqjHeF mGSKKge8s/5KobQ3w1WytED8nAoXNkSzIIF1QudSHZjNxi7JRniJvWgKsvbZntJeKGBy H+vScHZ67YRw3xZ1eY1twvgfMf3bek/PzaqXYdn8xd3zdBY/Vo3Y6sbrUb7hb/a0o3Rd tqh+virGRU5ZcbVGUkkFDwakPIT6QJdBnDpWyNRgxHACwkmcx4XjlPUfL1svVelvtTT2 Nv4Q== X-Received: by 10.224.59.134 with SMTP id l6mr3323961qah.93.1361032266029; Sat, 16 Feb 2013 08:31:06 -0800 (PST) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id df6sm21207641qab.6.2013.02.16.08.31.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 16 Feb 2013 08:31:04 -0800 (PST) Message-ID: <511FB448.5080405@inktank.com> Date: Sat, 16 Feb 2013 10:31:04 -0600 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 1/4] ceph: kill ceph_osdc_writepages() "nofail" parameter References: <511FB409.8080007@inktank.com> In-Reply-To: <511FB409.8080007@inktank.com> X-Gm-Message-State: ALoCoQngjqjlRvzODBeXlmf3g5FeuClzDN+NlFjfeb4C/Ed7606g8MBk7r0qfRFtWrd4KtemRxyA Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org There is only one caller of ceph_osdc_writepages(), and it always passes the value true as its "nofail" argument. Get rid of that argument and replace its use in ceph_osdc_writepages() with the constant value true. This and a number of cleanup patches that follow resolve: http://tracker.ceph.com/issues/4126 Signed-off-by: Alex Elder --- fs/ceph/addr.c | 2 +- include/linux/ceph/osd_client.h | 2 +- net/ceph/osd_client.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) int rc = 0; @@ -1880,7 +1880,7 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino, CEPH_OSD_FLAG_WRITE, snapc, do_sync, truncate_seq, truncate_size, mtime, - nofail, 1, page_align); + true, 1, page_align); if (IS_ERR(req)) return PTR_ERR(req); @@ -1889,7 +1889,7 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino, dout("writepages %llu~%llu (%d pages)\n", off, len, req->r_num_pages); - rc = ceph_osdc_start_request(osdc, req, nofail); + rc = ceph_osdc_start_request(osdc, req, true); if (!rc) rc = ceph_osdc_wait_request(osdc, req); diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 064d1a6..c7e401c 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -493,7 +493,7 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc) page_off, len, ci->i_truncate_seq, ci->i_truncate_size, &inode->i_mtime, - &page, 1, 0, 0, true); + &page, 1, 0, 0); if (err < 0) { dout("writepage setting page/mapping error %d %p\n", err, page); SetPageError(page); diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 82bf633..afcb255 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h @@ -275,7 +275,7 @@ extern int ceph_osdc_writepages(struct ceph_osd_client *osdc, u32 truncate_seq, u64 truncate_size, struct timespec *mtime, struct page **pages, int nr_pages, - int flags, int do_sync, bool nofail); + int flags, int do_sync); /* watch/notify events */ extern int ceph_osdc_create_event(struct ceph_osd_client *osdc, diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index d9d58bb..dd01b13 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -1867,7 +1867,7 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino, u32 truncate_seq, u64 truncate_size, struct timespec *mtime, struct page **pages, int num_pages, - int flags, int do_sync, bool nofail) + int flags, int do_sync) { struct ceph_osd_request *req;