From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=199.89.1.14 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796056487; b=K7k7SkvPsybDcaLuc7PddzmUDkDtwsbxAYCuzumkPQKuK5uebuNiYCsGMGWQrtY967cs NmgE3OXwHrjJ8KngyVyd4OGN2PrKT6pDkElUQA0vgb6nP0rGUCbIHMb3k5V4c76mPMmUs gkNG+9wNmmBCZ8rjbEmDPhKN3Prp1Npy+SNzyZBOaTgeoLMiGSe0Kz12vyiluE4cvL9h+ VZltqpsnKmJSebMQRIQ6rqL66MAOtIXbf0jouMO97DbzHDeRMg14EINz0Bm5Lg34/wXfi 1yVZSXWH4P5cJWFDNWzoHcIpiDqEMX/pHRU6sB2rdf/tAYGjC5w3OcGJIb8wTIoReKg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796056487; h=DMARC-Filter:Received:DKIM-Signature:X-Virus-Scanned:Received: Received:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc: References:Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=lzOehNI6maXsgYcX5Px3UwhD0GkJSLlb9BlrIRcuPGE=; b=1uJX+RkxY8EXjZJYC5KvaiG5sFmaUK8GlJozkDlw1CLbu2FQc1OJSTOc68P/DuYSf5el UpztjzkHREeZotZMtPlV1TBiyswopW+j5k4qSc8Egd6H2bJ42BR5RsP7Cy+z4R0QhrHpn dG6TrCSiCqtvd+sFDTvNGip4RgXCF6jQ7p59E0SKdmRJ9w5VZGIVQ/mBlIDgY4t0GyRcm GS8TNmjLwxs7LSfBt7zv9o2u0bbLfbpztrk/N2w6nhqjDV2DaKiT2cdzIKz959DmQO2wa E6Ivp7+rZJ2lV72qh1bOl4Gt8QdH4QJZ71NKnSJJ/g1ISS92CvHvO71LQ/Rf2jjC/RQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass header.d=acm.org header.i=@acm.org header.a=rsa-sha256 header.s=mr01 header.b=u4n5+MvL; arc=none smtp.remote-ip=199.89.1.14 Received: from 011.lax.mailroute.net (011.lax.mailroute.net [199.89.1.14]) (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 2E3AE606A325; Mon, 30 Nov 2026 16:34:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2E3AE606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=acm.org header.i=@acm.org header.a=rsa-sha256 header.s=mr01 header.b=u4n5+MvL Received: from localhost (localhost [127.0.0.1]) by 011.lax.mailroute.net (Postfix) with ESMTP id 4jdV3p47jkz1XLyhh; Mon, 30 Nov 2026 16:34:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :user-agent:mime-version:date:date:message-id:received:received; s=mr01; t=1796056482; x=1798648483; bh=lzOehNI6maXsgYcX5Px3UwhD 0GkJSLlb9BlrIRcuPGE=; b=u4n5+MvLexkyKrgUk0YP8FxTL7Z9rVIpVchP72lJ 7+PGomSO2sa+1zpZnjgyb/iHi+Ldxv17B4+k7bOuVgtbkc2IW5/gp2DXbzuHZzFm /URBwddclEBFmGtqpXRrT/qsyOUGDXoVf7phgKgfo7Va04RFYA28tX2bgzpOiC+z mWSGtq8pZubbF0WIyV1fk6iWlVDskuv1lNK1ajNnu8x1EsEIlNM58rHwsKRYlD6X QT15Hrku9VEYDLolgmVDnpfZ8sh7cPL+5Ms38cHElmc+AiavMcKaeLlgsq6IDp0Z GAD4leJ0U9/eo5tw7yHGQ1ql/64ZwU0MURmkjaNG+Z6xbQ== X-Virus-Scanned: by MailRoute Received: from 011.lax.mailroute.net ([127.0.0.1]) by localhost (011.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id 0T_utYVpuH00; Mon, 30 Nov 2026 16:34:42 +0000 (UTC) Received: from [100.86.177.251] (unknown [104.133.214.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 011.lax.mailroute.net (Postfix) with ESMTPSA id 4jdV3k3RjCz1XLyhd; Mon, 30 Nov 2026 16:34:42 +0000 (UTC) Message-ID: <364fdb6c-bb22-425d-8109-c954e269fff0@acm.org> Date: Mon, 30 Nov 2026 08:34:41 -0800 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9] loop: defer the queue limits clear to a workqueue To: Tao Cui Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Shin'ichiro Kawasaki , Jens Axboe , Christoph Hellwig , Tetsuo Handa , cuitao@kylinos.cn References: <20261126054223.176824-1-cui.tao@linux.dev> <20261126135628.495497-1-cui.tao@linux.dev> <46cefe96-a193-40f9-bc1a-facc73cf6afa@acm.org> <0523850b-2049-41ff-8dfa-ca3a8f055a5f@linux.dev> <6eed3fd1-3c0e-42ac-8d86-634522516f05@acm.org> <2FD3BF4D-509E-4A3E-B605-D6DD16226148@linux.dev> Content-Language: en-US From: Bart Van Assche In-Reply-To: <2FD3BF4D-509E-4A3E-B605-D6DD16226148@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 11/30/26 6:57 AM, Tao Cui wrote: > =E4=BA=8E 2026=E5=B9=B411=E6=9C=8830=E6=97=A5 GMT+08:00 22:04:09=EF=BC=8C= Bart Van Assche =E5=86=99=E9=81=93=EF=BC=9A >> On 11/30/26 2:20 AM, Tao Cui wrote: >>> I'm planning to send this as v10 unless you see a problem with the >>> design. >> Are there any lo_fallocate() callers that expect that >> loop_clear_limits() has completed by the time lo_fallocate() returns? >> > I think no, nothing depends on that. lo_fallocate() is only called fro= m > do_req_filebacked(): both call sites return the fallocate result > directly to request completion, so the failing request completes with > EOPNOTSUPP regardless of when the limits update commits, and nothing > reads the queue limits expecting the cleared state right after > lo_fallocate() returns. Requests dispatched before the work item runs > also fail with EOPNOTSUPP, the first one reports, repeats are quiet, an= d the work items serialize on lo->workqueue, so the update > converges. >=20 > Tested with PROVE_LOCKING enabled: loop/011, the concurrency sweep and > the mkfs/unbind stress run clean. >=20 > Please correct me if I have misunderstood anything here Please queue the dynamically allocated work on another workqueue than lo->workqueue. I'm concerned that using lo->workqueue might trigger a deadlock. Thanks, Bart.