Skip to content

Commit dc594c3

Browse files
committed
Merge tag 'ceph-for-4.18-rc1' of git://github.com/ceph/ceph-client
Pull ceph updates from Ilya Dryomov: "The main piece is a set of libceph changes that revamps how OSD requests are aborted, improving CephFS ENOSPC handling and making "umount -f" actually work (Zheng and myself). The rest is mostly mount option handling cleanups from Chengguang and assorted fixes from Zheng, Luis and Dongsheng. * tag 'ceph-for-4.18-rc1' of git://github.com/ceph/ceph-client: (31 commits) rbd: flush rbd_dev->watch_dwork after watch is unregistered ceph: update description of some mount options ceph: show ino32 if the value is different with default ceph: strengthen rsize/wsize/readdir_max_bytes validation ceph: fix alignment of rasize ceph: fix use-after-free in ceph_statfs() ceph: prevent i_version from going back ceph: fix wrong check for the case of updating link count libceph: allocate the locator string with GFP_NOFAIL libceph: make abort_on_full a per-osdc setting libceph: don't abort reads in ceph_osdc_abort_on_full() libceph: avoid a use-after-free during map check libceph: don't warn if req->r_abort_on_full is set libceph: use for_each_request() in ceph_osdc_abort_on_full() libceph: defer __complete_request() to a workqueue libceph: move more code into __complete_request() libceph: no need to call flush_workqueue() before destruction ceph: flush pending works before shutdown super ceph: abort osd requests on force umount libceph: introduce ceph_osdc_abort_requests() ...
2 parents e7655d2 + 23edca8 commit dc594c3

15 files changed

Lines changed: 372 additions & 256 deletions

File tree

‎Documentation/filesystems/ceph.txt‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,13 @@ Mount Options
105105
address its connection to the monitor originates from.
106106

107107
wsize=X
108-
Specify the maximum write size in bytes. By default there is no
109-
maximum. Ceph will normally size writes based on the file stripe
110-
size.
108+
Specify the maximum write size in bytes. Default: 16 MB.
111109

112110
rsize=X
113-
Specify the maximum read size in bytes. Default: 64 MB.
111+
Specify the maximum read size in bytes. Default: 16 MB.
114112

115113
rasize=X
116-
Specify the maximum readahead. Default: 8 MB.
114+
Specify the maximum readahead size in bytes. Default: 8 MB.
117115

118116
mount_timeout=X
119117
Specify the timeout value for mount (in seconds), in the case

‎drivers/block/rbd.c‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,6 +2339,7 @@ static bool is_zero_bvecs(struct bio_vec *bvecs, u32 bytes)
23392339
static int rbd_obj_issue_copyup(struct rbd_obj_request *obj_req, u32 bytes)
23402340
{
23412341
unsigned int num_osd_ops = obj_req->osd_req->r_num_ops;
2342+
int ret;
23422343

23432344
dout("%s obj_req %p bytes %u\n", __func__, obj_req, bytes);
23442345
rbd_assert(obj_req->osd_req->r_ops[0].op == CEPH_OSD_OP_STAT);
@@ -2353,6 +2354,11 @@ static int rbd_obj_issue_copyup(struct rbd_obj_request *obj_req, u32 bytes)
23532354
if (!obj_req->osd_req)
23542355
return -ENOMEM;
23552356

2357+
ret = osd_req_op_cls_init(obj_req->osd_req, 0, CEPH_OSD_OP_CALL, "rbd",
2358+
"copyup");
2359+
if (ret)
2360+
return ret;
2361+
23562362
/*
23572363
* Only send non-zero copyup data to save some I/O and network
23582364
* bandwidth -- zero copyup data is equivalent to the object not
@@ -2362,9 +2368,6 @@ static int rbd_obj_issue_copyup(struct rbd_obj_request *obj_req, u32 bytes)
23622368
dout("%s obj_req %p detected zeroes\n", __func__, obj_req);
23632369
bytes = 0;
23642370
}
2365-
2366-
osd_req_op_cls_init(obj_req->osd_req, 0, CEPH_OSD_OP_CALL, "rbd",
2367-
"copyup");
23682371
osd_req_op_cls_request_data_bvecs(obj_req->osd_req, 0,
23692372
obj_req->copyup_bvecs,
23702373
obj_req->copyup_bvec_count,
@@ -3397,7 +3400,6 @@ static void cancel_tasks_sync(struct rbd_device *rbd_dev)
33973400
{
33983401
dout("%s rbd_dev %p\n", __func__, rbd_dev);
33993402

3400-
cancel_delayed_work_sync(&rbd_dev->watch_dwork);
34013403
cancel_work_sync(&rbd_dev->acquired_lock_work);
34023404
cancel_work_sync(&rbd_dev->released_lock_work);
34033405
cancel_delayed_work_sync(&rbd_dev->lock_dwork);
@@ -3415,6 +3417,7 @@ static void rbd_unregister_watch(struct rbd_device *rbd_dev)
34153417
rbd_dev->watch_state = RBD_WATCH_STATE_UNREGISTERED;
34163418
mutex_unlock(&rbd_dev->watch_mutex);
34173419

3420+
cancel_delayed_work_sync(&rbd_dev->watch_dwork);
34183421
ceph_osdc_flush_notifies(&rbd_dev->rbd_client->client->osdc);
34193422
}
34203423

‎fs/ceph/addr.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,6 @@ static int __ceph_pool_perm_get(struct ceph_inode_info *ci,
19361936
err = ceph_osdc_start_request(&fsc->client->osdc, rd_req, false);
19371937

19381938
wr_req->r_mtime = ci->vfs_inode.i_mtime;
1939-
wr_req->r_abort_on_full = true;
19401939
err2 = ceph_osdc_start_request(&fsc->client->osdc, wr_req, false);
19411940

19421941
if (!err)

0 commit comments

Comments
 (0)