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() ...
Showing the changes to include/linux (3 of 15 files). Show all
Unified · Split
| @@ -628,6 +628,7 @@ int ceph_flags_to_mode(int flags); · 627 unmodified lines | ||
| 628 | 628 | CEPH_CAP_XATTR_SHARED) |
| 629 | 629 | #define CEPH_STAT_CAP_INLINE_DATA (CEPH_CAP_FILE_SHARED | \ |
| 630 | 630 | CEPH_CAP_FILE_RD) |
| 631 | +#define CEPH_STAT_RSTAT CEPH_CAP_FILE_WREXTEND | |
| 631 | 632 | |
| 632 | 633 | #define CEPH_CAP_ANY_SHARED (CEPH_CAP_AUTH_SHARED | \ |
| 633 | 634 | CEPH_CAP_LINK_SHARED | \ |
| @@ -170,6 +170,7 @@ struct ceph_osd_request { · 169 unmodified lines | ||
| 170 | 170 | u64 r_tid; /* unique for this client */ |
| 171 | 171 | struct rb_node r_node; |
| 172 | 172 | struct rb_node r_mc_node; /* map check */ |
| 173 | + struct work_struct r_complete_work; | |
| 173 | 174 | struct ceph_osd *r_osd; |
| 174 | 175 | |
| 175 | 176 | struct ceph_osd_request_target r_t; |
| @@ -201,7 +202,6 @@ struct ceph_osd_request { · 25 unmodified lines | ||
| 201 | 202 | struct timespec r_mtime; /* ditto */ |
| 202 | 203 | u64 r_data_offset; /* ditto */ |
| 203 | 204 | bool r_linger; /* don't resend on failure */ |
| 204 | − bool r_abort_on_full; /* return ENOSPC when full */ | |
| 205 | 205 | |
| 206 | 206 | /* internal */ |
| 207 | 207 | unsigned long r_stamp; /* jiffies, send or check time */ |
| @@ -347,6 +347,8 @@ struct ceph_osd_client { · 139 unmodified lines | ||
| 347 | 347 | struct rb_root linger_map_checks; |
| 348 | 348 | atomic_t num_requests; |
| 349 | 349 | atomic_t num_homeless; |
| 350 | + bool abort_on_full; /* abort w/ ENOSPC when full */ | |
| 351 | + int abort_err; | |
| 350 | 352 | struct delayed_work timeout_work; |
| 351 | 353 | struct delayed_work osds_timeout_work; |
| 352 | 354 | #ifdef CONFIG_DEBUG_FS |
| @@ -359,6 +361,7 @@ struct ceph_osd_client { · 6 unmodified lines | ||
| 359 | 361 | struct ceph_msgpool msgpool_op_reply; |
| 360 | 362 | |
| 361 | 363 | struct workqueue_struct *notify_wq; |
| 364 | + struct workqueue_struct *completion_wq; | |
| 362 | 365 | }; |
| 363 | 366 | |
| 364 | 367 | static inline bool ceph_osdmap_flag(struct ceph_osd_client *osdc, int flag) |
| @@ -378,6 +381,7 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc, · 13 unmodified lines | ||
| 378 | 381 | extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc, |
| 379 | 382 | struct ceph_msg *msg); |
| 380 | 383 | void ceph_osdc_update_epoch_barrier(struct ceph_osd_client *osdc, u32 eb); |
| 384 | +void ceph_osdc_abort_requests(struct ceph_osd_client *osdc, int err); | |
| 381 | 385 | |
| 382 | 386 | extern void osd_req_op_init(struct ceph_osd_request *osd_req, |
| 383 | 387 | unsigned int which, u16 opcode, u32 flags); |
| @@ -440,7 +444,7 @@ extern void osd_req_op_cls_response_data_pages(struct ceph_osd_request *, · 56 unmodified lines | ||
| 440 | 444 | struct page **pages, u64 length, |
| 441 | 445 | u32 alignment, bool pages_from_pool, |
| 442 | 446 | bool own_pages); |
| 443 | −extern void osd_req_op_cls_init(struct ceph_osd_request *osd_req, | |
| 447 | +extern int osd_req_op_cls_init(struct ceph_osd_request *osd_req, | |
| 444 | 448 | unsigned int which, u16 opcode, |
| 445 | 449 | const char *class, const char *method); |
| 446 | 450 | extern int osd_req_op_xattr_init(struct ceph_osd_request *osd_req, unsigned int which, |
| @@ -279,10 +279,10 @@ bool ceph_osds_changed(const struct ceph_osds *old_acting, · 278 unmodified lines | ||
| 279 | 279 | const struct ceph_osds *new_acting, |
| 280 | 280 | bool any_change); |
| 281 | 281 | |
| 282 | −int __ceph_object_locator_to_pg(struct ceph_pg_pool_info *pi, | |
| 283 | − const struct ceph_object_id *oid, | |
| 284 | − const struct ceph_object_locator *oloc, | |
| 285 | − struct ceph_pg *raw_pgid); | |
| 282 | +void __ceph_object_locator_to_pg(struct ceph_pg_pool_info *pi, | |
| 283 | + const struct ceph_object_id *oid, | |
| 284 | + const struct ceph_object_locator *oloc, | |
| 285 | + struct ceph_pg *raw_pgid); | |
| 286 | 286 | int ceph_object_locator_to_pg(struct ceph_osdmap *osdmap, |
| 287 | 287 | const struct ceph_object_id *oid, |
| 288 | 288 | const struct ceph_object_locator *oloc, |