ceph: kill ceph_osdc_writepages() "nofail" parameter
authorAlex Elder <elder@inktank.com>
Fri, 15 Feb 2013 17:42:29 +0000 (11:42 -0600)
committerAlex Elder <elder@inktank.com>
Mon, 18 Feb 2013 18:19:22 +0000 (12:19 -0600)
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 <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
fs/ceph/addr.c
include/linux/ceph/osd_client.h
net/ceph/osd_client.c

index 064d1a6..c7e401c 100644 (file)
@@ -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);
index 82bf633..afcb255 100644 (file)
@@ -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,
index d9d58bb..dd01b13 100644 (file)
@@ -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;
        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);