From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796040931; b=xIO+Q0NRcmdk7lMTsGkKge+nu+CViGxEPIUns650hGwJObmYqL7OzQL9OnyjNVkwj1xu 5HAIeVR+rnTQKZFZzfma76/Z76r8P/IGHSDgiiEVK4F3gz/NMZsE1KnrusH2PFAmwXPZF z5CugZfDXtcAgKV2n6hteVvHLnLkYZGoLITrqS+J9bm967j2SNx5lpmbA4RQ4RzA9dWJe U2ldt7bhqBjDlKqYbZfdDe45p8IDOlzWufzQF0CeqqUtrcx/03fNuqnH1+dxpo6WETdNI GI7NxVaF7GNw1XklkoGHLeZAQlmA7ZYPmPp0wSzwLK29d9ARv+YyV7dswUxpBb7BaGA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796040931; h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References: Date:Message-ID:MIME-Version:Content-Type; bh=DuTpyLKFLhEvtQwIabURSgT4pffqlEMT5QO8csqVxZU=; b=iTVbnvZV7IG2/uxz6cxEZ4oX9T16NNonMs6iRwGUsvDP26X24+FD4RLa9PEWYL+aaAle iqcY8G6NQoOwR52YHFehMZAd7uroUEQXTtduJz55JxlrehRrOhZAMa4VrfICfW10SbFNU TL9AkLto29EffSDytsz5uAX7l2mNse2nUxu6d3YUBwdW1i4Vs+0NROxSinrCT+W9BUQjf chuY3Jg2Co9VGhr85MfMQ1gD7t0QogBS/Bsc0GNSpQhcicSUNzh8WSIID7OIy06hMOEwK i0jTmpZU1635XZlEjnpEFqZRI4Uh77ivwHPuNv2RedFUJKhPE4ZobuVslnJxYFkc/Iw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kJhZKsG2; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEE93606A327; Mon, 30 Nov 2026 12:15:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kJhZKsG2 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F9AA1F00924; Mon, 30 Nov 2026 12:15:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796040931; bh=DuTpyLKFLhEvtQwIabURSgT4pffqlEMT5QO8csqVxZU=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=kJhZKsG2VeraZOu4PH/seeFyCeGrJSBt/Ay3ioAomzLlYoBjWDsuBrNQXEFqjYLxN GA0Jcaxu4+RIoi1PJZ2vHam3xmNhhfgx2NMC+3Mkp+w0CeUiyK8sM3q9SLkwsif1Ea PAvj8idGzGczUZ1S/IlKqpB6KGzfefx/pMHHvQndH0YHBcm0LZsKX90XWlBas56Nig kqAjMGq1MSw2f0dmnckLU0kPQZIz0NUQvBo0vQd8rc2FUO6jWtAzC94uWaR2uCrJKb IoTJK21CldUzjDfqyaLJa7mS4vwSnDSwXyvCY6lX4kjNb/21H45AFSVvtpfLceO1jJ zdz0pTsFs/8Pg== From: Andreas Hindborg To: peder.bergan@gmail.com, Jens Axboe Cc: Boqun Feng , linux-block@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 2/2] block: rnull: track uncached discard coverage by sector In-Reply-To: <20261130-fix-rnull-memory-backed-correctness-v1-2-ff16977610c0@gmail.com> References: <20261130-fix-rnull-memory-backed-correctness-v1-0-ff16977610c0@gmail.com> <20261130-fix-rnull-memory-backed-correctness-v1-2-ff16977610c0@gmail.com> Date: Mon, 30 Nov 2026 13:15:18 +0100 Message-ID: <874icytt0p.fsf@t14s.mail-host-address-is-not-set> 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 "Peder Bergan via B4 Relay" writes: > From: Peder Bergan > > A configfs device can retain its backing storage when it is > powered off and brought back with a different logical block > size. Block-based occupancy cannot then describe which sectors > a discard covers. A partial discard can drop a page with data > outside the requested range, or leave a fully discarded page > allocated. The semantics of changing block size between power cycles is not well documented. The rnull driver intentionally mirrors the implementation in C null_blk. I think you should establish the semantics you want over there first and then we can match them in rnull if they change. I think we should either refuse to change the block size between power cycles of the virtual device, or just accept the current limitations, but document them better. Best regards, Andreas Hindborg