From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.8 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796231222; b=S3N+uOyoIt+X5xARZHmLcLS3zI0qzPU98nWihjxffDF4HbFmnk30Xdbx1bHIMaaFAV47 hRO+9wC3Ue5nMkItEgee2lNptD8pXDaHVggWhvYKTM8YkBHu7ITZqicJZ/8cCvW/CUwjo /hYqVwlVarTFV+FzOl4FpkoWacLd6e4D8Ciyx+3UMLZ0zlhCrYbVFHSG8QZwP5XTJWfj4 0oXI267O0jwDnha+tMS7WLMV5YbzTRyZe+zzXTVGEiaNDtZgl/9Xl4+twvfdeiIL7WZfl EFMd54SoSht79kQlCCjyH0JvcASp6sYs3bQ4SPg3iEkLIkSea5WSp/6fOhwDYPQG6kA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796231222; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=ri+vZQBjFQV2WYKDY9tvxHaQ/50sVQ3GPtsbuR9cTSE=; b=Mz3zccYbzrG3t9nRNV4d2WD8Pq4wyNq0rUdJIX74SF24WotET9iZ2fGbJ5Ym40Zg4LBG w6EcXXSCLmljwq8OF/f2KuhdseTYDmFdY79KrrItZe8NjoZp2QfvpOKHb5mF+hvRbt4db J7tWwygWeAMBnj2vEOSue27LlE5q563hi0IW6wYcWVpG6O2BOgKEtOmokaw/gjSOavmxV V5CQNElaUPxsO68Rem4Y01NwVTuyL2KqLGzJVhbReZ48IkPLsPeos8ktNnnL2suWBzka6 yjSCtU3JYvjOa9NkEcVRkwO4nZpx+tqVxXE2xthc+FBd6Z8q59CXRTWZMJdaU8f2CdA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Mdh80h8c; arc=none smtp.remote-ip=192.198.163.8 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E869606A329; Wed, 2 Dec 2026 17:07:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3E869606A329 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Mdh80h8c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796231222; x=1827767222; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ri+vZQBjFQV2WYKDY9tvxHaQ/50sVQ3GPtsbuR9cTSE=; b=Mdh80h8c7H+1TkuwX5di30cFV6u82F3oEV7Nlt4d1grOZdS6RdBglXen Ee41QRGLI3hpiu3T5uuibAlghlg7IcnXX5dvO0OJqCJzW5bEOH7IwT6QZ B6YpqP/ymDABb+vcVPkD7krKhGJzK5OBeou0dLdR6MZZA9jKIwqQOl2jt zzf4X86xtIqI/PZCCJyrG8JOuCLragqt8Z/v0etrq68rr0DxNLzP9nqqM XJphVmz/Z8i/nugrWpyZzYKVwid2mUSI79Jq3n0eyjY3K+4rIhWlbOrEJ i7Sw7tAywPya1ZdEjKdGI7T51p+D8Mn67KgjL8Q7SCPIuA6C/cPapM2le g==; X-CSE-ConnectionGUID: jL8Fji89S2y3Cvy9AzjH1Q== X-CSE-MsgGUID: bJIGi1ScQ1OSmWnq2LXkYA== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5046522" X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="5046522" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 09:06:58 -0800 X-CSE-ConnectionGUID: 4eKmLbgGTQGEdY4wRSysOA== X-CSE-MsgGUID: WoLlIDFiSlS3WL+yUeGLHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="13801520" Received: from lkp-server01.sh.intel.com (HELO 0caa9d2d175c) ([10.239.97.150]) by fmviesa002.fm.intel.com with ESMTP; 02 Dec 2026 09:06:54 -0800 Received: from kbuild by 0caa9d2d175c with local (Exim 4.98.2) (envelope-from ) id 1xYnn8-00000001frx-2sKT; Wed, 02 Dec 2026 17:06:50 +0000 Date: Thu, 3 Dec 2026 01:06:08 +0800 From: kernel test robot To: Kaho Jiang , Ilya Dryomov , Alex Markuze , Xiubo Li , Viacheslav Dubeyko Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, co+408fcc361565713f@bugs.sh, Kaho Jiang Subject: Re: [PATCH v5 2/2] ceph: defer the blocklist and fence off the MDS worker Message-ID: <20261203010135.A4ixKV92-lkp@intel.com> References: <20261202045041.130195-2-kj2864@nyu.edu> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261202045041.130195-2-kj2864@nyu.edu> Hi Kaho, kernel test robot noticed the following build errors: [auto build test ERROR on ceph-client/testing] [cannot apply to ceph-client/for-linus linus/master v7.4-rc5 next-20261130] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Kaho-Jiang/ceph-defer-the-blocklist-and-fence-off-the-MDS-worker/20261201-235041 base: https://github.com/ceph/ceph-client.git testing patch link: https://lore.kernel.org/r/20261202045041.130195-2-kj2864%40nyu.edu patch subject: [PATCH v5 2/2] ceph: defer the blocklist and fence off the MDS worker config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20261203/20261203010135.A4ixKV92-lkp@intel.com/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project ed93dc8f7a98c7dfdbf6f203bf72e6e9a82cde3e) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203010135.A4ixKV92-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/20261203010135.A4ixKV92-lkp@intel.com/ All errors (new ones prefixed by >>): >> fs/ceph/mds_client.c:4377:59: error: invalid operands to binary expression ('struct inode_state_flags' and 'int') 4377 | if (req->r_target_inode && (req->r_target_inode->i_state & I_NEW)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ 1 error generated. vim +4377 fs/ceph/mds_client.c 4158 4159 /* 4160 * Handle mds reply. 4161 * 4162 * We take the session mutex and parse and process the reply immediately. 4163 * This preserves the logical ordering of replies, capabilities, etc., sent 4164 * by the MDS as they are applied to our local cache. 4165 */ 4166 static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg) 4167 { 4168 struct ceph_mds_client *mdsc = session->s_mdsc; 4169 struct ceph_client *cl = mdsc->fsc->client; 4170 struct ceph_mds_request *req; 4171 struct ceph_mds_reply_head *head = msg->front.iov_base; 4172 struct ceph_mds_reply_info_parsed *rinfo; /* parsed reply info */ 4173 struct ceph_snap_realm *realm; 4174 unsigned int nofs_flags; 4175 struct dentry *lookup_dn; 4176 u64 tid; 4177 int err, result; 4178 int mds = session->s_mds; 4179 bool close_sessions = false; 4180 4181 if (msg->front.iov_len < sizeof(*head)) { 4182 pr_err_client(cl, "got corrupt (short) reply\n"); 4183 ceph_msg_dump(msg); 4184 return; 4185 } 4186 4187 /* get request, session */ 4188 tid = le64_to_cpu(msg->hdr.tid); 4189 mutex_lock(&mdsc->mutex); 4190 req = lookup_get_request(mdsc, tid); 4191 if (!req) { 4192 doutc(cl, "on unknown tid %llu\n", tid); 4193 mutex_unlock(&mdsc->mutex); 4194 return; 4195 } 4196 doutc(cl, "handle_reply %p\n", req); 4197 4198 /* correct session? */ 4199 if (req->r_session != session) { 4200 pr_err_client(cl, "got %llu on session mds%d not mds%d\n", 4201 tid, session->s_mds, 4202 req->r_session ? req->r_session->s_mds : -1); 4203 mutex_unlock(&mdsc->mutex); 4204 goto out; 4205 } 4206 4207 /* dup? */ 4208 if ((test_bit(CEPH_MDS_R_GOT_UNSAFE, &req->r_req_flags) && !head->safe) || 4209 (test_bit(CEPH_MDS_R_GOT_SAFE, &req->r_req_flags) && head->safe)) { 4210 pr_warn_client(cl, "got a dup %s reply on %llu from mds%d\n", 4211 head->safe ? "safe" : "unsafe", tid, mds); 4212 mutex_unlock(&mdsc->mutex); 4213 goto out; 4214 } 4215 if (test_bit(CEPH_MDS_R_GOT_SAFE, &req->r_req_flags)) { 4216 pr_warn_client(cl, "got unsafe after safe on %llu from mds%d\n", 4217 tid, mds); 4218 mutex_unlock(&mdsc->mutex); 4219 goto out; 4220 } 4221 4222 result = le32_to_cpu(head->result); 4223 4224 if (head->safe) { 4225 set_bit(CEPH_MDS_R_GOT_SAFE, &req->r_req_flags); 4226 __unregister_request(mdsc, req); 4227 4228 /* last request during umount? */ 4229 if (mdsc->stopping && !__get_oldest_req(mdsc)) 4230 complete_all(&mdsc->safe_umount_waiters); 4231 4232 if (test_bit(CEPH_MDS_R_GOT_UNSAFE, &req->r_req_flags)) { 4233 /* 4234 * We already handled the unsafe response, now do the 4235 * cleanup. No need to examine the response; the MDS 4236 * doesn't include any result info in the safe 4237 * response. And even if it did, there is nothing 4238 * useful we could do with a revised return value. 4239 */ 4240 doutc(cl, "got safe reply %llu, mds%d\n", tid, mds); 4241 4242 mutex_unlock(&mdsc->mutex); 4243 goto out; 4244 } 4245 } else { 4246 set_bit(CEPH_MDS_R_GOT_UNSAFE, &req->r_req_flags); 4247 list_add_tail(&req->r_unsafe_item, &req->r_session->s_unsafe); 4248 } 4249 4250 /* 4251 * Now that all mutex-protected state has been updated above 4252 * (the request has been unregistered or added to the 4253 * session's unsafe list), we can unlock it. 4254 */ 4255 mutex_unlock(&mdsc->mutex); 4256 4257 doutc(cl, "tid %lld result %d\n", tid, result); 4258 if (test_bit(CEPHFS_FEATURE_REPLY_ENCODING, &session->s_features)) 4259 err = parse_reply_info(session, msg, req, (u64)-1); 4260 else 4261 err = parse_reply_info(session, msg, req, 4262 session->s_con.peer_features); 4263 4264 /* Must find target inode outside of mutexes to avoid deadlocks */ 4265 rinfo = &req->r_reply_info; 4266 if ((err >= 0) && rinfo->head->is_target) { 4267 struct inode *in = xchg(&req->r_new_inode, NULL); 4268 struct ceph_vino tvino = { 4269 .ino = le64_to_cpu(rinfo->targeti.in->ino), 4270 .snap = le64_to_cpu(rinfo->targeti.in->snapid) 4271 }; 4272 4273 /* 4274 * If we ended up opening an existing inode, discard 4275 * r_new_inode 4276 */ 4277 if (req->r_op == CEPH_MDS_OP_CREATE && 4278 !req->r_reply_info.has_create_ino) { 4279 /* This should never happen on an async create */ 4280 WARN_ON_ONCE(req->r_deleg_ino); 4281 iput(in); 4282 in = NULL; 4283 } 4284 4285 in = ceph_get_inode(mdsc->fsc->sb, tvino, in); 4286 if (IS_ERR(in)) { 4287 err = PTR_ERR(in); 4288 mutex_lock(&session->s_mutex); 4289 goto out_err; 4290 } 4291 req->r_target_inode = in; 4292 ceph_inode_set_subvolume(in, rinfo->targeti.subvolume_id); 4293 } 4294 4295 mutex_lock(&session->s_mutex); 4296 if (err < 0) { 4297 pr_err_client(cl, "got corrupt reply mds%d(tid:%lld)\n", 4298 mds, tid); 4299 ceph_msg_dump(msg); 4300 goto out_err; 4301 } 4302 4303 /* snap trace */ 4304 realm = NULL; 4305 if (rinfo->snapblob_len) { 4306 down_write(&mdsc->snap_rwsem); 4307 err = ceph_update_snap_trace(mdsc, rinfo->snapblob, 4308 rinfo->snapblob + rinfo->snapblob_len, 4309 le32_to_cpu(head->op) == CEPH_MDS_OP_RMSNAP, 4310 &realm); 4311 if (err) { 4312 up_write(&mdsc->snap_rwsem); 4313 close_sessions = true; 4314 if (err == -EIO) 4315 ceph_msg_dump(msg); 4316 goto out_err; 4317 } 4318 downgrade_write(&mdsc->snap_rwsem); 4319 } else { 4320 down_read(&mdsc->snap_rwsem); 4321 } 4322 4323 /* insert trace into our cache */ 4324 mutex_lock(&req->r_fill_mutex); 4325 4326 /* 4327 * ceph_fill_trace() may end the lookup of an in-lookup r_dentry 4328 * (d_splice_alias()), which lockdep sees as releasing its 4329 * DCACHE_PAR_LOOKUP lock: own it here meanwhile, see 4330 * ceph_mdsc_do_request(). splice_dentry() may replace r_dentry. 4331 */ 4332 lookup_dn = NULL; 4333 if (test_bit(CEPH_MDS_R_LOOKUP_HANDOFF, &req->r_req_flags)) { 4334 lookup_dn = req->r_dentry; 4335 d_lookup_acquire(lookup_dn); 4336 } 4337 4338 /* disable fs reclaim while we are using current->journal_info 4339 * for our own purposes, or else shrinkers of other 4340 * filesystems might dereference this pointer as a different 4341 * type 4342 */ 4343 nofs_flags = memalloc_nofs_save(); 4344 4345 current->journal_info = req; 4346 err = ceph_fill_trace(mdsc->fsc->sb, req); 4347 if (err == 0) { 4348 if (result == 0 && (req->r_op == CEPH_MDS_OP_READDIR || 4349 req->r_op == CEPH_MDS_OP_LSSNAP)) 4350 err = ceph_readdir_prepopulate(req, req->r_session); 4351 } 4352 current->journal_info = NULL; 4353 memalloc_nofs_restore(nofs_flags); 4354 4355 if (lookup_dn) 4356 d_lookup_release(lookup_dn); 4357 mutex_unlock(&req->r_fill_mutex); 4358 4359 up_read(&mdsc->snap_rwsem); 4360 if (realm) 4361 ceph_put_snap_realm(mdsc, realm); 4362 4363 if (err == 0) { 4364 if (req->r_target_inode && 4365 test_bit(CEPH_MDS_R_GOT_UNSAFE, &req->r_req_flags)) { 4366 struct ceph_inode_info *ci = 4367 ceph_inode(req->r_target_inode); 4368 spin_lock(&ci->i_unsafe_lock); 4369 list_add_tail(&req->r_unsafe_target_item, 4370 &ci->i_unsafe_iops); 4371 spin_unlock(&ci->i_unsafe_lock); 4372 } 4373 4374 ceph_unreserve_caps(mdsc, &req->r_caps_reservation); 4375 } 4376 out_err: > 4377 if (req->r_target_inode && (req->r_target_inode->i_state & I_NEW)) 4378 discard_new_inode(req->r_target_inode); 4379 4380 mutex_lock(&mdsc->mutex); 4381 if (!test_bit(CEPH_MDS_R_ABORTED, &req->r_req_flags)) { 4382 if (err) { 4383 req->r_err = err; 4384 } else { 4385 req->r_reply = ceph_msg_get(msg); 4386 set_bit(CEPH_MDS_R_GOT_RESULT, &req->r_req_flags); 4387 } 4388 } else { 4389 doutc(cl, "reply arrived after request %lld was aborted\n", tid); 4390 } 4391 mutex_unlock(&mdsc->mutex); 4392 4393 mutex_unlock(&session->s_mutex); 4394 4395 /* kick calling process */ 4396 complete_request(mdsc, req); 4397 4398 ceph_update_metadata_metrics(&mdsc->metric, req->r_start_latency, 4399 req->r_end_latency, err); 4400 out: 4401 ceph_mdsc_put_request(req); 4402 4403 /* Defer closing the sessions after s_mutex lock being released */ 4404 if (close_sessions) 4405 ceph_mdsc_schedule_snap_fence(mdsc); 4406 return; 4407 } 4408 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki