Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ceph-for-5.18-rc5' of https://github.com/ceph/ceph-client

Pull ceph client fixes from Ilya Dryomov:
"A fix for a NULL dereference that turns out to be easily triggerable
by fsync (marked for stable) and a false positive WARN and snap_rwsem
locking fixups"

* tag 'ceph-for-5.18-rc5' of https://github.com/ceph/ceph-client:
ceph: fix possible NULL pointer dereference for req->r_session
ceph: remove incorrect session state check
ceph: get snap_rwsem read lock in handle_cap_export for ceph_add_cap
libceph: disambiguate cluster/pool full log message

+12 -7
+7
fs/ceph/caps.c
··· 2274 2274 list_for_each_entry(req, &ci->i_unsafe_dirops, 2275 2275 r_unsafe_dir_item) { 2276 2276 s = req->r_session; 2277 + if (!s) 2278 + continue; 2277 2279 if (unlikely(s->s_mds >= max_sessions)) { 2278 2280 spin_unlock(&ci->i_unsafe_lock); 2279 2281 for (i = 0; i < max_sessions; i++) { ··· 2296 2294 list_for_each_entry(req, &ci->i_unsafe_iops, 2297 2295 r_unsafe_target_item) { 2298 2296 s = req->r_session; 2297 + if (!s) 2298 + continue; 2299 2299 if (unlikely(s->s_mds >= max_sessions)) { 2300 2300 spin_unlock(&ci->i_unsafe_lock); 2301 2301 for (i = 0; i < max_sessions; i++) { ··· 3874 3870 dout("handle_cap_export inode %p ci %p mds%d mseq %d target %d\n", 3875 3871 inode, ci, mds, mseq, target); 3876 3872 retry: 3873 + down_read(&mdsc->snap_rwsem); 3877 3874 spin_lock(&ci->i_ceph_lock); 3878 3875 cap = __get_cap_for_mds(ci, mds); 3879 3876 if (!cap || cap->cap_id != le64_to_cpu(ex->cap_id)) ··· 3938 3933 } 3939 3934 3940 3935 spin_unlock(&ci->i_ceph_lock); 3936 + up_read(&mdsc->snap_rwsem); 3941 3937 mutex_unlock(&session->s_mutex); 3942 3938 3943 3939 /* open target session */ ··· 3964 3958 3965 3959 out_unlock: 3966 3960 spin_unlock(&ci->i_ceph_lock); 3961 + up_read(&mdsc->snap_rwsem); 3967 3962 mutex_unlock(&session->s_mutex); 3968 3963 if (tsession) { 3969 3964 mutex_unlock(&tsession->s_mutex);
-6
fs/ceph/mds_client.c
··· 4434 4434 4435 4435 bool check_session_state(struct ceph_mds_session *s) 4436 4436 { 4437 - struct ceph_fs_client *fsc = s->s_mdsc->fsc; 4438 - 4439 4437 switch (s->s_state) { 4440 4438 case CEPH_MDS_SESSION_OPEN: 4441 4439 if (s->s_ttl && time_after(jiffies, s->s_ttl)) { ··· 4442 4444 } 4443 4445 break; 4444 4446 case CEPH_MDS_SESSION_CLOSING: 4445 - /* Should never reach this when not force unmounting */ 4446 - WARN_ON_ONCE(s->s_ttl && 4447 - READ_ONCE(fsc->mount_state) != CEPH_MOUNT_SHUTDOWN); 4448 - fallthrough; 4449 4447 case CEPH_MDS_SESSION_NEW: 4450 4448 case CEPH_MDS_SESSION_RESTARTING: 4451 4449 case CEPH_MDS_SESSION_CLOSED:
+5 -1
net/ceph/osd_client.c
··· 2385 2385 if (ceph_test_opt(osdc->client, ABORT_ON_FULL)) { 2386 2386 err = -ENOSPC; 2387 2387 } else { 2388 - pr_warn_ratelimited("FULL or reached pool quota\n"); 2388 + if (ceph_osdmap_flag(osdc, CEPH_OSDMAP_FULL)) 2389 + pr_warn_ratelimited("cluster is full (osdmap FULL)\n"); 2390 + else 2391 + pr_warn_ratelimited("pool %lld is full or reached quota\n", 2392 + req->r_t.base_oloc.pool); 2389 2393 req->r_t.paused = true; 2390 2394 maybe_request_map(osdc); 2391 2395 }