From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796224432; b=HQkaHwMpcRjUOqpDNx9TbsiCHJMlCG/XrjWKfynA6rk7li/SC7Nxl0dQJNCTHkhd39ZY PQAGYkUl5jEt9O6TqrArqHFmM5RAELF5GW6WjtRQ7PFONYc2343mJnUFxYsn0pvDkMcuY 7e8i6/xJKeLJzDQONTQwcYkN0etxlBwcHv484kgg2N7tutKI70yMkgKzM7uzezjeS2f0K hzfIfrecGv4BAclnG3cWgXf/lh4S2A3rBDY1cA0o1rXQyYYf6nXrRTqQ783R0B5vmTXVt qxhMIY22J/6dnELz8iQN0F2rPlNmSR1ws2gE/3TD14WG1S3Y34Lvao0sRFKjQ8nkCrg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796224432; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received: X-Received:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=1wJHpaWuhaFR2t7eB1sBgOkEpN4hzwcGDBK/kqHwS/0=; b=KdaAIps77TxWZKtr293eCoojsFBT7NvzRzaCNhO8jPBN+HX/F18+S7wSLIE6g0Nq5E7I aO2suunKJSbWXiwA8Rh5ygyaefTzumYfGa3mWxO9/mPusb0e4Tj3gYSf+WIc76axOjBm6 cti1Wzy7rqVSBzcNCfKEi9EeMgYdsUBx9WGnjnyleoCbPM5am/MiZpcifwq9JGkRCTJPj hlviTFrdIyF8HzFNSwkZOzhhMsD613Zq6oG363u830m7nhQAfB9H9790oAl3b8mODQuky J/IaIs6Fsxp3x4eZ4e4yf9/Bakw6NnvcIqTVAaFdpUYgggyO7YWY3obZufkP6Lberxg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DsERvjlF; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=WN3MyAVg; arc=none smtp.remote-ip=170.10.133.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 418DE606A330 for ; Wed, 2 Dec 2026 15:13:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 418DE606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DsERvjlF; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=WN3MyAVg DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796224432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1wJHpaWuhaFR2t7eB1sBgOkEpN4hzwcGDBK/kqHwS/0=; b=DsERvjlFSqm/KOYnzbPy4sAHdAfSlRLJ3yDBXW1oPcAB+OMi2hs9GtYcLEZKZ/1+3jU8Jy KBwtoh1+iwXrc4tvgiVO04xf7fUvYmX0wP9Ba/yK1UBV0gZOD+HLa0lniSKmpUM50KHZNA K9QBZMo3MCiVA3PWl4hYP2IibQadlo0= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-508-f9nvkl76OAiUcfQeDkeeHw-1; Wed, 2 Dec 2026 15:13:48 +0000 X-MC-Unique: f9nvkl76OAiUcfQeDkeeHw-1 X-Mimecast-MFC-AGG-ID: f9nvkl76OAiUcfQeDkeeHw_1796224428 Received: by mail-ua1-f70.google.com with SMTP id a1e0cc1a2514c-99063f4065eso3195087241.3 for ; Wed, 02 Dec 2026 07:13:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1796224428; x=1796829228; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=1wJHpaWuhaFR2t7eB1sBgOkEpN4hzwcGDBK/kqHwS/0=; b=WN3MyAVgBPPSrWC/g76Ll3inAoNsE9XLjUogPe4t8H2hARV+swDNHoFDZXBvZMTuLA mbWMHE36e1U8NPRwL0LmfgJ5iSLiM5aJybj9tyZITgAZBKExbdxxCBSnN4/vSGnka5cm lhmFIKKlEBEhf93NycyXspJaXjXeWuextvtj9IaREGod+w9tmxj21zmvBEG7CoU8DMa+ 32vmHjU3bEU1q10+PMTAl3EJdQFxIVRvWIKYMYbNux2y5DCULC8JX1/dz/DV10eScJ+Y MZTkn7gXKOdDn59CEBqWFYnBvtwtKy9zs5x9v/VAukISDZGppTJdm18GIiw+AZzhDUJj fEAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796224428; x=1796829228; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=1wJHpaWuhaFR2t7eB1sBgOkEpN4hzwcGDBK/kqHwS/0=; b=CqwYw85cJsFOlyYeh/dlDeGkhkppU5aCkOMJgGDmu57R8MOtFoKSlhl512jso7Hqjs PFLSpePjs/Lv2Puyl6rTIWtb030+/8UnLmrcS93PAG/ZbKZbhM4lVkkjkZJIp0p9LJSV CNZADWRD9ztJajsYNShu+Khu/HkYyNwIqGuTMb+H4sm2Z6VbHR/ri6BtJDeEjXZ7RWqv yMn2wzxB24VRFenLrsCnR/A4Zlm8w+xCCDvHDH948AMy9UrJF1MxRnR2QQbFsYVibYAH JJDwnVETTquyMrs6i4tdkWmTjTh7I3y18ZOMm1ieqC6QF24B7Jr/PCOMs4mGVSAr2RpM crLA== X-Forwarded-Encrypted: i=1; AL+hErGIgCF23UyjrRGxZV5MuR3ozIee85iyjZUaoPmknVAtVaOlFzwe/H/+U9sstArR6rZHkqE1qQyAsCW2OE8=@vger.kernel.org X-Gm-Message-State: APuU4Z8JDU/A35gztReo/chU5OdcSrPOyqbvr5Z4oJ/MtmDgRT4HWbEB FXoFJ2RErpy1N1Z3wnzutw6NfYe/r0UOQcxJ99JFiEUtVoYuWeqGOawbxIxyY5ery+ONL2Af5p1 Alf/B6Dx0APrCHHIMbJljfYIK5Y/NjYVYGavTsLEbQN1pn87wmqj7yUWSTrAFtOLCWg== X-Gm-Gg: AZFdTZeERlIyco89YnXt3eiJV3yuCnzOcKt8nM6ieytpqUnD3ShqiBLtvbRjTNjQ9Ox /xv+IRkfjVtKZ4yzH21o/ojGyUTxSE+udiuqiDY08yQBxCqzo4mGLYISQLgsRFIojNVLxtRrXsm rxCl04PJFxPTWqjECD8L1/lIZ3VS+/hMjBD+FgtzmFvZ0LxtFUO7+4IKHV9kHF9kDWe4I8nw9UK 3YkM5EAQL2267VEwcI9XdKiNq7BVdWSA2X82xfDIN+45nrNfhPmQ4wpyzdwjJIWho7WjrPMq+jP IsMrA9S+spHTLpWxpHQyWdOZYczc31owGi2zqV8r3TDKSltd8JfOXNpVXHJABTEkOyC26xDmwy5 hwfNHAYP2IfuzChIe66GoMT162rmBe+mryI5ifFd+aeKJSTyDvK+sBZE1aRKsNA4uxBiXjPN9C2 2kvISTYHV0qZLW04K52WZIXxRBCIZo3ymNM1z2+iQ1L554ffUUoq3JR6qUeo6U2G6bDvBrjPjq+ NgtzuiZgYV3W9fCTK8SjZoR2tNcPTiacOHwJUltcKflyauqDomU X-Received: by 2002:a67:e115:0:b0:7ce:6474:7216 with SMTP id ada2fe7eead31-7d7443257cbmr20213931137.36.1796224427525; Wed, 02 Dec 2026 07:13:47 -0800 (PST) X-Received: by 2002:a67:e115:0:b0:7ce:6474:7216 with SMTP id ada2fe7eead31-7d7443257cbmr20213866137.36.1796224426856; Wed, 02 Dec 2026 07:13:46 -0800 (PST) Received: from cluster.. (4f.55.790d.ip4.static.sl-reverse.com. [13.121.85.79]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-92134a0a454sm350519526d6.35.2026.12.02.07.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 07:13:46 -0800 (PST) From: Alex Markuze To: Kaho Jiang Cc: Ilya Dryomov , Xiubo Li , Viacheslav Dubeyko , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, co+408fcc361565713f@bugs.sh Subject: Re: [PATCH v5 2/2] ceph: defer the blocklist and fence off the MDS worker Date: Wed, 2 Dec 2026 15:13:43 +0000 Message-Id: <20261202151343.640309-1-amarkuze@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261202045041.130195-2-kj2864@nyu.edu> References: <20261202045041.130195-1-kj2864@nyu.edu> <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=UTF-8 Content-Transfer-Encoding: 8bit Hi Kaho, Thanks for splitting the bounds fix and moving the fence work off the MDS worker. The deferred path still needs to keep the client fenced while it handles the error and the blocklist operation. On kernels where i_state is a struct inode_state_flags, the new I_NEW test does not compile; inode_state_read_once() is the accessor used in this tree. On a snap-trace failure, discard_new_inode() consumes the target reference but leaves r_target_inode pointing to it. It also wakes waiters while the incomplete inode is still hashed. iget_failed() marks the inode bad, unhashes it before waking waiters, and puts it; it is a candidate for a target still being initialized. The request's reference needs to be detached safely, with the create, async-create and unsafe-request paths retaining the references they need. A direct writer can pass the shutdown check and wait for snap_rwsem while the snap update fails. In try_get_cap_refs(), rechecking the fence after taking snap_rwsem and before taking the cached context would stop that waiter, provided mount and recovery cannot clear the fence. That check alone does not cover writers that already have a context or queued I/O. For a wider local gate, ceph_osdc_abort_requests() fails ordinary OSD submissions after its abort latch is installed. Its placement in the failure paths needs a lock-order check, and a writer can still enqueue while the abort is waiting for the OSD-client lock. A wider gate needs an ordering shared with submission and resend paths. The abort cannot retract a write that has already reached an OSD. One direction for mount and recovery is to keep the corruption state sticky for the lifetime of the client, separate from whether fence work is queued or running. A matching mount or an already-started clean recovery must not make the corrupted client usable again. Coordinate recovery with the worker so a nonce reset cannot make it blocklist a replacement identity. The monitor wait needs a bound on the version request as well as the map wait: ceph_wait_for_latest_osdmap() calls ceph_monc_get_version() before waiting for the map, and this call uses a zero map timeout. wait_generic_request_timeout() may be useful for a bounded version-request variant, with cancellation and late replies handled. Separating local MDS request wakeups from the remote wait would let local cleanup progress; sent and unsafe requests still need their completion and ownership rules. Moving the whole ceph_mdsc_force_umount() earlier also requests session closes and does not retract writes already sent to OSDs. A denied or timed-out blocklist is not confirmation that the OSDs exclude those writes. For testing, fail snap-trace allocation after allocating a new target inode, with a concurrent I_NEW waiter, and check the inode's lifetime and what the waiter receives. Pause a direct writer at snap_rwsem while failing a snap-array allocation and check that it cannot submit the old context. With a client allowed to blocklist, let the command succeed and then withhold the version reply to check request and unmount progress. Thanks, Alex